linux_dsm_epyc7002/sound/soc/intel
Sam McNally d4b74e218a
ASoC: Intel: sof_rt5682: Ignore the speaker amp when there isn't one.
Some members of the Google_Hatch family include a rt5682 jack codec, but
no speaker amplifier. This uses the same driver (sof_rt5682) as a
combination of rt5682 jack codec and max98357a speaker amplifier. Within
the sof_rt5682 driver, these cases are not currently distinguishable,
relying on a DMI quirk to decide the configuration. This causes an
incorrect configuration when only the rt5682 is present on a
Google_Hatch device.

For CML, the jack codec is used as the primary key when matching,
with a possible speaker amplifier described in quirk_data. The two cases
of interest are the second and third 10EC5682 entries in
snd_soc_acpi_intel_cml_machines[]. The second entry matches the
combination of rt5682 and max98357a, resulting in the quirk_data field
in the snd_soc_acpi_mach being non-null, pointing at
max98357a_spk_codecs, the snd_soc_acpi_codecs for the matched speaker
amplifier. The third entry matches just the rt5682, resulting in a null
quirk_data.

The sof_rt5682 driver's DMI data matching identifies that a speaker
amplifier is present for all Google_Hatch family devices. Detect cases
where there is no speaker amplifier by checking for a null quirk_data in
the snd_soc_acpi_mach and remove the speaker amplifier bit in that case.

Signed-off-by: Sam McNally <sammc@chromium.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200103124921.v3.1.Ib87c4a7fbb3fc818ea12198e291b87dc2d5bc8c2@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-06 20:45:58 +00:00
..
atom ASoC: intel: atom: Use managed buffer allocation 2019-12-11 16:43:32 +00:00
baytrail ASoC: intel: baytrail: Use managed buffer allocation 2019-12-11 16:43:33 +00:00
boards ASoC: Intel: sof_rt5682: Ignore the speaker amp when there isn't one. 2020-01-06 20:45:58 +00:00
common ASoC: intel: Add Broadwell rt5650 machine driver 2019-12-18 20:02:30 +00:00
haswell ASoC: intel: haswell: Use managed buffer allocation 2019-12-11 16:43:33 +00:00
skylake ASoC: intel: skylake: Remove superfluous bus ops 2019-12-17 12:34:44 +00:00
Kconfig ASoC: Updates for v5.5 2019-11-07 14:12:30 +01:00
Makefile ASoC: Intel: Fix Kconfig with top-level selector 2018-01-08 16:18:48 +00:00