Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] ASoC: Intel: Baytrail: add quirk for Aegex 10 (RU2) tablet
@ 2019-05-30 18:52 Kovács Tamás
  2019-05-30 20:44 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 2+ messages in thread
From: Kovács Tamás @ 2019-05-30 18:52 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, pierre-louis.bossart

This tablet has an incorrect acpi identifier just like
Thinkpad10 tablet, which is why it is trying to load the RT5640 driver
instead of the RT5762 driver. The RT5640 driver, on the other hand, checks
the hardware ID, so no driver are loaded during boot. This fix resolves to
load the RT5672 driver on this tablet during boot. It also provides the
correct IO configuration, like the jack detect mode 3, for 1.8V pullup. I
would like to thank Pierre-Louis Bossart for helping with this patch.

---
 sound/soc/codecs/rt5670.c                     | 14 +-------------
 .../intel/common/soc-acpi-intel-byt-match.c   | 19 +------------------
 2 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index 37cce0439568..9a037108b1ae 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -2882,18 +2882,6 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
 						 RT5670_DEV_GPIO |
 						 RT5670_JD_MODE3),
 	},
-	{
-		.callback = rt5670_quirk_cb,
-		.ident = "Aegex 10 tablet (RU2)",
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
-			DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
-		},
-		.driver_data = (unsigned long *)(RT5670_DMIC_EN |
-						 RT5670_DMIC2_INR |
-						 RT5670_DEV_GPIO |
-						 RT5670_JD_MODE3),
-	},
 	{}
 };
 
diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
index cfed58c23e0b..fe812a909db4 100644
--- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
@@ -22,7 +22,6 @@ static unsigned long byt_machine_id;
 
 #define BYT_THINKPAD_10  1
 #define BYT_POV_P1006W   2
-#define BYT_AEGEX_10     3
 
 static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
 {
@@ -36,12 +35,6 @@ static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id)
 	return 1;
 }
 
-static int byt_aegex10_quirk_cb(const struct dmi_system_id *id)
-{
-	byt_machine_id = BYT_AEGEX_10;
-	return 1;
-}
-
 static const struct dmi_system_id byt_table[] = {
 	{
 		.callback = byt_thinkpad10_quirk_cb,
@@ -82,18 +75,9 @@ static const struct dmi_system_id byt_table[] = {
 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
 		},
 	},
-	{
-		/* Aegex 10 tablet (RU2) */
-		.callback = byt_aegex10_quirk_cb,
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
-			DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
-		},
-	},
 	{ }
 };
 
