2022-04-27 09:04:09

by Sasha Levin

[permalink] [raw]
Subject: [PATCH AUTOSEL 5.17 06/22] ASoC: Intel: sof_es8336: Add a quirk for Huawei Matebook D15

From: Mauro Carvalho Chehab <[email protected]>

[ Upstream commit c7cb4717f641db68e8117635bfcf62a9c27dc8d3 ]

Based on experimental tests, Huawei Matebook D15 actually uses
both gpio0 and gpio1: the first one controls the speaker, while
the other one controls the headphone.

Also, the headset is mapped as MIC1, instead of MIC2.

So, add a quirk for it.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Acked-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/d678aef9fc9a07aced611aa7cb8c9b800c649e5a.1649357263.git.mchehab@kernel.org
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
sound/soc/intel/boards/sof_es8336.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 28d7670b8f8f..b18951a8f309 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -252,6 +252,15 @@ static const struct dmi_system_id sof_es8336_quirk_table[] = {
SOF_ES8336_TGL_GPIO_QUIRK |
SOF_ES8336_ENABLE_DMIC)
},
+ {
+ .callback = sof_es8336_quirk_cb,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"),
+ DMI_MATCH(DMI_BOARD_NAME, "BOHB-WAX9-PCB-B2"),
+ },
+ .driver_data = (void *)(SOF_ES8336_HEADPHONE_GPIO |
+ SOC_ES8336_HEADSET_MIC1)
+ },
{}
};

--
2.35.1


2022-04-27 11:58:47

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 5.17 06/22] ASoC: Intel: sof_es8336: Add a quirk for Huawei Matebook D15

On Tue, Apr 26, 2022 at 03:01:29PM -0400, Sasha Levin wrote:
> From: Mauro Carvalho Chehab <[email protected]>
>
> [ Upstream commit c7cb4717f641db68e8117635bfcf62a9c27dc8d3 ]
>
> Based on experimental tests, Huawei Matebook D15 actually uses
> both gpio0 and gpio1: the first one controls the speaker, while
> the other one controls the headphone.

Are you sure this doesn't need the rest of the series it came along
with?


Attachments:
(No filename) (438.00 B)
signature.asc (499.00 B)
Download all attachments

2022-05-02 23:43:32

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 5.17 06/22] ASoC: Intel: sof_es8336: Add a quirk for Huawei Matebook D15



On 5/1/22 14:32, Sasha Levin wrote:
> On Wed, Apr 27, 2022 at 12:28:32PM +0100, Mark Brown wrote:
>> On Tue, Apr 26, 2022 at 03:01:29PM -0400, Sasha Levin wrote:
>>> From: Mauro Carvalho Chehab <[email protected]>
>>>
>>> [ Upstream commit c7cb4717f641db68e8117635bfcf62a9c27dc8d3 ]
>>>
>>> Based on experimental tests, Huawei Matebook D15 actually uses
>>> both gpio0 and gpio1: the first one controls the speaker, while
>>> the other one controls the headphone.
>>
>> Are you sure this doesn't need the rest of the series it came along
>> with?
>
> I'm not :) Should we queue it too?

If you add this platform to -stable, you'd need the entire series https://lore.kernel.org/alsa-devel/[email protected]/, and the additions made by Mauro.

My take is that it's not really relevant for -stable, support for this hardware codec is still a works-in-progress and while we'd certainly want to have more distributions use the hardware support it's quite disruptive for -stable maintainers, with the risk of compilation problems and functional issues introduced. it'll make more sense for 5.18+.

2022-05-03 00:33:02

by Sasha Levin

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 5.17 06/22] ASoC: Intel: sof_es8336: Add a quirk for Huawei Matebook D15

On Wed, Apr 27, 2022 at 12:28:32PM +0100, Mark Brown wrote:
>On Tue, Apr 26, 2022 at 03:01:29PM -0400, Sasha Levin wrote:
>> From: Mauro Carvalho Chehab <[email protected]>
>>
>> [ Upstream commit c7cb4717f641db68e8117635bfcf62a9c27dc8d3 ]
>>
>> Based on experimental tests, Huawei Matebook D15 actually uses
>> both gpio0 and gpio1: the first one controls the speaker, while
>> the other one controls the headphone.
>
>Are you sure this doesn't need the rest of the series it came along
>with?

I'm not :) Should we queue it too?

--
Thanks,
Sasha