All of lore.kernel.org
 help / color / mirror / Atom feed
* Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
@ 2022-02-08 18:46 dmummenschanz
  2022-02-08 21:55 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 14+ messages in thread
From: dmummenschanz @ 2022-02-08 18:46 UTC (permalink / raw)
  To: alsa-devel

   Hello,

   the audio chip Cannon Lake PCH cAVS ALC892 does not get recognized on
   my system. Only the HDMI devices are recognized.

   lspci shows the following audio device:
   00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)

   dmesg only shows:

   [  189.559786] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops
   i915_exit [i915])
   [  189.581395] input: HDA Intel PCH HDMI/DP,pcm=3 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input20
   [  189.581503] input: HDA Intel PCH HDMI/DP,pcm=7 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input21
   [  189.581628] input: HDA Intel PCH HDMI/DP,pcm=8 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input22
   [  189.581711] input: HDA Intel PCH HDMI/DP,pcm=9 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input23
   [  189.581849] input: HDA Intel PCH HDMI/DP,pcm=10 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input24


   ALSA-info file:
   http://alsa-project.org/db/?f=96102ee84f258d1cac83ed33795356550181511c

   There is a workaround availble:

   echo auto | tee /sys/devices/pci0000\:00/0000\:00\:1f.3/power/control
   echo 1 | tee /sys/devices/pci0000\:00/0000\:00\:1f.3/remove
   echo 1 | tee /sys/bus/pci/rescan

   unfortunately this doesn't work for me. The device never shows up.
   Sound on winX works fine on this device btw.
   I'm happy to assist with any attempts to make the sound work.

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

* Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-08 18:46 Cannon Lake PCH cAVS (ALC892) not detected by kernel driver dmummenschanz
@ 2022-02-08 21:55 ` Pierre-Louis Bossart
  2022-02-09  7:14   ` Aw: " dmummenschanz
  0 siblings, 1 reply; 14+ messages in thread
From: Pierre-Louis Bossart @ 2022-02-08 21:55 UTC (permalink / raw)
  To: dmummenschanz, alsa-devel



On 2/8/22 12:46, dmummenschanz@web.de wrote:
>    Hello,
> 
>    the audio chip Cannon Lake PCH cAVS ALC892 does not get recognized on
>    my system. Only the HDMI devices are recognized.
> 
>    lspci shows the following audio device:
>    00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
> 
>    dmesg only shows:
> 
>    [  189.559786] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops
>    i915_exit [i915])
>    [  189.581395] input: HDA Intel PCH HDMI/DP,pcm=3 as
>    /devices/pci0000:00/0000:00:1f.3/sound/card0/input20
>    [  189.581503] input: HDA Intel PCH HDMI/DP,pcm=7 as
>    /devices/pci0000:00/0000:00:1f.3/sound/card0/input21
>    [  189.581628] input: HDA Intel PCH HDMI/DP,pcm=8 as
>    /devices/pci0000:00/0000:00:1f.3/sound/card0/input22
>    [  189.581711] input: HDA Intel PCH HDMI/DP,pcm=9 as
>    /devices/pci0000:00/0000:00:1f.3/sound/card0/input23
>    [  189.581849] input: HDA Intel PCH HDMI/DP,pcm=10 as
>    /devices/pci0000:00/0000:00:1f.3/sound/card0/input24
> 
> 
>    ALSA-info file:
>    http://alsa-project.org/db/?f=96102ee84f258d1cac83ed33795356550181511c

I see to references to ALC892 in this profile, is this information based
on the hardware specs or Windows logs?

we usually ask people to try with a more recent kernel, but in your case
I would try to go back to a mainline release. I have no idea what this
version might contain audio-wise: 5.17.0-rc3-drmtip

> 
>    There is a workaround availble:
> 
>    echo auto | tee /sys/devices/pci0000\:00/0000\:00\:1f.3/power/control
>    echo 1 | tee /sys/devices/pci0000\:00/0000\:00\:1f.3/remove
>    echo 1 | tee /sys/bus/pci/rescan
> 
>    unfortunately this doesn't work for me. The device never shows up.
>    Sound on winX works fine on this device btw.
>    I'm happy to assist with any attempts to make the sound work.

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

