diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2019-01-25 14:34:59 -0600 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-01-28 18:08:04 +0000 |
commit | bd7661b761bc7f585aad4fc6e5b62d684bdad75b (patch) | |
tree | f4c990382114b99bdf8654b04108e2fc22d35b0f /sound/soc/intel/boards/bytcr_rt5640.c | |
parent | 7e40ddcf974a970e750420f88365174cfd207b24 (diff) | |
download | linux-bd7661b761bc7f585aad4fc6e5b62d684bdad75b.tar.gz linux-bd7661b761bc7f585aad4fc6e5b62d684bdad75b.tar.bz2 linux-bd7661b761bc7f585aad4fc6e5b62d684bdad75b.zip |
ASoC: Intel: bytcr_rt5640: platform name fixup support
Add helper to override dailink platform name, if passed as parameter
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/bytcr_rt5640.c')
-rw-r--r-- | sound/soc/intel/boards/bytcr_rt5640.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index a79466c8fb29..940eb27158da 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -1153,6 +1153,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) const struct dmi_system_id *dmi_id; struct byt_rt5640_private *priv; struct snd_soc_acpi_mach *mach; + const char *platform_name; const char *i2c_name = NULL; int ret_val = 0; int dai_index = 0; @@ -1317,6 +1318,14 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) map_name[BYT_RT5640_MAP(byt_rt5640_quirk)]); byt_rt5640_card.long_name = byt_rt5640_long_name; + /* override plaform name, if required */ + platform_name = mach->mach_params.platform; + + ret_val = snd_soc_fixup_dai_links_platform_name(&byt_rt5640_card, + platform_name); + if (ret_val) + return ret_val; + ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5640_card); if (ret_val) { |