All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
@ 2020-12-16  4:16 ` Chris Chiu
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Chiu @ 2020-12-16  4:16 UTC (permalink / raw)
  To: cezary.rojewski, pierre-louis.bossart, yang.jie
  Cc: alsa-devel, linux-kernel, linux, Chris Chiu

DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add
quirks to select the correct input map, jack-detect options to enable
jack sensing and internal/headset microphones.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 688b5e0a49e3..9df09e26b05a 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 					BYT_RT5651_SSP0_AIF1 |
 					BYT_RT5651_MONO_SPEAKER),
 	},
+	{
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
+		},
+		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1),
+	},
 	{}
 };
 
-- 
2.20.1


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

* [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
@ 2020-12-16  4:16 ` Chris Chiu
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Chiu @ 2020-12-16  4:16 UTC (permalink / raw)
  To: cezary.rojewski, pierre-louis.bossart, yang.jie
  Cc: alsa-devel, Chris Chiu, linux-kernel, linux

DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add
quirks to select the correct input map, jack-detect options to enable
jack sensing and internal/headset microphones.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
---
 sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 688b5e0a49e3..9df09e26b05a 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
 					BYT_RT5651_SSP0_AIF1 |
 					BYT_RT5651_MONO_SPEAKER),
 	},
+	{
+		.callback = byt_rt5651_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
+		},
+		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1),
+	},
 	{}
 };
 
-- 
2.20.1


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

* Re: [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
  2020-12-16  4:16 ` Chris Chiu
@ 2020-12-22 15:07   ` Chris Chiu
  -1 siblings, 0 replies; 8+ messages in thread
From: Chris Chiu @ 2020-12-22 15:07 UTC (permalink / raw)
  To: cezary.rojewski, Pierre-Louis Bossart, yang.jie
  Cc: alsa-devel, Linux Kernel, linux

On Wed, Dec 16, 2020 at 12:18 PM Chris Chiu <chiu@endlessos.org> wrote:
>
> DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add
> quirks to select the correct input map, jack-detect options to enable
> jack sensing and internal/headset microphones.
>
> Signed-off-by: Chris Chiu <chiu@endlessos.org>
> ---
>  sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 688b5e0a49e3..9df09e26b05a 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
>                                         BYT_RT5651_SSP0_AIF1 |
>                                         BYT_RT5651_MONO_SPEAKER),
>         },
> +       {
> +               .callback = byt_rt5651_quirk_cb,
> +               .matches = {
> +                       DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
> +                       DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
> +               },
> +               .driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1),
> +       },
>         {}
>  };
>
> --
> 2.20.1
>

Gentle ping. Cheers.

Chris

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

* Re: [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
@ 2020-12-22 15:07   ` Chris Chiu
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Chiu @ 2020-12-22 15:07 UTC (permalink / raw)
  To: cezary.rojewski, Pierre-Louis Bossart, yang.jie
  Cc: alsa-devel, Linux Kernel, linux

On Wed, Dec 16, 2020 at 12:18 PM Chris Chiu <chiu@endlessos.org> wrote:
>
> DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add
> quirks to select the correct input map, jack-detect options to enable
> jack sensing and internal/headset microphones.
>
> Signed-off-by: Chris Chiu <chiu@endlessos.org>
> ---
>  sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 688b5e0a49e3..9df09e26b05a 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
>                                         BYT_RT5651_SSP0_AIF1 |
>                                         BYT_RT5651_MONO_SPEAKER),
>         },
> +       {
> +               .callback = byt_rt5651_quirk_cb,
> +               .matches = {
> +                       DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
> +                       DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
> +               },
> +               .driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1),
> +       },
>         {}
>  };
>
> --
> 2.20.1
>

Gentle ping. Cheers.

Chris

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

* Re: [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
  2020-12-16  4:16 ` Chris Chiu
@ 2021-01-11 17:05   ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2021-01-11 17:05 UTC (permalink / raw)
  To: Chris Chiu, cezary.rojewski, yang.jie
  Cc: alsa-devel, linux-kernel, linux, Mark Brown, Takashi Iwai, Hans de Goede



On 12/15/20 10:16 PM, Chris Chiu wrote:
> DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add
> quirks to select the correct input map, jack-detect options to enable
> jack sensing and internal/headset microphones.
> 
> Signed-off-by: Chris Chiu <chiu@endlessos.org>

You probably need to re-send and CC: maintainers (Mark Brown, Takashi 
Iwai) and Hans de Goede who's been supporting all those quirks.

I don't think the changes below are fully correct, most quirks start with		
.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |

which e.g. enables the MCLK and overcurrent handling.

I wonder if what you need is

.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS | BYT_RT5651_IN1_IN2_MAP)