* Aw: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-08 21:55 ` Pierre-Louis Bossart
@ 2022-02-09  7:14   ` dmummenschanz
  2022-02-09 15:51     ` Pierre-Louis Bossart
  0 siblings, 1 reply; 14+ messages in thread
From: dmummenschanz @ 2022-02-09  7:14 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel

   The information about the codec is based on the string windows
   provides:

   HDAUDIO\FUNC_01&VEN_10EC&DEV_0892&SUBSYS_15580351&REV_1003\4&16AF2B56&&
   0001

   Here is the alsa-info output for the 5.16 mainline kernel:

   http://alsa-project.org/db/?f=38c48cd24dc4ba9a9487dd96f857120cc9ce4367

   Kernel config for the sound part:

   CONFIG_SOUND=y
   CONFIG_SND=y
   CONFIG_SND_TIMER=y
   CONFIG_SND_PCM=m
   CONFIG_SND_HWDEP=m
   CONFIG_SND_RAWMIDI=m
   CONFIG_SND_JACK=y
   CONFIG_SND_JACK_INPUT_DEV=y
   CONFIG_SND_PCM_TIMER=y
   CONFIG_SND_HRTIMER=y
   CONFIG_SND_DYNAMIC_MINORS=y
   CONFIG_SND_MAX_CARDS=8
   CONFIG_SND_PROC_FS=y
   CONFIG_SND_VMASTER=y
   CONFIG_SND_DMA_SGBUF=y
   CONFIG_SND_CTL_LED=m
   CONFIG_SND_PCI=y
   #
   # HD-Audio
   #
   CONFIG_SND_HDA=m
   CONFIG_SND_HDA_GENERIC_LEDS=y
   CONFIG_SND_HDA_INTEL=m
   CONFIG_SND_HDA_HWDEP=y
   CONFIG_SND_HDA_RECONFIG=y
   CONFIG_SND_HDA_CODEC_REALTEK=m
   CONFIG_SND_HDA_CODEC_ANALOG=m
   CONFIG_SND_HDA_CODEC_SIGMATEL=m
   CONFIG_SND_HDA_CODEC_VIA=m
   CONFIG_SND_HDA_CODEC_HDMI=m
   CONFIG_SND_HDA_CODEC_CIRRUS=m
   CONFIG_SND_HDA_CODEC_CS8409=m
   CONFIG_SND_HDA_CODEC_CONEXANT=m
   CONFIG_SND_HDA_CODEC_CA0110=m
   CONFIG_SND_HDA_CODEC_CA0132=m
   CONFIG_SND_HDA_CODEC_CA0132_DSP=y
   CONFIG_SND_HDA_CODEC_CMEDIA=m
   CONFIG_SND_HDA_CODEC_SI3054=m
   CONFIG_SND_HDA_GENERIC=m
   CONFIG_SND_HDA_POWER_SAVE_DEFAULT=5
   # end of HD-Audio


   Also tried current ubuntu distro with same results.

   Any advice?


   Gesendet: Dienstag, 08. Februar 2022 um 22:55 Uhr
   Von: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
   An: dmummenschanz@web.de, alsa-devel@alsa-project.org
   Betreff: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel
   driver
   On 2/8/22 12:46, dmummenschanz@web.de wrote:
   > Hello,
   >
   > the audio chip Cannon Lake PCH cAVS ALC892 does not get recognized on
   > my system. Only the HDMI devices are recognized.
   >
   > lspci shows the following audio device:
   > 00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
   >
   > dmesg only shows:
   >
   > [ 189.559786] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops
   > i915_exit [i915])
   > [ 189.581395] input: HDA Intel PCH HDMI/DP,pcm=3 as
   > /devices/pci0000:00/0000:00:1f.3/sound/card0/input20
   > [ 189.581503] input: HDA Intel PCH HDMI/DP,pcm=7 as
   > /devices/pci0000:00/0000:00:1f.3/sound/card0/input21
   > [ 189.581628] input: HDA Intel PCH HDMI/DP,pcm=8 as
   > /devices/pci0000:00/0000:00:1f.3/sound/card0/input22
   > [ 189.581711] input: HDA Intel PCH HDMI/DP,pcm=9 as
   > /devices/pci0000:00/0000:00:1f.3/sound/card0/input23
   > [ 189.581849] input: HDA Intel PCH HDMI/DP,pcm=10 as
   > /devices/pci0000:00/0000:00:1f.3/sound/card0/input24
   >
   >
   > ALSA-info file:
   >
   [1]http://alsa-project.org/db/?f=96102ee84f258d1cac83ed3379535655018151
   1c
   I see to references to ALC892 in this profile, is this information
   based
   on the hardware specs or Windows logs?
   we usually ask people to try with a more recent kernel, but in your
   case
   I would try to go back to a mainline release. I have no idea what this
   version might contain audio-wise: 5.17.0-rc3-drmtip
   >
   > There is a workaround availble:
   >
   > echo auto | tee /sys/devices/pci0000\:00/0000\:00\:1f.3/power/control
   > echo 1 | tee /sys/devices/pci0000\:00/0000\:00\:1f.3/remove
   > echo 1 | tee /sys/bus/pci/rescan
   >
   > unfortunately this doesn't work for me. The device never shows up.
   > Sound on winX works fine on this device btw.
   > I'm happy to assist with any attempts to make the sound work.

References

   1. http://alsa-project.org/db/?f=96102ee84f258d1cac83ed33795356550181511c

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

* Re: Aw: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-09  7:14   ` Aw: " dmummenschanz
@ 2022-02-09 15:51     ` Pierre-Louis Bossart
  2022-02-09 16:47       ` Aw: " dmummenschanz
  0 siblings, 1 reply; 14+ messages in thread
