All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise
@ 2024-02-11 21:27 Hans de Goede
  2024-02-11 21:27 ` [PATCH 2/2] ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8 Hans de Goede
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hans de Goede @ 2024-02-11 21:27 UTC (permalink / raw)
  To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
	Peter Ujfalusi, Mark Brown
  Cc: Hans de Goede, Oder Chiou, alsa-devel

The DMI strings used for the LattePanda board DMI quirks are very generic.

Using the dmidecode database from https://linux-hardware.org/ shows
that the chosen DMI strings also match the following 2 laptops
which also have a rt5645 codec:

Insignia NS-P11W7100 https://linux-hardware.org/?computer=E092FFF8BA04
Insignia NS-P10W8100 https://linux-hardware.org/?computer=AFB6C0BF7934

All 4 hw revisions of the LattePanda board have "S70CR" in their BIOS
version DMI strings:

DF-BI-7-S70CR100-*
DF-BI-7-S70CR110-*
DF-BI-7-S70CR200-*
LP-BS-7-S70CR700-*

See e.g. https://linux-hardware.org/?computer=D98250A817C0

Add a partial (non exact) DMI match on this string to make the LattePanda
board DMI match more precise to avoid false-positive matches.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/codecs/rt5645.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 5150d6ee3748..b3865e3c3259 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3837,6 +3837,16 @@ static const struct dmi_system_id dmi_platform_data[] = {
 		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
 		  DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
 		  DMI_EXACT_MATCH(DMI_BOARD_VERSION, "Default string"),
+		  /*
+		   * Above strings are too generic, LattePanda BIOS versions for
+		   * all 4 hw revisions are:
+		   * DF-BI-7-S70CR100-*
+		   * DF-BI-7-S70CR110-*
+		   * DF-BI-7-S70CR200-*
+		   * LP-BS-7-S70CR700-*
+		   * Do a partial match for S70CR to avoid false positive matches.
+		   */
+		  DMI_MATCH(DMI_BIOS_VERSION, "S70CR"),
 		},
 		.driver_data = (void *)&lattepanda_board_platform_data,
 	},
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8
  2024-02-11 21:27 [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise Hans de Goede
@ 2024-02-11 21:27 ` Hans de Goede
  2024-02-12 14:51 ` [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise Pierre-Louis Bossart
  2024-02-12 15:32 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2024-02-11 21:27 UTC (permalink / raw)
  To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
	Peter Ujfalusi, Mark Brown
  Cc: Hans de Goede, Oder Chiou, alsa-devel

The MeeGoPad T8 uses the standard rt5645 jd_mode=3 setting for jack-detect,
but the used jack connector outputs an inverted jack-detect signal.

Add a DMI quirk for this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/codecs/rt5645.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index b3865e3c3259..9672d1bac4e1 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3692,6 +3692,11 @@ static const struct rt5645_platform_data jd_mode3_monospk_platform_data = {
 	.mono_speaker = true,
 };
 
+static const struct rt5645_platform_data jd_mode3_inv_data = {
+	.jd_mode = 3,
+	.inv_jd1_1 = true,
+};
+
 static const struct rt5645_platform_data jd_mode3_platform_data = {
 	.jd_mode = 3,
 };
@@ -3881,6 +3886,16 @@ static const struct dmi_system_id dmi_platform_data[] = {
 		},
 		.driver_data = (void *)&intel_braswell_platform_data,
 	},
+	{
+		.ident = "Meegopad T08",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
+			DMI_MATCH(DMI_BOARD_NAME, "T3 MRD"),
+			DMI_MATCH(DMI_BOARD_VERSION, "V1.1"),
+		},
+		.driver_data = (void *)&jd_mode3_inv_data,
+	},
 	{ }
 };
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise
  2024-02-11 21:27 [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise Hans de Goede
  2024-02-11 21:27 ` [PATCH 2/2] ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8 Hans de Goede
@ 2024-02-12 14:51 ` Pierre-Louis Bossart
  2024-02-12 15:32 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Pierre-Louis Bossart @ 2024-02-12 14:51 UTC (permalink / raw)
  To: Hans de Goede, Cezary Rojewski, Liam Girdwood, Peter Ujfalusi,
	Mark Brown
  Cc: Oder Chiou, alsa-devel



On 2/11/24 15:27, Hans de Goede wrote:
> The DMI strings used for the LattePanda board DMI quirks are very generic.
> 
> Using the dmidecode database from https://linux-hardware.org/ shows
> that the chosen DMI strings also match the following 2 laptops
> which also have a rt5645 codec:
> 
> Insignia NS-P11W7100 https://linux-hardware.org/?computer=E092FFF8BA04
> Insignia NS-P10W8100 https://linux-hardware.org/?computer=AFB6C0BF7934
> 
> All 4 hw revisions of the LattePanda board have "S70CR" in their BIOS
> version DMI strings:
> 
> DF-BI-7-S70CR100-*
> DF-BI-7-S70CR110-*
> DF-BI-7-S70CR200-*
> LP-BS-7-S70CR700-*
> 
> See e.g. https://linux-hardware.org/?computer=D98250A817C0
> 
> Add a partial (non exact) DMI match on this string to make the LattePanda
> board DMI match more precise to avoid false-positive matches.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

For patch1 and 2

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise
  2024-02-11 21:27 [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise Hans de Goede
  2024-02-11 21:27 ` [PATCH 2/2] ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8 Hans de Goede
  2024-02-12 14:51 ` [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise Pierre-Louis Bossart
@ 2024-02-12 15:32 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-02-12 15:32 UTC (permalink / raw)
  To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
	Peter Ujfalusi, Hans de Goede
  Cc: Oder Chiou, alsa-devel

On Sun, 11 Feb 2024 22:27:35 +0100, Hans de Goede wrote:
> The DMI strings used for the LattePanda board DMI quirks are very generic.
> 
> Using the dmidecode database from https://linux-hardware.org/ shows
> that the chosen DMI strings also match the following 2 laptops
> which also have a rt5645 codec:
> 
> Insignia NS-P11W7100 https://linux-hardware.org/?computer=E092FFF8BA04
> Insignia NS-P10W8100 https://linux-hardware.org/?computer=AFB6C0BF7934
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: rt5645: Make LattePanda board DMI match more precise
      commit: 551539a8606e28cb2a130f8ef3e9834235b456c4
[2/2] ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8
      commit: d6755a53b8dde434220a164c756190345772843a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-12 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-11 21:27 [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise Hans de Goede
2024-02-11 21:27 ` [PATCH 2/2] ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8 Hans de Goede
2024-02-12 14:51 ` [PATCH 1/2] ASoC: rt5645: Make LattePanda board DMI match more precise Pierre-Louis Bossart
2024-02-12 15:32 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.