All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Chris Chiu <chiu@endlessos.org>,
	cezary.rojewski@intel.com, yang.jie@linux.intel.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	linux@endlessos.org, Mark Brown <broonie@kernel.org>,
	Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
Date: Mon, 11 Jan 2021 22:24:54 +0100	[thread overview]
Message-ID: <835f8b2e-5e9a-b8db-d126-d0cd5f0ec075@redhat.com> (raw)
In-Reply-To: <8d4f7c48-cb3e-a868-3d48-fe63a3113ea1@linux.intel.com>

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),
>> +    },
>>       {}
>>   };
>>  
> 


WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Chris Chiu <chiu@endlessos.org>,
	cezary.rojewski@intel.com, yang.jie@linux.intel.com
Cc: Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, linux@endlessos.org
Subject: Re: [PATCH] ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
Date: Mon, 11 Jan 2021 22:24:54 +0100	[thread overview]
Message-ID: <835f8b2e-5e9a-b8db-d126-d0cd5f0ec075@redhat.com> (raw)
In-Reply-To: <8d4f7c48-cb3e-a868-3d48-fe63a3113ea1@linux.intel.com>

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),
>> +    },
>>       {}
>>   };
>>  
> 


  reply	other threads:[~2021-01-11 21:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-01-11 21:24     ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=835f8b2e-5e9a-b8db-d126-d0cd5f0ec075@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=chiu@endlessos.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@endlessos.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yang.jie@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.