alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks
@ 2020-11-18 12:15 Hans de Goede
  2020-11-18 17:21 ` Pierre-Louis Bossart
  2020-11-19 17:09 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2020-11-18 12:15 UTC (permalink / raw)
  To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
	Mark Brown
  Cc: Hans de Goede, alsa-devel

The HP Pavilion x2 Detachable line comes in many variants:

1. Bay Trail SoC + AXP288 PMIC, Micro-USB charging (10-k010nz, ...)
   DMI_SYS_VENDOR: "Hewlett-Packard"
   DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable PC 10"
   DMI_BOARD_NAME: "8021"

2. Bay Trail SoC + AXP288 PMIC, Type-C charging (10-n000nd, 10-n010nl, ...)
   DMI_SYS_VENDOR: "Hewlett-Packard"
   DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable"
   DMI_BOARD_NAME: "815D"

3. Cherry Trail SoC + AXP288 PMIC, Type-C charging (10-n101ng, ...)
   DMI_SYS_VENDOR: "HP"
   DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable"
   DMI_BOARD_NAME: "813E"

4. Cherry Trail SoC + TI PMIC, Type-C charging (10-p002nd, 10-p018wm, ...)
   DMI_SYS_VENDOR: "HP"
   DMI_PRODUCT_NAME: "HP x2 Detachable 10-p0XX"
   DMI_BOARD_NAME: "827C"

5. Cherry Trail SoC + TI PMIC, Type-C charging (x2-210-g2, ...)
   DMI_SYS_VENDOR: "HP"
   DMI_PRODUCT_NAME: "HP x2 210 G2"
   DMI_BOARD_NAME: "82F4"

Variant 1 needs the exact same quirk as variant 2, so relax the DMI check
for the existing quirk a bit so that it matches both variant 1 and 2
(note the other variants will still not match).

Variant 2 already has an existing quirk (which now also matches variant 1)

Variant 3 uses a cx2072x codec, so is not applicable here.

Variant 4 almost works with the defaults, but it also needs a quirk to
fix jack-detection, add a new quirk for this.

Variant 5 does use a RT5640 codec (based on old dmesg output), but was
otherwise not tested, keep using the defaults for this variant.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1896924
Fixes: ec8e8418ff7d ("ASoC: Intel: bytcr_rt5640: Add quirks for various devices")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/intel/boards/bytcr_rt5640.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 9dadf6561444..f790514a147d 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -520,10 +520,10 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 		.driver_data = (void *)(BYT_RT5640_IN1_MAP |
 					BYT_RT5640_MCLK_EN),
 	},
-	{	/* HP Pavilion x2 10-n000nd */
+	{	/* HP Pavilion x2 10-k0XX, 10-n0XX */
 		.matches = {
-			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP Pavilion x2 Detachable"),
+			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion x2 Detachable"),
 		},
 		.driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
 					BYT_RT5640_JD_SRC_JD2_IN4N |
@@ -532,6 +532,17 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 					BYT_RT5640_SSP0_AIF1 |
 					BYT_RT5640_MCLK_EN),
 	},
+	{	/* HP Pavilion x2 10-p0XX */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP x2 Detachable 10-p0XX"),
+		},
+		.driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+					BYT_RT5640_JD_SRC_JD1_IN4P |
+					BYT_RT5640_OVCD_TH_1500UA |
+					BYT_RT5640_OVCD_SF_0P75 |
+					BYT_RT5640_MCLK_EN),
+	},
 	{	/* HP Stream 7 */
 		.matches = {
 			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-- 
2.28.0


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

* Re: [PATCH] ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks
  2020-11-18 12:15 [PATCH] ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks Hans de Goede
@ 2020-11-18 17:21 ` Pierre-Louis Bossart
  2020-11-19 17:09 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2020-11-18 17:21 UTC (permalink / raw)
  To: Hans de Goede, Cezary Rojewski, Liam Girdwood, Jie Yang, Mark Brown
  Cc: alsa-devel



