Commit 686338c1 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: Intel: bytcht_da7213: platform name fixup support

Add helper to override dailink platform name, if passed as parameter
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0b2c2093
...@@ -225,6 +225,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev) ...@@ -225,6 +225,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
{ {
struct snd_soc_card *card; struct snd_soc_card *card;
struct snd_soc_acpi_mach *mach; struct snd_soc_acpi_mach *mach;
const char *platform_name;
const char *i2c_name = NULL; const char *i2c_name = NULL;
int dai_index = 0; int dai_index = 0;
int ret_val = 0; int ret_val = 0;
...@@ -250,6 +251,13 @@ static int bytcht_da7213_probe(struct platform_device *pdev) ...@@ -250,6 +251,13 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
dailink[dai_index].codec_name = codec_name; dailink[dai_index].codec_name = codec_name;
} }
/* override plaform name, if required */
platform_name = mach->mach_params.platform;
ret_val = snd_soc_fixup_dai_links_platform_name(card, platform_name);
if (ret_val)
return ret_val;
ret_val = devm_snd_soc_register_card(&pdev->dev, card); ret_val = devm_snd_soc_register_card(&pdev->dev, card);
if (ret_val) { if (ret_val) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment