Skip to content

Commit 5498a4e

Browse files
brentlubroonie
authored andcommitted
ASoC: Intel: sof_rt5682: support MAX98357A on glk boards
For glk boards, MAX98357A speaker amplifier is supported by machine driver glk_rt5682_mx98357a with sound card name glkrt5682max. Use same name for backward compatibility with existing devices on market. Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Brent Lu <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 44567d3 commit 5498a4e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

sound/soc/intel/boards/sof_rt5682.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,20 @@ static int sof_audio_probe(struct platform_device *pdev)
698698

699699
/* overwrite the DAI link order for GLK boards */
700700
ctx->link_order_overwrite = GLK_LINK_ORDER;
701+
702+
/* backward-compatible with existing devices */
703+
switch (ctx->amp_type) {
704+
case CODEC_MAX98357A:
705+
card_name = devm_kstrdup(&pdev->dev, "glkrt5682max",
706+
GFP_KERNEL);
707+
if (!card_name)
708+
return -ENOMEM;
709+
710+
sof_audio_card_rt5682.name = card_name;
711+
break;
712+
default:
713+
break;
714+
}
701715
} else if (soc_intel_is_cml()) {
702716
/* backward-compatible with existing devices */
703717
switch (ctx->amp_type) {

0 commit comments

Comments
 (0)