From: Pierre-Louis Bossart @ 2022-02-09 15:51 UTC (permalink / raw)
  To: dmummenschanz, alsa-devel



On 2/9/22 01:14, dmummenschanz@web.de wrote:
>    The information about the codec is based on the string windows
>    provides:
> 
>    HDAUDIO\FUNC_01&VEN_10EC&DEV_0892&SUBSYS_15580351&REV_1003\4&16AF2B56&&
>    0001
> 
>    Here is the alsa-info output for the 5.16 mainline kernel:
> 
>    http://alsa-project.org/db/?f=38c48cd24dc4ba9a9487dd96f857120cc9ce4367

The use of this option is not clear:

snd_intel_dspcfg: dsp_driver=1

This means you are trying to force the use of the legacy driver. is this
intentional? Can you remove it and see what happens?

The results show you don't have a driver bound to the PCI device, so
likely something goes boink in the probe.

It wouldn't hurt to enable dynamic debug as well.

options snd_hda_intel dyndbg=+p
options snd_intel_dspcfg dyndbg=+p

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

* Aw: Re:  Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-09 15:51     ` Pierre-Louis Bossart
@ 2022-02-09 16:47       ` dmummenschanz
  2022-02-12 11:33         ` dmummenschanz
  0 siblings, 1 reply; 14+ messages in thread
From: dmummenschanz @ 2022-02-09 16:47 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel

   snd_intel_dspcfg: dsp_driver=1

   was a leftover from testing. I' ve removed all parameters, add added
   the debug options you've asked.

   http://alsa-project.org/db/?f=6e30e9f598bd2f03b2f5cff0df261f78719ea29d

   Some googling reveals that others suffer from the same problen on the
   same laptop as well. Some report that the device appears after pci-bus
   rescanning however that did not work in my case so I agree there might
   be an issue with probing the relatek device. Unfortunately I'm not a
   kernel dev so I don't even know where to start looking however I'm
   happy to investigate with your help.


   Gesendet: Mittwoch, 09. Februar 2022 um 16:51 Uhr
   Von: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
   An: dmummenschanz@web.de, alsa-devel@alsa-project.org
   Betreff: Re: Aw: Re: Cannon Lake PCH cAVS (ALC892) not detected by
   kernel driver
   On 2/9/22 01:14, dmummenschanz@web.de wrote:
   > The information about the codec is based on the string windows
   > provides:
   >
   >
   HDAUDIO\FUNC_01&VEN_10EC&DEV_0892&SUBSYS_15580351&REV_1003\4&16AF2B56&&
   > 0001
   >
   > Here is the alsa-info output for the 5.16 mainline kernel:
   >
   >
   [1]http://alsa-project.org/db/?f=38c48cd24dc4ba9a9487dd96f857120cc9ce43
   67
   The use of this option is not clear:
   snd_intel_dspcfg: dsp_driver=1
   This means you are trying to force the use of the legacy driver. is
   this
   intentional? Can you remove it and see what happens?
   The results show you don't have a driver bound to the PCI device, so
   likely something goes boink in the probe.
   It wouldn't hurt to enable dynamic debug as well.
   options snd_hda_intel dyndbg=+p
   options snd_intel_dspcfg dyndbg=+p

References

   1. http://alsa-project.org/db/?f=38c48cd24dc4ba9a9487dd96f857120cc9ce4367

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

* Re: Re:  Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-09 16:47       ` Aw: " dmummenschanz
@ 2022-02-12 11:33         ` dmummenschanz
  2022-02-12 19:42           ` Pierre-Louis Bossart
  0 siblings, 1 reply; 14+ messages in thread