-/* The Thinkapd 10 and Aegex 10 tablets have the same ID problem */
 static struct snd_soc_acpi_mach byt_thinkpad_10 = {
 	.id = "10EC5640",
 	.drv_name = "cht-bsw-rt5672",
@@ -120,7 +104,6 @@ static struct snd_soc_acpi_mach *byt_quirk(void *arg)
 
 	switch (byt_machine_id) {
 	case BYT_THINKPAD_10:
-	case BYT_AEGEX_10:
 		return &byt_thinkpad_10;
 	case BYT_POV_P1006W:
 		return &byt_pov_p1006w;

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

* Re: [PATCH V2] ASoC: Intel: Baytrail: add quirk for Aegex 10 (RU2) tablet
  2019-05-30 18:52 [PATCH V2] ASoC: Intel: Baytrail: add quirk for Aegex 10 (RU2) tablet Kovács Tamás
@ 2019-05-30 20:44 ` Pierre-Louis Bossart
  0 siblings, 0 replies; 2+ messages in thread
From: Pierre-Louis Bossart @ 2019-05-30 20:44 UTC (permalink / raw)
  To: Kovács Tamás, alsa-devel; +Cc: tiwai, broonie



On 5/30/19 1:52 PM, Kovács Tamás wrote:
> This tablet has an incorrect acpi identifier just like
> Thinkpad10 tablet, which is why it is trying to load the RT5640 driver
> instead of the RT5762 driver. The RT5640 driver, on the other hand, checks
> the hardware ID, so no driver are loaded during boot. This fix resolves to
> load the RT5672 driver on this tablet during boot. It also provides the
> correct IO configuration, like the jack detect mode 3, for 1.8V pullup. I
> would like to thank Pierre-Louis Bossart for helping with this patch.

you're almost done :-)

We need to have you Signed-off-by tag, it's a requirement for kernel 
patches (other open-source programs have the same expectations).

see 
https://www.kernel.org/doc/html/latest/process/submitting-patches.html 
section 11.

You can add this with 'git commit --amend --signoff'

and the diffs to be inverted (you removed lines instead of adding them).

usually you generate the patch with git format-patch -1
and then run ./scripts/checkpatch.pl --strict 0001*.patch

> 
> ---
>   sound/soc/codecs/rt5670.c                     | 14 +-------------
>   .../intel/common/soc-acpi-intel-byt-match.c   | 19 +------------------
>   2 files changed, 2 insertions(+), 31 deletions(-)
> 
> diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
> index 37cce0439568..9a037108b1ae 100644
> --- a/sound/soc/codecs/rt5670.c
> +++ b/sound/soc/codecs/rt5670.c
> @@ -2882,18 +2882,6 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
>   						 RT5670_DEV_GPIO |
>   						 RT5670_JD_MODE3),
>   	},
> -	{
> -		.callback = rt5670_quirk_cb,
> -		.ident = "Aegex 10 tablet (RU2)",
> -		.matches = {
> -			DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
> -			DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
> -		},
> -		.driver_data = (unsigned long *)(RT5670_DMIC_EN |
> -						 RT5670_DMIC2_INR |
> -						 RT5670_DEV_GPIO |
> -						 RT5670_JD_MODE3),
> -	},
>   	{}
>   };
>   
> diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
> index cfed58c23e0b..fe812a909db4 100644
> --- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c
> +++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
> @@ -22,7 +22,6 @@ static unsigned long byt_machine_id;
>   
>   #define BYT_THINKPAD_10  1
>   #define BYT_POV_P1006W   2
> -#define BYT_AEGEX_10     3
>   
>   static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
>   {
> @@ -36,12 +35,6 @@ static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id)
>   	return 1;
>   }
>   
> -static int byt_aegex10_quirk_cb(const struct dmi_system_id *id)
> -{
> -	byt_machine_id = BYT_AEGEX_10;
> -	return 1;
> -}
> -
>   static const struct dmi_system_id byt_table[] = {
>   	{
>   		.callback = byt_thinkpad10_quirk_cb,
> @@ -82,18 +75,9 @@ static const struct dmi_system_id byt_table[] = {
>   			DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
>   		},
>   	},
> -	{
> -		/* Aegex 10 tablet (RU2) */
> -		.callback = byt_aegex10_quirk_cb,
> -		.matches = {
> -			DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
> -			DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
> -		},
> -	},
>   	{ }
>   };
>   
> -/* The Thinkapd 10 and Aegex 10 tablets have the same ID problem */
>   static struct snd_soc_acpi_mach byt_thinkpad_10 = {
>   	.id = "10EC5640",
>   	.drv_name = "cht-bsw-rt5672",
> @@ -120,7 +104,6 @@ static struct snd_soc_acpi_mach *byt_quirk(void *arg)
>   
>   	switch (byt_machine_id) {
>   	case BYT_THINKPAD_10:
> -	case BYT_AEGEX_10:
>   		return &byt_thinkpad_10;
>   	case BYT_POV_P1006W:
>   		return &byt_pov_p1006w;
> 
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2019-05-30 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-30 18:52 [PATCH V2] ASoC: Intel: Baytrail: add quirk for Aegex 10 (RU2) tablet Kovács Tamás
2019-05-30 20:44 ` Pierre-Louis Bossart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox