diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2019-01-25 14:35:00 -0600 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-01-28 18:08:14 +0000 |
commit | 0b2c2093fc3a1f89f2ef15d945c0439ce7b9dd9d (patch) | |
tree | c4d255626ce7594af0d1a8eec99c9cb15a4f7737 /sound/soc/intel/boards | |
parent | bd7661b761bc7f585aad4fc6e5b62d684bdad75b (diff) | |
download | blackbird-op-linux-0b2c2093fc3a1f89f2ef15d945c0439ce7b9dd9d.tar.gz blackbird-op-linux-0b2c2093fc3a1f89f2ef15d945c0439ce7b9dd9d.zip |
ASoC: Intel: bytcr_rt5651: 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')
-rw-r--r-- | sound/soc/intel/boards/bytcr_rt5651.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index e6945d11c8ab..c3b7732929cc 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -922,6 +922,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) static const char * const mic_name[] = { "dmic", "in1", "in2", "in12" }; struct byt_rt5651_private *priv; struct snd_soc_acpi_mach *mach; + const char *platform_name; struct device *codec_dev; const char *i2c_name = NULL; const char *hp_swapped; @@ -1137,6 +1138,14 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)], hp_swapped); byt_rt5651_card.long_name = byt_rt5651_long_name; + /* override plaform name, if required */ + platform_name = mach->mach_params.platform; + + ret_val = snd_soc_fixup_dai_links_platform_name(&byt_rt5651_card, + platform_name); + if (ret_val) + return ret_val; + ret_val = devm_snd_soc_register_card(&pdev->dev, &byt_rt5651_card); if (ret_val) { |