From: dmummenschanz @ 2022-02-12 11:33 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel

   I did some more digging into the code to find out what goes boink.
   For comparison I took my wife's desktop wich has a  Cannon Lake chipset
   as well along with a working a ALC892 AVS device.

   It seems there is a codec mask issue selected in the chip->bus struct.
   Inside the function

   static int azx_probe_continue(struct azx *chip)

   of hda_intel.c the bus->codec_mask on my wife's pc contains the integer
   value "5" and both ALC892 and the HDMI is found. On my device it is "4"
   and only the HDMI is found.

   /* create codec instances */
   if (bus->codec_mask) {
     err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);
     if (err < 0)
       goto out_free;
   }

   After forcing the falue before probing: "bus->codec_mask = 5;" the
   ALC892 is finally detected on my system and I have sound! alsa-info
   below: Please pardon the trash printk's in the log ;-)

   http://alsa-project.org/db/?f=057aac1a0e9591de3847dca5ebc424dd65c8a221

   I'll do some more digging into it next week but it would probably
   save tons of time if someone could point me is the right direction
   where to look further?



   Gesendet: Mittwoch, 09. Februar 2022 um 17:47 Uhr
   Von: dmummenschanz@web.de
   An: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
   alsa-devel@alsa-project.org
   Betreff: Aw: Re: Re: Cannon Lake PCH cAVS (ALC892) not detected by
   kernel driver
   snd_intel_dspcfg: dsp_driver=1
   was a leftover from testing. I' ve removed all parameters, add added
   the debug options you've asked.
   [1]http://alsa-project.org/db/?f=6e30e9f598bd2f03b2f5cff0df261f78719ea2
   9d
   Some googling reveals that others suffer from the same problen on the
   same laptop as well. Some report that the device appears after pci-bus
   rescanning however that did not work in my case so I agree there might
   be an issue with probing the relatek device. Unfortunately I'm not a
   kernel dev so I don't even know where to start looking however I'm
   happy to investigate with your help.
   Gesendet: Mittwoch, 09. Februar 2022 um 16:51 Uhr
   Von: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
   An: dmummenschanz@web.de, alsa-devel@alsa-project.org
   Betreff: Re: Aw: Re: Cannon Lake PCH cAVS (ALC892) not detected by
   kernel driver
   On 2/9/22 01:14, dmummenschanz@web.de wrote:
   > The information about the codec is based on the string windows
   > provides:
   >
   >
   HDAUDIO\FUNC_01&VEN_10EC&DEV_0892&SUBSYS_15580351&REV_1003\4&16AF2B56&&
   > 0001
   >
   > Here is the alsa-info output for the 5.16 mainline kernel:
   >
   >
   [1][2]http://alsa-project.org/db/?f=38c48cd24dc4ba9a9487dd96f857120cc9c
   e43
   67
   The use of this option is not clear:
   snd_intel_dspcfg: dsp_driver=1
   This means you are trying to force the use of the legacy driver. is
   this
   intentional? Can you remove it and see what happens?
   The results show you don't have a driver bound to the PCI device, so
   likely something goes boink in the probe.
   It wouldn't hurt to enable dynamic debug as well.
   options snd_hda_intel dyndbg=+p
   options snd_intel_dspcfg dyndbg=+p
   References
   1.
   [3]http://alsa-project.org/db/?f=38c48cd24dc4ba9a9487dd96f857120cc9ce43
   67

References

   1. http://alsa-project.org/db/?f=6e30e9f598bd2f03b2f5cff0df261f78719ea29d
   2. http://alsa-project.org/db/?f=38c48cd24dc4ba9a9487dd96f857120cc9ce43
   3. http://alsa-project.org/db/?f=38c48cd24dc4ba9a9487dd96f857120cc9ce4367

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

* Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-12 11:33         ` dmummenschanz
@ 2022-02-12 19:42           ` Pierre-Louis Bossart
  2022-02-13  9:08             ` Takashi Iwai
  0 siblings, 1 reply; 14+ messages in thread
From: Pierre-Louis Bossart @ 2022-02-12 19:42 UTC (permalink / raw)
  To: dmummenschanz, alsa-devel; +Cc: Takashi Iwai, Vehmanen, Kai



On 2/12/22 05:33, dmummenschanz@web.de wrote:
>    I did some more digging into the code to find out what goes boink.
>    For comparison I took my wife's desktop wich has a  Cannon Lake chipset
>    as well along with a working a ALC892 AVS device.
> 
>    It seems there is a codec mask issue selected in the chip->bus struct.
>    Inside the function
> 
>    static int azx_probe_continue(struct azx *chip)
> 
>    of hda_intel.c the bus->codec_mask on my wife's pc contains the integer
>    value "5" and both ALC892 and the HDMI is found. On my device it is "4"
>    and only the HDMI is found.
> 
>    /* create codec instances */
>    if (bus->codec_mask) {
>      err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);
>      if (err < 0)
>        goto out_free;
>    }
> 
>    After forcing the falue before probing: "bus->codec_mask = 5;" the
>    ALC892 is finally detected on my system and I have sound! alsa-info
>    below: Please pardon the trash printk's in the log ;-)
> 
>    http://alsa-project.org/db/?f=057aac1a0e9591de3847dca5ebc424dd65c8a221
> 
>    I'll do some more digging into it next week but it would probably
>    save tons of time if someone could point me is the right direction
>    where to look further?

Adding Kai and Takashi, in case they haven't see this codec_mask issue.
I personally don't recall having seen this before.



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

* Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-12 19:42           ` Pierre-Louis Bossart
@ 2022-02-13  9:08             ` Takashi Iwai
  2022-02-14  6:49               ` dmummenschanz
  0 siblings, 1 reply; 14+ messages in thread
From: Takashi Iwai @ 2022-02-13  9:08 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: Vehmanen, Kai, alsa-devel, dmummenschanz

