ASoC: Intel: sof_da7219: support MAX98357A on cml boards
authorBrent Lu <brent.lu@intel.com>
Fri, 26 Apr 2024 15:25:15 +0000 (10:25 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 29 Apr 2024 14:49:09 +0000 (23:49 +0900)
For cml boards, MAX98357A speaker amplifier is supported by machine
driver bxt_da7219_max98357a with sound card name cmlda7219max. 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-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_da7219.c

index 610b5a8e08600309386d306bad4f3a1acfa898dd..ecb1d4b25ea601a87253a4edd83af0c4c253f711 100644 (file)
@@ -339,6 +339,14 @@ static int audio_probe(struct platform_device *pdev)
 
                /* backward-compatible with existing devices */
                switch (ctx->amp_type) {
+               case CODEC_MAX98357A:
+                       card_name = devm_kstrdup(&pdev->dev, "cmlda7219max",
+                                                GFP_KERNEL);
+                       if (!card_name)
+                               return -ENOMEM;
+
+                       card_da7219.name = card_name;
+                       break;
                case CODEC_MAX98390:
                        card_name = devm_kstrdup(&pdev->dev,
                                                 "cml_max98390_da7219",