> ---
>   sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 688b5e0a49e3..9df09e26b05a 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
>   					BYT_RT5651_SSP0_AIF1 |
>   					BYT_RT5651_MONO_SPEAKER),
>   	},
> +	{
> +		.callback = byt_rt5651_quirk_cb,
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
> +		},
> +		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1),
> +	},
>   	{}
>   };
>   
> 

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

* Re: [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
@ 2021-01-11 17:05   ` Pierre-Louis Bossart
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2021-01-11 17:05 UTC (permalink / raw)
  To: Chris Chiu, cezary.rojewski, yang.jie
  Cc: alsa-devel, Takashi Iwai, linux-kernel, linux, Hans de Goede, Mark Brown



On 12/15/20 10:16 PM, Chris Chiu wrote:
> DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add
> quirks to select the correct input map, jack-detect options to enable
> jack sensing and internal/headset microphones.
> 
> Signed-off-by: Chris Chiu <chiu@endlessos.org>

You probably need to re-send and CC: maintainers (Mark Brown, Takashi 
Iwai) and Hans de Goede who's been supporting all those quirks.

I don't think the changes below are fully correct, most quirks start with		
.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |

which e.g. enables the MCLK and overcurrent handling.

I wonder if what you need is

.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS | BYT_RT5651_IN1_IN2_MAP)

> ---
>   sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 688b5e0a49e3..9df09e26b05a 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
>   					BYT_RT5651_SSP0_AIF1 |
>   					BYT_RT5651_MONO_SPEAKER),
>   	},
> +	{
> +		.callback = byt_rt5651_quirk_cb,
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
> +		},
> +		.driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1),
> +	},
>   	{}
>   };
>   
> 

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

* Re: [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
  2021-01-11 17:05   ` Pierre-Louis Bossart
@ 2021-01-11 21:24     ` Hans de Goede
  -1 siblings, 0 replies; 8+ messages in thread
From: Hans de Goede @ 2021-01-11 21:24 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Chris Chiu, cezary.rojewski, yang.jie
  Cc: alsa-devel, linux-kernel, linux, Mark Brown, Takashi Iwai

Hi,

On 1/11/21 6:05 PM, Pierre-Louis Bossart wrote:
> 
> 
> On 12/15/20 10:16 PM, Chris Chiu wrote:
>> DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add
>> quirks to select the correct input map, jack-detect options to enable
>> jack sensing and internal/headset microphones.
>>
>> Signed-off-by: Chris Chiu <chiu@endlessos.org>
> 
> You probably need to re-send and CC: maintainers (Mark Brown, Takashi Iwai) and Hans de Goede who's been supporting all those quirks.
> 
> I don't think the changes below are fully correct, most quirks start with       
> .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
> 
> which e.g. enables the MCLK and overcurrent handling.
> 
> I wonder if what you need is
> 
> .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS | BYT_RT5651_IN1_IN2_MAP)

Ack, BYT_RT5651_DEFAULT_QUIRKS is:

#define BYT_RT5651_DEFAULT_QUIRKS       (BYT_RT5651_MCLK_EN | \
                                         BYT_RT5651_JD1_1   | \
                                         BYT_RT5651_OVCD_TH_2000UA | \
                                         BYT_RT5651_OVCD_SF_0P75)

So compared to the quirk from the original patch that will add:

BYT_RT5651_MCLK_EN
BYT_RT5651_OVCD_TH_2000UA
BYT_RT5651_OVCD_SF_0P75

Since you have working jack-detect you will definitely want the latter 2
which will make headset vs headphones detection work and will add
button-press detection for headsets.

BYT_RT5651_MCLK_EN is also a quirk which you almost always want,
the sole exception is boards where the mclk is not connected which
are very rare. Boards where the mclk is not connected are easy to
spot, since they will not work at all when setting BYT_RT5651_MCLK_EN,
so if things work with BYT_RT5651_DEFAULT_QUIRKS then setting
BYT_RT5651_MCLK_EN is the right thing to do.

Tl;DR: use (BYT_RT5651_DEFAULT_QUIRKS | BYT_RT5651_IN1_IN2_MAP) as
Pierre-Louis suggests.

Regards,

Hans






> 
>> ---
>>   sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
>> index 688b5e0a49e3..9df09e26b05a 100644
>> --- a/sound/soc/intel/boards/bytcr_rt5651.c
>> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
>> @@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
>>                       BYT_RT5651_SSP0_AIF1 |
>>                       BYT_RT5651_MONO_SPEAKER),
>>       },
>> +    {
>> +        .callback = byt_rt5651_quirk_cb,
>> +        .matches = {
>> +            DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
>> +            DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
>> +        },
>> +        .driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1),
>> +    },
>>       {}
>>   };
>>  
> 


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

* Re: [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
@ 2021-01-11 21:24     ` Hans de Goede
  0 siblings, 0 replies; 8+ messages in thread
From: Hans de Goede @ 2021-01-11 21:24 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Chris Chiu, cezary.rojewski, yang.jie
  Cc: Takashi Iwai, alsa-devel, Mark Brown, linux-kernel, linux

Hi,

On 1/11/21 6:05 PM, Pierre-Louis Bossart wrote:
> 
> 
> On 12/15/20 10:16 PM, Chris Chiu wrote:
>> DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add
>> quirks to select the correct input map, jack-detect options to enable
>> jack sensing and internal/headset microphones.
>>
>> Signed-off-by: Chris Chiu <chiu@endlessos.org>
> 
> You probably need to re-send and CC: maintainers (Mark Brown, Takashi Iwai) and Hans de Goede who's been supporting all those quirks.
> 
> I don't think the changes below are fully correct, most quirks start with       
> .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
> 
> which e.g. enables the MCLK and overcurrent handling.
> 
> I wonder if what you need is
> 
> .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS | BYT_RT5651_IN1_IN2_MAP)

