diff mbox series

[3/3] ASoC: Intel: bytcr_rt5640: Add quirk for the Mele PCG03 Mini PC

Message ID 20210109210119.159032-4-hdegoede@redhat.com (mailing list archive)
State Accepted
Commit df33032146baefb29d7e61193738f39e454917e3
Headers show
Series ASoC: Intel: bytcr_rt5640: Add support for devices with only a headphone jack (no speakers/mic) | expand

Commit Message

Hans de Goede Jan. 9, 2021, 9:01 p.m. UTC
Add a quirk for the Mele PCG03 Mini PC, being a Mini PC this device
has no speakers and no internal microphone.

To make matters worse the speaker output pins are shorted (to gnd or
to each other?) and SPKVDD is provided. So trying to output sound on the
speakers leads to shorting SPKVDD, this leads to a power dip after
which the codec is an unknown state. Sometimes it drops of the i2c
bus, sometimes it does still respond to i2c transfers, but is otherwise
not functional. TL;DR: trying to use the speaker outputs on this model
is BAD.

Besides not having speakers / an internal mic, this is a Bay Trail CR
device without a CHAN package in ACPI, so we default to SSP0-AIF2 as
codec connection. But the device is actually using SSP0-AIF1, so we
need to quirk that too.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/intel/boards/bytcr_rt5640.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 48d781faded1..2dee84578b90 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -620,6 +620,15 @@  static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 					BYT_RT5640_SSP0_AIF1 |
 					BYT_RT5640_MCLK_EN),
 	},
+	{	/* Mele PCG03 Mini PC */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Mini PC"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Mini PC"),
+		},
+		.driver_data = (void *)(BYT_RT5640_NO_INTERNAL_MIC_MAP |
+					BYT_RT5640_NO_SPEAKERS |
+					BYT_RT5640_SSP0_AIF1),
+	},
 	{	/* MPMAN Converter 9, similar hw as the I.T.Works TW891 2-in-1 */
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),