Skip to content

Commit

Permalink
ASoC: Intel: broadwell: 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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
plbossart authored and broonie committed Jan 28, 2019
1 parent e87055d commit 2d067b2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions sound/soc/intel/boards/broadwell.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <sound/soc.h>
#include <sound/jack.h>
#include <sound/pcm_params.h>
#include <sound/soc-acpi.h>

#include "../common/sst-dsp.h"
#include "../haswell/sst-haswell-ipc.h"
Expand Down Expand Up @@ -267,7 +268,22 @@ static struct snd_soc_card broadwell_rt286 = {

static int broadwell_audio_probe(struct platform_device *pdev)
{
struct snd_soc_acpi_mach *mach;
const char *platform_name = NULL;
int ret;

broadwell_rt286.dev = &pdev->dev;

/* override plaform name, if required */
mach = (&pdev->dev)->platform_data;
if (mach) /* extra check since legacy does not pass parameters */
platform_name = mach->mach_params.platform;

ret = snd_soc_fixup_dai_links_platform_name(&broadwell_rt286,
platform_name);
if (ret)
return ret;

return devm_snd_soc_register_card(&pdev->dev, &broadwell_rt286);
}

Expand Down

0 comments on commit 2d067b2

Please sign in to comment.