On Sat, 12 Feb 2022 20:42:28 +0100,
Pierre-Louis Bossart wrote:
> 
> 
> 
> On 2/12/22 05:33, dmummenschanz@web.de wrote:
> >    I did some more digging into the code to find out what goes boink.
> >    For comparison I took my wife's desktop wich has a  Cannon Lake chipset
> >    as well along with a working a ALC892 AVS device.
> > 
> >    It seems there is a codec mask issue selected in the chip->bus struct.
> >    Inside the function
> > 
> >    static int azx_probe_continue(struct azx *chip)
> > 
> >    of hda_intel.c the bus->codec_mask on my wife's pc contains the integer
> >    value "5" and both ALC892 and the HDMI is found. On my device it is "4"
> >    and only the HDMI is found.
> > 
> >    /* create codec instances */
> >    if (bus->codec_mask) {
> >      err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);
> >      if (err < 0)
> >        goto out_free;
> >    }
> > 
> >    After forcing the falue before probing: "bus->codec_mask = 5;" the
> >    ALC892 is finally detected on my system and I have sound! alsa-info
> >    below: Please pardon the trash printk's in the log ;-)
> > 
> >    http://alsa-project.org/db/?f=057aac1a0e9591de3847dca5ebc424dd65c8a221
> > 
> >    I'll do some more digging into it next week but it would probably
> >    save tons of time if someone could point me is the right direction
> >    where to look further?
> 
> Adding Kai and Takashi, in case they haven't see this codec_mask issue.
> I personally don't recall having seen this before.

This means BIOS trying to hide this codec by some reason.  It's seen
sometimes in the past although it's rare.

You can forcibly probe it via probe_mask=0x105 option for
snd-hda-intel module in this case.
If this is confirmed to work reliably, we can add a static quirk table
in the driver cideo.


HTH,

Takashi

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

* Re: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-13  9:08             ` Takashi Iwai
@ 2022-02-14  6:49               ` dmummenschanz
  2022-02-14  7:08                 ` Takashi Iwai
  0 siblings, 1 reply; 14+ messages in thread
From: dmummenschanz @ 2022-02-14  6:49 UTC (permalink / raw)
  To: Takashi Iwai, Pierre-Louis Bossart, alsa-devel

   Thanks for the scoop. I've added "options snd-hda-intel
   probe_mask=0x105" to /etc/modules-d/alsa.conf. Unfortunately that
   didn't help. The ALC892 didn't show up. Why the log below says
   "codec_mask forced to 0x5" but I've explicitly set the value to 0x105 I
   don't know.

   [  109.071253] snd_hda_intel 0000:00:1f.3: codec_mask forced to 0x5
   [  109.071329] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops
   i915_exit [i915])
   [  109.092895] input: HDA Intel PCH HDMI/DP,pcm=3 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input20
   [  109.093808] input: HDA Intel PCH HDMI/DP,pcm=7 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input21
   [  109.093883] input: HDA Intel PCH HDMI/DP,pcm=8 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input22
   [  109.093953] input: HDA Intel PCH HDMI/DP,pcm=9 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input23
   [  109.095354] input: HDA Intel PCH HDMI/DP,pcm=10 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input24



   Gesendet: Sonntag, 13. Februar 2022 um 10:08 Uhr
   Von: "Takashi Iwai" <tiwai@suse.de>
   An: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
   Cc: "Vehmanen, Kai" <kai.vehmanen@intel.com>,
   alsa-devel@alsa-project.org, dmummenschanz@web.de
   Betreff: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel
   driver
   On Sat, 12 Feb 2022 20:42:28 +0100,
   Pierre-Louis Bossart wrote:
   >
   >
   >
   > On 2/12/22 05:33, dmummenschanz@web.de wrote:
   > > I did some more digging into the code to find out what goes boink.
   > > For comparison I took my wife's desktop wich has a Cannon Lake
   chipset
   > > as well along with a working a ALC892 AVS device.
   > >
   > > It seems there is a codec mask issue selected in the chip->bus
   struct.
   > > Inside the function
   > >
   > > static int azx_probe_continue(struct azx *chip)
   > >
   > > of hda_intel.c the bus->codec_mask on my wife's pc contains the
   integer
   > > value "5" and both ALC892 and the HDMI is found. On my device it is
   "4"
   > > and only the HDMI is found.
   > >
   > > /* create codec instances */
   > > if (bus->codec_mask) {
   > > err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);
   > > if (err < 0)
   > > goto out_free;
   > > }
   > >
   > > After forcing the falue before probing: "bus->codec_mask = 5;" the
   > > ALC892 is finally detected on my system and I have sound! alsa-info
   > > below: Please pardon the trash printk's in the log ;-)
   > >
   > >
   [1]http://alsa-project.org/db/?f=057aac1a0e9591de3847dca5ebc424dd65c8a2
   21
   > >
   > > I'll do some more digging into it next week but it would probably
   > > save tons of time if someone could point me is the right direction
   > > where to look further?
   >
   > Adding Kai and Takashi, in case they haven't see this codec_mask
   issue.
   > I personally don't recall having seen this before.
   This means BIOS trying to hide this codec by some reason. It's seen
   sometimes in the past although it's rare.
   You can forcibly probe it via probe_mask=0x105 option for
   snd-hda-intel module in this case.
   If this is confirmed to work reliably, we can add a static quirk table
   in the driver cideo.
   HTH,
   Takashi

References

   1. http://alsa-project.org/db/?f=057aac1a0e9591de3847dca5ebc424dd65c8a221

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

* Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-14  6:49               ` dmummenschanz
@ 2022-02-14  7:08                 ` Takashi Iwai
  2022-02-14  7:38                   ` dmummenschanz
  0 siblings, 1 reply; 14+ messages in thread