Ack, BYT_RT5651_DEFAULT_QUIRKS is:

#define BYT_RT5651_DEFAULT_QUIRKS       (BYT_RT5651_MCLK_EN | \
                                         BYT_RT5651_JD1_1   | \
                                         BYT_RT5651_OVCD_TH_2000UA | \
                                         BYT_RT5651_OVCD_SF_0P75)

So compared to the quirk from the original patch that will add:

BYT_RT5651_MCLK_EN
BYT_RT5651_OVCD_TH_2000UA
BYT_RT5651_OVCD_SF_0P75

Since you have working jack-detect you will definitely want the latter 2
which will make headset vs headphones detection work and will add
button-press detection for headsets.

BYT_RT5651_MCLK_EN is also a quirk which you almost always want,
the sole exception is boards where the mclk is not connected which
are very rare. Boards where the mclk is not connected are easy to
spot, since they will not work at all when setting BYT_RT5651_MCLK_EN,
so if things work with BYT_RT5651_DEFAULT_QUIRKS then setting
BYT_RT5651_MCLK_EN is the right thing to do.

Tl;DR: use (BYT_RT5651_DEFAULT_QUIRKS | BYT_RT5651_IN1_IN2_MAP) as
Pierre-Louis suggests.

Regards,

Hans






> 
>> ---
>>   sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
>> index 688b5e0a49e3..9df09e26b05a 100644
>> --- a/sound/soc/intel/boards/bytcr_rt5651.c
>> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
>> @@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
>>                       BYT_RT5651_SSP0_AIF1 |
>>                       BYT_RT5651_MONO_SPEAKER),
>>       },
>> +    {
>> +        .callback = byt_rt5651_quirk_cb,
>> +        .matches = {
>> +            DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
>> +            DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
>> +        },
>> +        .driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1),
>> +    },
>>       {}
>>   };
>>  
> 


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

end of thread, other threads:[~2021-01-11 21:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16  4:16 [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300 Chris Chiu
2020-12-16  4:16 ` Chris Chiu
2020-12-22 15:07 ` Chris Chiu
2020-12-22 15:07   ` Chris Chiu
2021-01-11 17:05 ` Pierre-Louis Bossart
2021-01-11 17:05   ` Pierre-Louis Bossart
2021-01-11 21:24   ` Hans de Goede
2021-01-11 21:24     ` Hans de Goede

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.