Skip to content

Commit 9897307

Browse files
brentluplbossart
authored andcommitted
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. Signed-off-by: Brent Lu <brent.lu@intel.com>
1 parent 4eb94ff commit 9897307

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

sound/soc/intel/boards/sof_cs42l42.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#define SOF_CS42L42_DAILINK(link1, link2, link3, link4, link5) \
4343
((((link1) | ((link2) << 3) | ((link3) << 6) | ((link4) << 9) | ((link5) << 12)) << SOF_CS42L42_DAILINK_SHIFT) & SOF_CS42L42_DAILINK_MASK)
4444
#define SOF_MAX98357A_SPEAKER_AMP_PRESENT BIT(25)
45+
#define SOF_MAX98360A_SPEAKER_AMP_PRESENT BIT(26)
4546

4647
enum {
4748
LINK_NONE = 0,
@@ -299,6 +300,8 @@ static int create_spk_amp_dai_links(struct device *dev,
299300

300301
if (sof_cs42l42_quirk & SOF_MAX98357A_SPEAKER_AMP_PRESENT) {
301302
max_98357a_dai_link(&links[*id]);
303+
} else if (sof_cs42l42_quirk & SOF_MAX98360A_SPEAKER_AMP_PRESENT) {
304+
max_98360a_dai_link(&links[*id]);
302305
} else {
303306
dev_err(dev, "no amp defined\n");
304307
ret = -EINVAL;
@@ -610,6 +613,14 @@ static const struct platform_device_id board_ids[] = {
610613
SOF_CS42L42_SSP_AMP(1)) |
611614
SOF_CS42L42_DAILINK(LINK_SPK, LINK_HP, LINK_DMIC, LINK_HDMI, LINK_NONE),
612615
},
616+
{
617+
.name = "jsl_cs4242_mx98360a",
618+
.driver_data = (kernel_ulong_t)(SOF_CS42L42_SSP_CODEC(0) |
619+
SOF_SPEAKER_AMP_PRESENT |
620+
SOF_MAX98360A_SPEAKER_AMP_PRESENT |
621+
SOF_CS42L42_SSP_AMP(1)) |
622+
SOF_CS42L42_DAILINK(LINK_HP, LINK_DMIC, LINK_HDMI, LINK_SPK, LINK_NONE),
623+
},
613624
{ }
614625
};
615626
MODULE_DEVICE_TABLE(platform, board_ids);

sound/soc/intel/common/soc-acpi-intel-jsl-match.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
7373
.quirk_data = &mx98360a_spk,
7474
.sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg",
7575
},
76+
{
77+
.id = "10134242",
78+
.drv_name = "jsl_cs4242_mx98360a",
79+
.sof_fw_filename = "sof-jsl.ri",
80+
.machine_quirk = snd_soc_acpi_codec_list,
81+
.quirk_data = &mx98360a_spk,
82+
.sof_tplg_filename = "sof-jsl-cs42l42-mx98360a.tplg",
83+
},
7684
{},
7785
};
7886
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_jsl_machines);

0 commit comments

Comments
 (0)