On 11/18/20 6:15 AM, Hans de Goede wrote:
> The HP Pavilion x2 Detachable line comes in many variants:
> 
> 1. Bay Trail SoC + AXP288 PMIC, Micro-USB charging (10-k010nz, ...)
>     DMI_SYS_VENDOR: "Hewlett-Packard"
>     DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable PC 10"
>     DMI_BOARD_NAME: "8021"
> 
> 2. Bay Trail SoC + AXP288 PMIC, Type-C charging (10-n000nd, 10-n010nl, ...)
>     DMI_SYS_VENDOR: "Hewlett-Packard"
>     DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable"
>     DMI_BOARD_NAME: "815D"
> 
> 3. Cherry Trail SoC + AXP288 PMIC, Type-C charging (10-n101ng, ...)
>     DMI_SYS_VENDOR: "HP"
>     DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable"
>     DMI_BOARD_NAME: "813E"
> 
> 4. Cherry Trail SoC + TI PMIC, Type-C charging (10-p002nd, 10-p018wm, ...)
>     DMI_SYS_VENDOR: "HP"
>     DMI_PRODUCT_NAME: "HP x2 Detachable 10-p0XX"
>     DMI_BOARD_NAME: "827C"
> 
> 5. Cherry Trail SoC + TI PMIC, Type-C charging (x2-210-g2, ...)
>     DMI_SYS_VENDOR: "HP"
>     DMI_PRODUCT_NAME: "HP x2 210 G2"
>     DMI_BOARD_NAME: "82F4"
> 
> Variant 1 needs the exact same quirk as variant 2, so relax the DMI check
> for the existing quirk a bit so that it matches both variant 1 and 2
> (note the other variants will still not match).
> 
> Variant 2 already has an existing quirk (which now also matches variant 1)
> 
> Variant 3 uses a cx2072x codec, so is not applicable here.
> 
> Variant 4 almost works with the defaults, but it also needs a quirk to
> fix jack-detection, add a new quirk for this.
> 
> Variant 5 does use a RT5640 codec (based on old dmesg output), but was
> otherwise not tested, keep using the defaults for this variant.
> 
> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1896924
> Fixes: ec8e8418ff7d ("ASoC: Intel: bytcr_rt5640: Add quirks for various devices")
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Thank you Hans! I honestly don't know how you managed to keep track of 
so many hardware variants.

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

> ---
>   sound/soc/intel/boards/bytcr_rt5640.c | 17 ++++++++++++++---
>   1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
> index 9dadf6561444..f790514a147d 100644
> --- a/sound/soc/intel/boards/bytcr_rt5640.c
> +++ b/sound/soc/intel/boards/bytcr_rt5640.c
> @@ -520,10 +520,10 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
>   		.driver_data = (void *)(BYT_RT5640_IN1_MAP |
>   					BYT_RT5640_MCLK_EN),
>   	},
> -	{	/* HP Pavilion x2 10-n000nd */
> +	{	/* HP Pavilion x2 10-k0XX, 10-n0XX */
>   		.matches = {
> -			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
> -			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP Pavilion x2 Detachable"),
> +			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion x2 Detachable"),
>   		},
>   		.driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
>   					BYT_RT5640_JD_SRC_JD2_IN4N |
> @@ -532,6 +532,17 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
>   					BYT_RT5640_SSP0_AIF1 |
>   					BYT_RT5640_MCLK_EN),
>   	},
> +	{	/* HP Pavilion x2 10-p0XX */
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "HP x2 Detachable 10-p0XX"),
> +		},
> +		.driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
> +					BYT_RT5640_JD_SRC_JD1_IN4P |
> +					BYT_RT5640_OVCD_TH_1500UA |
> +					BYT_RT5640_OVCD_SF_0P75 |
> +					BYT_RT5640_MCLK_EN),
> +	},
>   	{	/* HP Stream 7 */
>   		.matches = {
>   			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
> 

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

* Re: [PATCH] ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks
  2020-11-18 12:15 [PATCH] ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks Hans de Goede
  2020-11-18 17:21 ` Pierre-Louis Bossart
@ 2020-11-19 17:09 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-11-19 17:09 UTC (permalink / raw)
  To: Jie Yang, Liam Girdwood, Cezary Rojewski, Pierre-Louis Bossart,
	Hans de Goede
  Cc: alsa-devel

On Wed, 18 Nov 2020 13:15:15 +0100, Hans de Goede wrote:
> The HP Pavilion x2 Detachable line comes in many variants:
> 
> 1. Bay Trail SoC + AXP288 PMIC, Micro-USB charging (10-k010nz, ...)
>    DMI_SYS_VENDOR: "Hewlett-Packard"
>    DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable PC 10"
>    DMI_BOARD_NAME: "8021"
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks
      commit: fbdae7d6d04d2db36c687723920f612e93b2cbda

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] 3+ messages in thread

end of thread, other threads:[~2020-11-19 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 12:15 [PATCH] ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks Hans de Goede
2020-11-18 17:21 ` Pierre-Louis Bossart
2020-11-19 17:09 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).