From: Takashi Iwai @ 2022-02-14  7:08 UTC (permalink / raw)
  To: dmummenschanz; +Cc: alsa-devel, Pierre-Louis Bossart

On Mon, 14 Feb 2022 07:49:55 +0100,
dmummenschanz@web.de wrote:
> 
> Thanks for the scoop. I've added "options snd-hda-intel probe_mask=0x105" to /
> etc/modules-d/alsa.conf. Unfortunately that didn't help. The ALC892
> didn't show up. Why the log below says "codec_mask forced to 0x5" but I've
> explicitly set the value to 0x105 I don't know.

The bit 0x100 means to forcibly set the codec probe mask, so this is
fine.  But the actual work of the forced bit doesn't seem right.

Could you try the patch below and test with probe_mask=0x105 again?


thanks,

Takashi

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1798,8 +1798,6 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
 
 	assign_position_fix(chip, check_position_fix(chip, position_fix[dev]));
 
-	check_probe_mask(chip, dev);
-
 	if (single_cmd < 0) /* allow fallback to single_cmd at errors */
 		chip->fallback_to_single_cmd = 1;
 	else /* explicitly set to single_cmd or not */
@@ -2280,6 +2278,8 @@ static int azx_probe_continue(struct azx *chip)
 	chip->beep_mode = beep_mode[dev];
 #endif
 
+	check_probe_mask(chip, dev);
+
 	/* create codec instances */
 	if (bus->codec_mask) {
 		err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);

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

* Re: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-14  7:08                 ` Takashi Iwai
@ 2022-02-14  7:38                   ` dmummenschanz
  2022-02-14  8:42                     ` Takashi Iwai
  0 siblings, 1 reply; 14+ messages in thread
From: dmummenschanz @ 2022-02-14  7:38 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel

   Applied yout patch with "probe_mask=0x105" option. ALC892 is now found
   and I have sound. Thanks! :)

   [   25.986154] snd_hda_intel 0000:00:1f.3: codec_mask forced to 0x5
   [   25.997511] snd_hda_codec_realtek hdaudioC0D0: autoconfig for
   ALC892: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
   [   25.997516] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0
   (0x0/0x0/0x0/0x0/0x0)
   [   25.997518] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1
   (0x1b/0x0/0x0/0x0/0x0)
   [   25.997520] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
   [   25.997521] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x1e/0x0
   [   25.997522] snd_hda_codec_realtek hdaudioC0D0:    inputs:
   [   25.997524] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x18
   [   25.997525] snd_hda_codec_realtek hdaudioC0D0:      Internal
   Mic=0x12
   [   26.005460] elogind-daemon[1040]: Watching system buttons on
   /dev/input/event2 (Lid Switch)
   [   26.022595] elogind-daemon[1040]: Watching system buttons on
   /dev/input/event6 (Intel HID events)
   [   26.022736] input: HDA Intel PCH Mic as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input15
   [   26.022793] input: HDA Intel PCH Headphone as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input16
   [   26.022830] input: HDA Intel PCH HDMI/DP,pcm=3 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input17
   [   26.022863] input: HDA Intel PCH HDMI/DP,pcm=7 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input18
   [   26.022896] input: HDA Intel PCH HDMI/DP,pcm=8 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input19
   [   26.022927] input: HDA Intel PCH HDMI/DP,pcm=9 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input20
   [   26.022957] input: HDA Intel PCH HDMI/DP,pcm=10 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input21


   Gesendet: Montag, 14. Februar 2022 um 08:08 Uhr
   Von: "Takashi Iwai" <tiwai@suse.de>
   An: dmummenschanz@web.de
   Cc: alsa-devel@alsa-project.org, "Pierre-Louis Bossart"
   <pierre-louis.bossart@linux.intel.com>
   Betreff: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel
   driver
   On Mon, 14 Feb 2022 07:49:55 +0100,
   dmummenschanz@web.de wrote:
   >
   > Thanks for the scoop. I've added "options snd-hda-intel
   probe_mask=0x105" to /
   > etc/modules-d/alsa.conf. Unfortunately that didn't help. The ALC892
   > didn't show up. Why the log below says "codec_mask forced to 0x5" but
   I've
   > explicitly set the value to 0x105 I don't know.
   The bit 0x100 means to forcibly set the codec probe mask, so this is
   fine. But the actual work of the forced bit doesn't seem right.
   Could you try the patch below and test with probe_mask=0x105 again?
   thanks,
   Takashi
   --- a/sound/pci/hda/hda_intel.c
   +++ b/sound/pci/hda/hda_intel.c
   @@ -1798,8 +1798,6 @@ static int azx_create(struct snd_card *card,
   struct pci_dev *pci,
   assign_position_fix(chip, check_position_fix(chip, position_fix[dev]));
   - check_probe_mask(chip, dev);
   -
   if (single_cmd < 0) /* allow fallback to single_cmd at errors */
   chip->fallback_to_single_cmd = 1;
   else /* explicitly set to single_cmd or not */
   @@ -2280,6 +2278,8 @@ static int azx_probe_continue(struct azx *chip)
   chip->beep_mode = beep_mode[dev];
   #endif
   + check_probe_mask(chip, dev);
   +
   /* create codec instances */
   if (bus->codec_mask) {
   err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);

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

* Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-14  7:38                   ` dmummenschanz
@ 2022-02-14  8:42                     ` Takashi Iwai
  2022-02-14  9:23                       ` Aw: " dmummenschanz
  0 siblings, 1 reply; 14+ messages in thread
