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>
This commit is contained in:
parent
07acee589f
commit
7d1bf46cb2
@ -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);
|
||||
|
@ -73,6 +73,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
|
||||
.quirk_data = &mx98360a_spk,
|
||||
.sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg",
|
||||
},
|
||||
{
|
||||
.id = "10134242",
|
||||
.drv_name = "jsl_cs4242_mx98360a",
|
||||
.sof_fw_filename = "sof-jsl.ri",
|
||||
.machine_quirk = snd_soc_acpi_codec_list,
|
||||
.quirk_data = &mx98360a_spk,
|
||||
.sof_tplg_filename = "sof-jsl-cs42l42-mx98360a.tplg",
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_jsl_machines);
|
||||
|
Loading…
Reference in New Issue
Block a user