Unverified Commit 8ff93924 authored by Mark Brown's avatar Mark Brown
Browse files

Merge series "ASoC: SOF/Intel: machine driver updates" from Pierre-Louis...

Merge series "ASoC: SOF/Intel: machine driver updates" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Two quirks added for Dell XPS 9710 and Intel reference boards, and two
minor cleanups.

Pierre-Louis Bossart (3):
  ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710
  ASoC: Intel: update sof_pcm512x quirks
  ASoC: Intel: sof_sdw_max98373: remove useless inits

jairaj arava (1):
  ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682
    variant

 sound/soc/intel/boards/sof_pcm512x.c      | 13 +++++++++++--
 sound/soc/intel/boards/sof_rt5682.c       | 14 ++++++++++++++
 sound/soc/intel/boards/sof_sdw.c          | 12 ++++++++++++
 sound/soc/intel/boards/sof_sdw_max98373.c |  4 ++--
 sound/soc/sof/sof-pci-dev.c               |  9 +++++++++
 5 files changed, 48 insertions(+), 4 deletions(-)

--
2.25.1
parents 5c8a7efc d4321277
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -26,11 +26,16 @@

#define SOF_PCM512X_SSP_CODEC(quirk)		((quirk) & GENMASK(3, 0))
#define SOF_PCM512X_SSP_CODEC_MASK			(GENMASK(3, 0))
#define SOF_PCM512X_ENABLE_SSP_CAPTURE		BIT(4)
#define SOF_PCM512X_ENABLE_DMIC			BIT(5)

#define IDISP_CODEC_MASK	0x4

/* Default: SSP5 */
static unsigned long sof_pcm512x_quirk = SOF_PCM512X_SSP_CODEC(5);
static unsigned long sof_pcm512x_quirk =
	SOF_PCM512X_SSP_CODEC(5) |
	SOF_PCM512X_ENABLE_SSP_CAPTURE |
	SOF_PCM512X_ENABLE_DMIC;

static bool is_legacy_cpu;

@@ -244,8 +249,9 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev,
	links[id].dpcm_playback = 1;
	/*
	 * capture only supported with specific versions of the Hifiberry DAC+
	 * links[id].dpcm_capture = 1;
	 */
	if (sof_pcm512x_quirk & SOF_PCM512X_ENABLE_SSP_CAPTURE)
		links[id].dpcm_capture = 1;
	links[id].no_pcm = 1;
	links[id].cpus = &cpus[id];
	links[id].num_cpus = 1;
@@ -380,6 +386,9 @@ static int sof_audio_probe(struct platform_device *pdev)

	ssp_codec = sof_pcm512x_quirk & SOF_PCM512X_SSP_CODEC_MASK;

	if (!(sof_pcm512x_quirk & SOF_PCM512X_ENABLE_DMIC))
		dmic_be_num = 0;

	/* compute number of dai links */
	sof_audio_card_pcm512x.num_links = 1 + dmic_be_num + hdmi_num;

+14 −0
Original line number Diff line number Diff line
@@ -162,6 +162,20 @@ static const struct dmi_system_id sof_rt5682_quirk_table[] = {
					SOF_RT5682_SSP_AMP(2) |
					SOF_RT5682_NUM_HDMIDEV(4)),
	},
	{
		.callback = sof_rt5682_quirk_cb,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Alder Lake Client Platform"),
			DMI_MATCH(DMI_OEM_STRING, "AUDIO-ADL_MAX98373_ALC5682I_I2S"),
		},
		.driver_data = (void *)(SOF_RT5682_MCLK_EN |
					SOF_RT5682_SSP_CODEC(0) |
					SOF_SPEAKER_AMP_PRESENT |
					SOF_MAX98373_SPEAKER_AMP_PRESENT |
					SOF_RT5682_SSP_AMP(2) |
					SOF_RT5682_NUM_HDMIDEV(4)),
	},
	{}
};

+12 −0
Original line number Diff line number Diff line
@@ -129,6 +129,18 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
					RT711_JD2 |
					SOF_RT715_DAI_ID_FIX),
	},
	{
		/* Dell XPS 9710 */
		.callback = sof_sdw_quirk_cb,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5D")
		},
		.driver_data = (void *)(SOF_SDW_TGL_HDMI |
					RT711_JD2 |
					SOF_RT715_DAI_ID_FIX |
					SOF_SDW_FOUR_SPK),
	},
	{
		.callback = sof_sdw_quirk_cb,
		.matches = {
+2 −2
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ static int mx8373_enable_spk_pin(struct snd_pcm_substream *substream, bool enabl

static int mx8373_sdw_prepare(struct snd_pcm_substream *substream)
{
	int ret = 0;
	int ret;

	/* according to soc_pcm_prepare dai link prepare is called first */
	ret = sdw_prepare(substream);
@@ -102,7 +102,7 @@ static int mx8373_sdw_prepare(struct snd_pcm_substream *substream)

static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream)
{
	int ret = 0;
	int ret;

	/* according to soc_pcm_hw_free dai link free is called first */
	ret = sdw_hw_free(substream);
+9 −0
Original line number Diff line number Diff line
@@ -50,6 +50,15 @@ static const struct dmi_system_id sof_tplg_table[] = {
		},
		.driver_data = "sof-tgl-rt5682-ssp0-max98373-ssp2.tplg",
	},
	{
		.callback = sof_tplg_cb,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Alder Lake Client Platform"),
			DMI_MATCH(DMI_OEM_STRING, "AUDIO-ADL_MAX98373_ALC5682I_I2S"),
		},
		.driver_data = "sof-adl-rt5682-ssp0-max98373-ssp2.tplg",
	},
	{}
};