summaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/sof_cs42l42.c
diff options
context:
space:
mode:
authorBrent Lu <brent.lu@intel.com>2021-07-12 23:32:36 +0300
committerMark Brown <broonie@kernel.org>2021-07-14 15:30:36 +0300
commit7d1bf46cb233aa80e684f61cde5f91530da3f3ea (patch)
tree1b61679737916bb0bb745b4ad4ea01f699e7c8e8 /sound/soc/intel/boards/sof_cs42l42.c
parent07acee589f4293cb0ebd77aa201d616e9a296bb9 (diff)
downloadlinux-7d1bf46cb233aa80e684f61cde5f91530da3f3ea.tar.xz
ASoC: Intel: sof_cs42l42: add support for jsl_cs4242_mx98360a
This patch adds driver data for jsl_cs4242_mx98360a which supports two max98360a speaker amplifiers on SSP1 and cs42l42 headphone codec on SSP0 running on JSL platform. Reviewed-by: Bard Liao <bard.liao@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/20210712203240.46960-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/sof_cs42l42.c')
-rw-r--r--sound/soc/intel/boards/sof_cs42l42.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/sof_cs42l42.c b/sound/soc/intel/boards/sof_cs42l42.c
index 4cd8be177db1..ce78c1879887 100644
--- a/sound/soc/intel/boards/sof_cs42l42.c
+++ b/sound/soc/intel/boards/sof_cs42l42.c
@@ -42,6 +42,7 @@
#define SOF_CS42L42_DAILINK(link1, link2, link3, link4, link5) \
((((link1) | ((link2) << 3) | ((link3) << 6) | ((link4) << 9) | ((link5) << 12)) << SOF_CS42L42_DAILINK_SHIFT) & SOF_CS42L42_DAILINK_MASK)
#define SOF_MAX98357A_SPEAKER_AMP_PRESENT BIT(25)
+#define SOF_MAX98360A_SPEAKER_AMP_PRESENT BIT(26)
enum {
LINK_NONE = 0,
@@ -299,6 +300,8 @@ static int create_spk_amp_dai_links(struct device *dev,
if (sof_cs42l42_quirk & SOF_MAX98357A_SPEAKER_AMP_PRESENT) {
max_98357a_dai_link(&links[*id]);
+ } else if (sof_cs42l42_quirk & SOF_MAX98360A_SPEAKER_AMP_PRESENT) {
+ max_98360a_dai_link(&links[*id]);
} else {
dev_err(dev, "no amp defined\n");
ret = -EINVAL;
@@ -610,6 +613,14 @@ static const struct platform_device_id board_ids[] = {
SOF_CS42L42_SSP_AMP(1)) |
SOF_CS42L42_DAILINK(LINK_SPK, LINK_HP, LINK_DMIC, LINK_HDMI, LINK_NONE),
},
+ {
+ .name = "jsl_cs4242_mx98360a",
+ .driver_data = (kernel_ulong_t)(SOF_CS42L42_SSP_CODEC(0) |
+ SOF_SPEAKER_AMP_PRESENT |
+ SOF_MAX98360A_SPEAKER_AMP_PRESENT |
+ SOF_CS42L42_SSP_AMP(1)) |
+ SOF_CS42L42_DAILINK(LINK_HP, LINK_DMIC, LINK_HDMI, LINK_SPK, LINK_NONE),
+ },
{ }
};
MODULE_DEVICE_TABLE(platform, board_ids);