From: Takashi Iwai @ 2022-02-14  8:42 UTC (permalink / raw)
  To: dmummenschanz; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

On Mon, 14 Feb 2022 08:38:52 +0100,
dmummenschanz@web.de wrote:
> 
> Applied yout patch with "probe_mask=0x105" option. ALC892 is now found and I
> have sound. Thanks! :)

Good to hear.

Below are two patches, one for a slightly revised version of
probe_mask fix, and another to add your device to the quirk table.
Could you give those a try, and test without probe_mask option?


thanks,

Takashi


[-- Attachment #2: 0001-ALSA-hda-Fix-regression-on-forced-probe-mask-option.patch --]
[-- Type: application/octet-stream, Size: 1704 bytes --]

From 652dae26e0894c4bafe865eb89f0d57ba1bdfb8a Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 14 Feb 2022 09:33:54 +0100
Subject: [PATCH 1/2] ALSA: hda: Fix regression on forced probe mask option

The forced probe mask via probe_mask 0x100 bit doesn't work any longer
as expected since the bus init code was moved and it's clearing the
codec_mask value that was set beforehand.  This patch fixes the
long-time regression by moving the check_probe_mask() call.

Fixes: a41d122449be ("ALSA: hda - Embed bus into controller object")
Reported-by: dmummenschanz@web.de
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/trinity-f018660b-95c9-442b-a2a8-c92a56eb07ed-1644345967148@3c-app-webde-bap22
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/hda_intel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 4b0338c4c543..18b795220b52 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1798,8 +1798,6 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
 
 	assign_position_fix(chip, check_position_fix(chip, position_fix[dev]));
 
-	check_probe_mask(chip, dev);
-
 	if (single_cmd < 0) /* allow fallback to single_cmd at errors */
 		chip->fallback_to_single_cmd = 1;
 	else /* explicitly set to single_cmd or not */
@@ -1825,6 +1823,8 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
 		chip->bus.core.needs_damn_long_delay = 1;
 	}
 
