mbox series

[SRU,OEM-5.6,0/1] alsa: should not load sof driver if the internal mic connects to the codec

Message ID 20200805030228.15386-1-hui.wang@canonical.com
Headers show
Series alsa: should not load sof driver if the internal mic connects to the codec | expand

Message

Hui Wang Aug. 5, 2020, 3:02 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1890231

This issue was introduced by #1872916 ("Support Intel Soundwire
in 5.6-OEM Kernel 20.04"), so focal and groovy kernels don't need
this fix.

[Impact]
We found the sof driver instead of hda driver is enabled on a dell
machine without soundwire and dmic. This will make gnome show dummy
output and users have no audio device to use.

[Fix]
When we integrated fix for #1872916, we backported 2 patches, these
2 patches enable the sof driver unconditionally for Dell comet lake
machines. There is an upstream patch to fix it, let the sof driver
enable conditionally on comet lake machines.

[Test Case]
Boot the kernel with this patch on that dell machine, check the
gnome-control-center, all audio devices exist, playback and recording
work well.

[Regression Risk]
On the Dell comet lake machines with dmic, the sof driver should
enable. Without this patch, the sof driver will enable unconditionally,
but with this patch, the sof driver will enable conditionally, so it
is possible to introduce a regression that on Dell comet machines,
the sof driver doesn't enable even the machine has dmic.

I have tested this patch on a Dell comet lake dmic machines, it worked
well.


Pierre-Louis Bossart (1):
  ALSA: hda: add autodetection for SoundWire

 sound/hda/intel-dsp-config.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

Comments

Anthony Wong Aug. 5, 2020, 3:33 p.m. UTC | #1
Hi Hui,

Hui Wang 於 5/8/2020 上午11:02 寫道:
> BugLink: https://bugs.launchpad.net/bugs/1890231
> 
> This issue was introduced by #1872916 ("Support Intel Soundwire
> in 5.6-OEM Kernel 20.04"), so focal and groovy kernels don't need
> this fix.
> 
> [Impact]
> We found the sof driver instead of hda driver is enabled on a dell
> machine without soundwire and dmic. This will make gnome show dummy
> output and users have no audio device to use.
> 
> [Fix]
> When we integrated fix for #1872916, we backported 2 patches, these
> 2 patches enable the sof driver unconditionally for Dell comet lake
> machines. There is an upstream patch to fix it, let the sof driver
> enable conditionally on comet lake machines.
> 
> [Test Case]
> Boot the kernel with this patch on that dell machine, check the
> gnome-control-center, all audio devices exist, playback and recording
> work well.
> 
> [Regression Risk]
> On the Dell comet lake machines with dmic, the sof driver should
> enable. Without this patch, the sof driver will enable unconditionally,
> but with this patch, the sof driver will enable conditionally, so it
> is possible to introduce a regression that on Dell comet machines,
> the sof driver doesn't enable even the machine has dmic

Can you confirm if the DMI_PRODUCT_SKUs listed in your patch, or with 
the DMIC ACPI check by snd_intel_dsp_check_dmic(), can cover all CML 
machines we have enabled? If so, would that eliminate the concern of 
regression?

Thanks,
Anthony

