Skip to content

Commit f46b768

Browse files
brentlubroonie
authored andcommitted
ASoC: Intel: sof_da7219: support MAX98357A on glk boards
For glk boards, MAX98357A speaker amplifier is supported by machine driver bxt_da7219_max98357a with sound card name glkda7219max. 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 c7f9523 commit f46b768

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

sound/soc/intel/boards/sof_da7219.c

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

349349
/* overwrite the DAI link order for GLK boards */
350350
ctx->link_order_overwrite = GLK_LINK_ORDER;
351+
352+
/* backward-compatible with existing devices */
353+
switch (ctx->amp_type) {
354+
case CODEC_MAX98357A:
355+
card_name = devm_kstrdup(&pdev->dev, "glkda7219max",
356+
GFP_KERNEL);
357+
if (!card_name)
358+
return -ENOMEM;
359+
360+
card_da7219.name = card_name;
361+
break;
362+
default:
363+
break;
364+
}
351365
} else if (board_quirk & SOF_DA7219_CML_BOARD) {
352366
/* overwrite the DAI link order for CML boards */
353367
ctx->link_order_overwrite = CML_LINK_ORDER;

0 commit comments

Comments
 (0)