aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/qcom
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-12-01 14:53:31 +0100
committerMark Brown <broonie@kernel.org>2023-12-01 18:38:58 +0000
commit625ed9457de50d7726ccb3f2bc4e01e543ceb126 (patch)
treea3a692d7ba623268f0cad8fbf3a91e7d00c4c856 /sound/soc/qcom
parentASoC: SOF: IPC path handling and fallback support (diff)
downloadwireguard-linux-625ed9457de50d7726ccb3f2bc4e01e543ceb126.tar.xz
wireguard-linux-625ed9457de50d7726ccb3f2bc4e01e543ceb126.zip
ASoC: qcom: sc8280xp: set card driver name from match data
Sound machine drivers for all newer Qualcomm SoC platforms are the exactly same, therefore it makes sense to use same machine driver for newer platforms as well. Choice of sound topology and user-space Alsa UCM files depends however on card driver name, which must be customized per each board. Allow such customization by using driver match data as sound card driver name. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231201135332.154017-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom')
-rw-r--r--sound/soc/qcom/sc8280xp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
index 7c20b25ba3de..77722d6416b8 100644
--- a/sound/soc/qcom/sc8280xp.c
+++ b/sound/soc/qcom/sc8280xp.c
@@ -14,8 +14,6 @@
#include "common.h"
#include "sdw.h"
-#define DRIVER_NAME "sc8280xp"
-
struct sc8280xp_snd_data {
bool stream_prepared[AFE_PORT_MAX];
struct snd_soc_card *card;
@@ -146,13 +144,13 @@ static int sc8280xp_platform_probe(struct platform_device *pdev)
if (ret)
return ret;
- card->driver_name = DRIVER_NAME;
+ card->driver_name = of_device_get_match_data(dev);
sc8280xp_add_be_ops(card);
return devm_snd_soc_register_card(dev, card);
}
static const struct of_device_id snd_sc8280xp_dt_match[] = {
- {.compatible = "qcom,sc8280xp-sndcard",},
+ {.compatible = "qcom,sc8280xp-sndcard", "sc8280xp"},
{}
};