> 
> I have tested this patch on a Dell comet lake dmic machines, it worked
> well.
> 
> 
> Pierre-Louis Bossart (1):
>    ALSA: hda: add autodetection for SoundWire
> 
>   sound/hda/intel-dsp-config.c | 23 ++++++++++++++++++-----
>   1 file changed, 18 insertions(+), 5 deletions(-)
>
Hui Wang Aug. 6, 2020, 12:33 a.m. UTC | #2
On 2020/8/5 下午11:33, Anthony Wong wrote:
> Hi Hui,
>
> Hui Wang 於 5/8/2020 上午11:02 寫道:
>> BugLink: https://bugs.launchpad.net/bugs/1890231
>>
>> This issue was introduced by #1872916 ("Support Intel Soundwire
>> in 5.6-OEM Kernel 20.04"), so focal and groovy kernels don't need
>> this fix.
>>
>> [Impact]
>> We found the sof driver instead of hda driver is enabled on a dell
>> machine without soundwire and dmic. This will make gnome show dummy
>> output and users have no audio device to use.
>>
>> [Fix]
>> When we integrated fix for #1872916, we backported 2 patches, these
>> 2 patches enable the sof driver unconditionally for Dell comet lake
>> machines. There is an upstream patch to fix it, let the sof driver
>> enable conditionally on comet lake machines.
>>
>> [Test Case]
>> Boot the kernel with this patch on that dell machine, check the
>> gnome-control-center, all audio devices exist, playback and recording
>> work well.
>>
>> [Regression Risk]
>> On the Dell comet lake machines with dmic, the sof driver should
>> enable. Without this patch, the sof driver will enable unconditionally,
>> but with this patch, the sof driver will enable conditionally, so it
>> is possible to introduce a regression that on Dell comet machines,
>> the sof driver doesn't enable even the machine has dmic
>
> Can you confirm if the DMI_PRODUCT_SKUs listed in your patch, or with 
> the DMIC ACPI check by snd_intel_dsp_check_dmic(), can cover all CML 
> machines we have enabled? If so, would that eliminate the concern of 
> regression?

I have tested it on a Dell machine with pci dev id 0x06c8 and 
DMI_PRODUCT_SKU "0990", it is a soundwire machine, it worked as well as 
before; and tested it on a Dell machine with pci dev id 0x02c8, it is a 
dmic machine, and through snd_intel_dsp_check_dmic() the sof driver is 
enabled, so this machine worked as well as before too.

What I concern is snd_intel_dsp_check_dmic() doesn't work as expected on 
some Dell CML dmic machines we have enabled, in this situation the sof 
driver will not be enabled and the dmic will not work. But this 
possibility is very low since a dmic machine should have a valid dmic 
definition table in the BIOS.

Because I only have 2 Dell CML machines, it is best to test the patch on 
other Dell CML machines we have enabled, I already added this comment in 
the #1890076.

Thanks,

Hui.


>
> Thanks,
> Anthony
>
>>
>> I have tested this patch on a Dell comet lake dmic machines, it worked
>> well.
>>
>>
>> Pierre-Louis Bossart (1):
>>    ALSA: hda: add autodetection for SoundWire
>>
>>   sound/hda/intel-dsp-config.c | 23 ++++++++++++++++++-----
>>   1 file changed, 18 insertions(+), 5 deletions(-)
>>
Hui Wang Aug. 6, 2020, 12:50 a.m. UTC | #3
On 2020/8/6 上午8:33, Hui Wang wrote:
>
> On 2020/8/5 下午11:33, Anthony Wong wrote:
>> Hi Hui,
>>
>> Hui Wang 於 5/8/2020 上午11:02 寫道:
>>> BugLink: https://bugs.launchpad.net/bugs/1890231
>>>
>>> This issue was introduced by #1872916 ("Support Intel Soundwire
>>> in 5.6-OEM Kernel 20.04"), so focal and groovy kernels don't need
>>> this fix.
>>>
>>> [Impact]
>>> We found the sof driver instead of hda driver is enabled on a dell
>>> machine without soundwire and dmic. This will make gnome show dummy
>>> output and users have no audio device to use.
>>>
>>> [Fix]
>>> When we integrated fix for #1872916, we backported 2 patches, these
>>> 2 patches enable the sof driver unconditionally for Dell comet lake
>>> machines. There is an upstream patch to fix it, let the sof driver
>>> enable conditionally on comet lake machines.
>>>
>>> [Test Case]
>>> Boot the kernel with this patch on that dell machine, check the
>>> gnome-control-center, all audio devices exist, playback and recording
>>> work well.
>>>
>>> [Regression Risk]
>>> On the Dell comet lake machines with dmic, the sof driver should
>>> enable. Without this patch, the sof driver will enable unconditionally,
>>> but with this patch, the sof driver will enable conditionally, so it
>>> is possible to introduce a regression that on Dell comet machines,
>>> the sof driver doesn't enable even the machine has dmic
>>
>> Can you confirm if the DMI_PRODUCT_SKUs listed in your patch, or with 
>> the DMIC ACPI check by snd_intel_dsp_check_dmic(), can cover all CML 
>> machines we have enabled? If so, would that eliminate the concern of 
>> regression?
>
> I have tested it on a Dell machine with pci dev id 0x06c8 and 
> DMI_PRODUCT_SKU "0990", it is a soundwire machine, it worked as well 
> as before; and tested it on a Dell machine with pci dev id 0x02c8, it 
> is a dmic machine, and through snd_intel_dsp_check_dmic() the sof 
> driver is enabled, so this machine worked as well as before too.
>
> What I concern is snd_intel_dsp_check_dmic() doesn't work as expected 
> on some Dell CML dmic machines we have enabled, in this situation the 
> sof driver will not be enabled and the dmic will not work. But this 
> possibility is very low since a dmic machine should have a valid dmic 
> definition table in the BIOS.
>
> Because I only have 2 Dell CML machines, it is best to test the patch 
> on other Dell CML machines we have enabled, I already added this 
> comment in the #1890076.