+	check_probe_mask(chip, dev);
+
 	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
 	if (err < 0) {
 		dev_err(card->dev, "Error creating device [card]!\n");
-- 
2.31.1


[-- Attachment #3: 0002-ALSA-hda-Fix-missing-codec-probe-on-Shenker-Dock-15.patch --]
[-- Type: application/octet-stream, Size: 1269 bytes --]

From 122e4fb9cc7845c252cd29f871c0166d32698e88 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 14 Feb 2022 09:39:03 +0100
Subject: [PATCH 2/2] ALSA: hda: Fix missing codec probe on Shenker Dock 15

By some unknown reason, BIOS on Shenker Dock 15 doesn't set up the
codec mask properly for the onboard audio.  Let's set the forced codec
mask to enable the codec discovery.

Reported-by: dmummenschanz@web.de
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/trinity-f018660b-95c9-442b-a2a8-c92a56eb07ed-1644345967148@3c-app-webde-bap22
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/hda_intel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 18b795220b52..917ad9d375b1 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1615,6 +1615,7 @@ static const struct snd_pci_quirk probe_mask_list[] = {
 	/* forced codec slots */
 	SND_PCI_QUIRK(0x1043, 0x1262, "ASUS W5Fm", 0x103),
 	SND_PCI_QUIRK(0x1046, 0x1262, "ASUS W5F", 0x103),
+	SND_PCI_QUIRK(0x1558, 0x0351, "Schenker Dock 15", 0x105),
 	/* WinFast VP200 H (Teradici) user reported broken communication */
 	SND_PCI_QUIRK(0x3a21, 0x040d, "WinFast VP200 H", 0x101),
 	{}
-- 
2.31.1


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

* Aw: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-14  8:42                     ` Takashi Iwai
@ 2022-02-14  9:23                       ` dmummenschanz
  2022-02-14  9:54                         ` Takashi Iwai
  0 siblings, 1 reply; 14+ messages in thread
From: dmummenschanz @ 2022-02-14  9:23 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel

   Okay, I reverted the previous patch, removed the probe_mask option and
   applied both of your patches. Looks good! ALC is detected and I have
   sound. Thank you. Any chance this will hit the mainline kernel for
   upcomming 5.17 release?

   [   25.947927] EXT4-fs (nvme0n1p8): mounted filesystem with ordered
   data mode. Quota mode: disabled.
   [   25.963952] snd_hda_codec_realtek hdaudioC0D0: autoconfig for
   ALC892: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
   [   25.963958] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0
   (0x0/0x0/0x0/0x0/0x0)
   [   25.963961] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1
   (0x1b/0x0/0x0/0x0/0x0)
   [   25.963963] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
   [   25.963964] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x1e/0x0
   [   25.963965] snd_hda_codec_realtek hdaudioC0D0:    inputs:
   [   25.963967] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x18
   [   25.963968] snd_hda_codec_realtek hdaudioC0D0:      Internal
   Mic=0x12
   [   25.985493] urandom_read: 3 callbacks suppressed
   [   25.985496] random: dbus-daemon: uninitialized urandom read (12
   bytes read)
   [   25.986786] input: HDA Intel PCH Mic as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input15
   [   25.986825] input: HDA Intel PCH Headphone as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input16
   [   25.986862] input: HDA Intel PCH HDMI/DP,pcm=3 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input17
   [   25.986896] input: HDA Intel PCH HDMI/DP,pcm=7 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input18
   [   25.986927] input: HDA Intel PCH HDMI/DP,pcm=8 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input19
   [   25.986957] input: HDA Intel PCH HDMI/DP,pcm=9 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input20
   [   25.986997] input: HDA Intel PCH HDMI/DP,pcm=10 as
   /devices/pci0000:00/0000:00:1f.3/sound/card0/input21
   [   25.992193] random: dbus-daemon: uninitialized urandom read (12
   bytes read)


   Gesendet: Montag, 14. Februar 2022 um 09:42 Uhr
   Von: "Takashi Iwai" <tiwai@suse.de>
   An: dmummenschanz@web.de
   Cc: alsa-devel@alsa-project.org
   Betreff: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel
   driver
   On Mon, 14 Feb 2022 08:38:52 +0100,
   dmummenschanz@web.de wrote:
   >
   > Applied yout patch with "probe_mask=0x105" option. ALC892 is now
   found and I
   > have sound. Thanks! :)
   Good to hear.
   Below are two patches, one for a slightly revised version of
   probe_mask fix, and another to add your device to the quirk table.
   Could you give those a try, and test without probe_mask option?
   thanks,
   Takashi

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

* Re: Aw: Re: Cannon Lake PCH cAVS (ALC892) not detected by kernel driver
  2022-02-14  9:23                       ` Aw: " dmummenschanz
@ 2022-02-14  9:54                         ` Takashi Iwai
  0 siblings, 0 replies; 14+ messages in thread
From: Takashi Iwai @ 2022-02-14  9:54 UTC (permalink / raw)
  To: dmummenschanz; +Cc: alsa-devel

On Mon, 14 Feb 2022 10:23:33 +0100,
dmummenschanz@web.de wrote:
> 
> Okay, I reverted the previous patch, removed the probe_mask option and applied
> both of your patches. Looks good! ALC is detected and I have sound. Thank you.
> Any chance this will hit the mainline kernel for upcomming 5.17 release?

Yes, I'll submit and merge those for the next pull request.


Takashi

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

end of thread, other threads:[~2022-02-14  9:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 18:46 Cannon Lake PCH cAVS (ALC892) not detected by kernel driver dmummenschanz
2022-02-08 21:55 ` Pierre-Louis Bossart
2022-02-09  7:14   ` Aw: " dmummenschanz
2022-02-09 15:51     ` Pierre-Louis Bossart
2022-02-09 16:47       ` Aw: " dmummenschanz
2022-02-12 11:33         ` dmummenschanz
2022-02-12 19:42           ` Pierre-Louis Bossart
2022-02-13  9:08             ` Takashi Iwai
2022-02-14  6:49               ` dmummenschanz
2022-02-14  7:08                 ` Takashi Iwai
2022-02-14  7:38                   ` dmummenschanz
2022-02-14  8:42                     ` Takashi Iwai
2022-02-14  9:23                       ` Aw: " dmummenschanz
2022-02-14  9:54                         ` Takashi Iwai

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.