Skip to content

Commit

Permalink
ASoC: Intel: cht_bsw_rt5645: platform name fixup support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre-Louis Bossart authored and Mark Brown committed Jan 28, 2019
1 parent 4506db8 commit 3a934e7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sound/soc/intel/boards/cht_bsw_rt5645.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
{
struct snd_soc_card *card = snd_soc_cards[0].soc_card;
struct snd_soc_acpi_mach *mach;
const char *platform_name;
struct cht_mc_private *drv;
const char *i2c_name = NULL;
bool found = false;
Expand Down Expand Up @@ -663,6 +664,14 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
cht_rt5645_cpu_dai_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;

drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
if (IS_ERR(drv->mclk)) {
dev_err(&pdev->dev,
Expand Down

0 comments on commit 3a934e7

Please sign in to comment.