Let me re-organize:

There are 3 groups of Dell CML machines: soundwire,  dmic, hda

without this patch, all machines will enable sof driver unconditionally.

After applying the patch:

The DMI_PRODUCT_SKU will cover all soundwire machines, the ret=true of 
snd_intel_dsp_check_dmic() will cover all dmic machines, and the 
ret=false of snd_intel_dsp_check_dmic() will cover all hda machines. 
What I concern is snd_intel_dsp_check_dmic() will return false on some 
dmic machines we have enabled.

>
> Thanks,
>
> Hui.
>
>
>>
>> Thanks,
>> Anthony
>>
>>>
>>> I have tested this patch on a Dell comet lake dmic machines, it worked
>>> well.
>>>
>>>
>>> Pierre-Louis Bossart (1):
>>>    ALSA: hda: add autodetection for SoundWire
>>>
>>>   sound/hda/intel-dsp-config.c | 23 ++++++++++++++++++-----
>>>   1 file changed, 18 insertions(+), 5 deletions(-)
>>>
Timo Aaltonen Aug. 14, 2020, 12:35 p.m. UTC | #4
On 5.8.2020 6.02, Hui Wang wrote:
> BugLink: https://bugs.launchpad.net/bugs/1890231
> 
> This issue was introduced by #1872916 ("Support Intel Soundwire
> in 5.6-OEM Kernel 20.04"), so focal and groovy kernels don't need
> this fix.
> 
> [Impact]
> We found the sof driver instead of hda driver is enabled on a dell
> machine without soundwire and dmic. This will make gnome show dummy
> output and users have no audio device to use.
> 
> [Fix]
> When we integrated fix for #1872916, we backported 2 patches, these
> 2 patches enable the sof driver unconditionally for Dell comet lake
> machines. There is an upstream patch to fix it, let the sof driver
> enable conditionally on comet lake machines.
> 
> [Test Case]
> Boot the kernel with this patch on that dell machine, check the
> gnome-control-center, all audio devices exist, playback and recording
> work well.
> 
> [Regression Risk]
> On the Dell comet lake machines with dmic, the sof driver should
> enable. Without this patch, the sof driver will enable unconditionally,
> but with this patch, the sof driver will enable conditionally, so it
> is possible to introduce a regression that on Dell comet machines,
> the sof driver doesn't enable even the machine has dmic.
> 
> I have tested this patch on a Dell comet lake dmic machines, it worked
> well.
> 
> 
> Pierre-Louis Bossart (1):
>   ALSA: hda: add autodetection for SoundWire
> 
>  sound/hda/intel-dsp-config.c | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)
> 

applied to oem-5.6, thanks