diff options
author | Brent Lu <brent.lu@intel.com> | 2024-04-26 10:25:18 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-04-29 23:49:12 +0900 |
commit | f46b768b7281e4ef784d06788be2f941c13eddde (patch) | |
tree | ef36c871d32f665f91bc4880eac571c9eebe3b11 /sound/soc/intel/boards/sof_da7219.c | |
parent | c7f9523d21d49b56498ac58e4b1afcb930eb551a (diff) |
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 <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240426152529.38345-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/sof_da7219.c')
-rw-r--r-- | sound/soc/intel/boards/sof_da7219.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/sof_da7219.c b/sound/soc/intel/boards/sof_da7219.c index cc5e99b21456..d7b605896f89 100644 --- a/sound/soc/intel/boards/sof_da7219.c +++ b/sound/soc/intel/boards/sof_da7219.c @@ -348,6 +348,20 @@ static int 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, "glkda7219max", + GFP_KERNEL); + if (!card_name) + return -ENOMEM; + + card_da7219.name = card_name; + break; + default: + break; + } } else if (board_quirk & SOF_DA7219_CML_BOARD) { /* overwrite the DAI link order for CML boards */ ctx->link_order_overwrite = CML_LINK_ORDER; |