aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Lu <[email protected]>2024-04-26 10:25:21 -0500
committerMark Brown <[email protected]>2024-04-29 23:49:14 +0900
commit5498a4edbf314532b7138aabe705faa34fb5df8d (patch)
tree64a4ac1f6b1a5ebe798b9508413d671f612fc492
parent44567d3d62dfe9df514299a98429a59129e0a2d0 (diff)
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]>
-rw-r--r--sound/soc/intel/boards/sof_rt5682.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index 80ecf31c936a..efca7604040e 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -698,6 +698,20 @@ static int sof_audio_probe(struct platform_device *pdev)
/* overwrite the DAI link order for GLK boards */
ctx->link_order_overwrite = GLK_LINK_ORDER;
+
+ /* backward-compatible with existing devices */
+ switch (ctx->amp_type) {
+ case CODEC_MAX98357A:
+ card_name = devm_kstrdup(&pdev->dev, "glkrt5682max",
+ GFP_KERNEL);
+ if (!card_name)
+ return -ENOMEM;
+
+ sof_audio_card_rt5682.name = card_name;
+ break;
+ default:
+ break;
+ }
} else if (soc_intel_is_cml()) {
/* backward-compatible with existing devices */
switch (ctx->amp_type) {