• Re: [gentoo-user] sound on Raptor Lake-P/U/H cAVS

    From Michael@21:1/5 to All on Thu Jul 3 17:56:55 2025
    On Thursday, 3 July 2025 16:34:00 British Summer Time John Blinka wrote:
    Hello Gentooers,

    I could use some help getting sound to work on the above hardware.

    Googling shows that there has been widespread difficulty with this
    sound card on many distros. I haven't found a consensus on how to get
    it to work. Some folks have resorted to blacklisting various sound
    modules in modprobe.d. However, it does seem to work on Ubuntu,
    specifically ubuntu-22.04 (which uses a 6.6 kernel) and ubuntu-25
    (which uses a 6.14 kernel).

    I did get sound to work on the 6.6 series of gentoo-sources by copying
    things from ubuntu-22.04. Enabling SND_HDA_CODEC_HDMI was critical to
    success as was using ubuntu's /etc/modprobe.d/alsa-base.conf.

    When the 6.12 gentoo-sources arrived, I built a 6.12 kernel starting
    with the working 6.6 gentoo-sources and doing a "make olddefconfig".
    That's my usual kernel upgrade technique. But there's no sound. I have
    read that sound has received a substantial reworking between the 6.6
    and 6.12 kernel series.

    On gentoo-sources-6.6.92, dmesg gives:

    sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
    sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
    sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002) sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
    sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_exit [i915]) sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4
    Loading firmware: intel/sof/sof-rpl.ri
    sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864 sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0 sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3
    size 0x30
    sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864 sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:0 Loading firmware: intel/sof-tplg/sof-rpl-rt711-l0-rt1316-l12-rt714-l3.tplg sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI
    3:23:0 sof_sdw sof_sdw: ASoC: Parent card not yet available, widget card binding deferred
    sof_sdw sof_sdw: hda_dsp_hdmi_build_controls: no PCM in topology for
    HDMI converter 3
    input: sof-soundwire Headset Jack as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0/input10
    input: sof-soundwire HDMI/DP,pcm=5 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0/input11
    input: sof-soundwire HDMI/DP,pcm=6 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0/input12
    input: sof-soundwire HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sof_sdw/sound/card0/input13

    On gentoo-sources 6.12.31, dmesg gives:

    sof-audio-pci-intel-tgl 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
    sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002) sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
    sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_exit [i915]) sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 4 sof-audio-pci-intel-tgl 0000:00:1f.3: NHLT device BT(0) detected, ssp_mask 0x4 sof-audio-pci-intel-tgl 0000:00:1f.3: BT link detected in NHLT tables: 0x4 sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 0 Loading firmware: intel/sof/sof-rpl.ri
    Loading firmware: intel/sof-tplg/sof-rpl-rt711-l0-rt1316-l12-rt714-l3.tplg sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware paths/files for ipc type 0: sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware file:
    intel/sof/sof-rpl.ri sof-audio-pci-intel-tgl 0000:00:1f.3: Topology file: intel/sof-tplg/sof-rpl-rt711-l0-rt1316-l12-rt714-l3.tplg
    Loading firmware: intel/sof/sof-rpl.ri
    sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864 sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:1 sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3
    size 0x30
    sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864 sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:1

    I don't really know how to interpret the dmesg outputs, but it seems
    that the 6.6.92 output indicates that it has identified several card0 devices. The 6.12.31 output is missing comparable output. This
    difference is reflected in /proc/asound/cards.

    In 6.6.92, /proc/asound/cards contains
    0 [sofsoundwire ]: sof-soundwire - sof-soundwire
    Intel Soundwire SOF
    But in 6.12.31, /proc/asound/cards contains
    --- no soundcards ---

    I'm completely lost. Does anyone understand how to get modern Intel
    sound to work on modern kernels?

    Thanks in advance for any ideas!

    John Blinka

    I don't have your hardware to compare notes, but I suggest you start with
    this:

    https://wiki.gentoo.org/wiki/ALSA

    and in particular boot with Ubuntu, or whichever liveUSB allows your audio to work and run:

    lsmod
    lscpci | grep -i audio
    lspci -knn

    The above will give you a hint as to what drivers are required. In addition, the output of dmesg will show any firmware your hardware needs. I expect you would need to emerge:

    media-sound/alsa-utils
    sys-firmware/sof-firmware

    Finally, you can compare Ubuntu's output of 'zcat /proc/config.gz' with the audio modules you have enabled in your kernel and add what's relevant to your hardware.

    HTH
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmhmtlcACgkQseqq9sKV ZxnTTg/+PnQnhot7alvMV9UXiB0DYJcCDyF64C5RxwKNRSQBZGdFuaEBV+xYXvsd wuAU8sHYAXH6Sw2ZP8piaXlXiEfpaatYE5LK8+6CIvahWE5AkhEpXP1+ljCeFnV2 M5fpHGmMlHPjyYKOaTj1yIddxU7ld89PBiO9hZd9DvHdU19PXzrzfzSL4tSPo98/ ZwP4h5iknY+NIrn/X6uMyb2I+ng43r3jXpCGpD7vyq7mCvlfk2Kixi4/ZmSpfgo/ ZsKDE+Wx34Ofm8EUBy2OJfV3NJojJE8KJ3eOkOC+L2koMfRwwkjPUiA5qsBTUgG7 JOGJJTCIKqb+wayti/bOOFr8EgOIVlIKhtb+eAklu5iL5DQ5+OxC7s9mswqo1C7g Nu30OhYIFLHZvPdrg9DRlv6tRU9QqF3mB0c+R/9v1Z3WRIF0/rHhDRYZ/d3VRA0I eySLdc0NPsThE8pb4wExlDKc3oedSrVMafis0FeoaYI1baqjWFeMsjn928kJLShv l+lgh5mpo+NI0TSCzaFxMiLihC+70xHerfdHtDWFci+vcXjGQPPg7J7/H3AR5fbX IlT2g005CR0hcTUMq+5QENuRxQ/BlCeQQslIdK8wsIrdz8Vvs80mdt7vgRJquCo5 KJNfKUl4PlkDBYB0QBxJlLyDAVugjrZoPTC7cHsY6fCSkAvXeUM=
    =P4B1
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Fri Jul 4 15:20:52 2025
    On Friday, 4 July 2025 14:44:35 British Summer Time John Blinka wrote:
    On Thu, Jul 3, 2025 at 12:57 PM Michael <[email protected]> wrote:

    [snip ...]
    and in particular boot with Ubuntu, or whichever liveUSB allows your audio to work and run:

    lsmod

    There are 39 modules whose names begin with “snd_” or “sound”. The list is
    the same on the working ubuntu-25 and the non-working gentoo kernel 6.12 systems.

    OK, it seems your kernel is not missing any modules.

    [snip ...]
    Finally, you can compare Ubuntu's output of 'zcat /proc/config.gz' with
    the
    audio modules you have enabled in your kernel and add what's relevant to your hardware.

    There are a *lot* of audio modules in use according to lsmod. But they’re the same in both working ubuntu and non-working gentoo. It’s difficult to compare the working ubuntu config (based on a 6.14 kernel) and the non-working gentoo config (based in a 6.12 kernel). But I’m thinking that the identical lsmod output implies that the gentoo config supports the necessary hardware.

    Yes, unless some drivers have been built in the kernel on one OS and not the other. Please note what Javier posted just now.


    I appreciate your ideas!

    You're welcome, but let's see if you can get your audio working first. :-)


    I’ve noticed that using ubuntu’s /etc/modprobe.d/alsa-base.conf was crucial
    to successful sound in gentoo with a 6.6 kernel. Given that I appear to be using the same kernel modules as ubuntu, and the same firmware and topology files, perhaps my problem lies in how modprobe.d operates? Unfortunately, I do not understand what ubuntu is doing with alsa-base.conf.

    John Blinka

    A file '/etc/modprobe.d/something.conf' can be set up to enable/disable options when loading different modules. You can check a available options for a module by running:

    modinfo <module_name>

    Ubuntu may have scripted generic options in there, but you'll need to examine them or try them to see what they do.

    Another thing to check is if your default audio card is switched over when the hardware is initialised by udev. Typically you may find the MoBo audio card takes over from the discrete audio card and vice versa. In this case it could be HDMI works but nothing else does. You can declare which card is set as the default, by e.g. changing the card index order:

    options snd_hda_intel index=1,0

    Again compare Ubuntu and Gentoo 'aplay -L' output to spot any differences.

    HTH.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmhn40QACgkQseqq9sKV ZxnhxhAA5lMievd7u1OLraS55qn7nfSUksARoTm0OyWQW99kspf6RjZ7bFkXZQGc U0cKVwYx2IEPg3mqBm3mGecGW16RqiQx/7eq3JprxT8GpPBWrdC5rMt8OiicJq/O 7/+UDPN97M4NH78AjiZeCeC+bDZzUadc7kCD1HW8E7TC3yZXhUGLlojmThMZBnAj QjiUtBvQKgihooPCaxXFQ5Ayf9Lvklkk/k6yJH7CK49qA/8sUFcewwDrs0msaEK9 JM2X32y9Qn56CXH0m2juhZ3Hw2IGq0zwgccZtJTBOIVAeTYKhnab1QpmuyYA09f0 qe3TntXEyXCnJSsdppdrOfQzZnRo3E2RpIVQSnqXNodUo2f5LAknoejA8EDCJh2C P9LpmIhvzVRZjFcimInN+3OmffgmUAiaUJ7ZQbM8m+u6CsF7YKoi7YYEtgYw7POl QgwQACXXANNP4WxTYROS33+7ygfaFJcekvlsKh/Zx5Aaj5PK3DK03C+YqfXc/O9g bV5Fy1LTqhuSqUGInXqK+Sfs3HzqxztZ9lfALycq1ePxgIBd08M47HFrA4QUeBuw j+4X6UTq+MTYx8No48V3uYXeDHLe5jFVcur1n2Z2XAXN5DwJjAdCyPXmsVI+cOqm MVSkbIzlI9ISeyu6ICubUsv7up/AjyXHb/mTVxzPmhFx4almFH8=
    =tKHY
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Fri Jul 4 15:22:46 2025
    On Friday, 4 July 2025 15:20:52 British Summer Time Michael wrote:
    On Friday, 4 July 2025 14:44:35 British Summer Time John Blinka wrote:
    On Thu, Jul 3, 2025 at 12:57 PM Michael <[email protected]> wrote:
    [snip ...]

    and in particular boot with Ubuntu, or whichever liveUSB allows your audio
    to work and run:

    lsmod

    There are 39 modules whose names begin with “snd_” or “sound”. The list is
    the same on the working ubuntu-25 and the non-working gentoo kernel 6.12 systems.

    OK, it seems your kernel is not missing any modules.

    [snip ...]

    Finally, you can compare Ubuntu's output of 'zcat /proc/config.gz' with the
    audio modules you have enabled in your kernel and add what's relevant to your hardware.

    There are a *lot* of audio modules in use according to lsmod. But they’re the same in both working ubuntu and non-working gentoo. It’s difficult to compare the working ubuntu config (based on a 6.14 kernel) and the non-working gentoo config (based in a 6.12 kernel). But I’m thinking that the identical lsmod output implies that the gentoo config supports the necessary hardware.

    Yes, unless some drivers have been built in the kernel on one OS and not the other. Please note what Javier posted just now.

    I appreciate your ideas!

    You're welcome, but let's see if you can get your audio working first. :-)

    I’ve noticed that using ubuntu’s /etc/modprobe.d/alsa-base.conf was crucial
    to successful sound in gentoo with a 6.6 kernel. Given that I appear to be using the same kernel modules as ubuntu, and the same firmware and
    topology
    files, perhaps my problem lies in how modprobe.d operates? Unfortunately,
    I
    do not understand what ubuntu is doing with alsa-base.conf.

    John Blinka

    A file '/etc/modprobe.d/something.conf' can be set up to enable/disable options when loading different modules. You can check a available options for a module by running:

    modinfo <module_name>

    Ubuntu may have scripted generic options in there, but you'll need to
    examine them or try them to see what they do.

    Another thing to check is if your default audio card is switched over when the hardware is initialised by udev. Typically you may find the MoBo audio card takes over from the discrete audio card and vice versa. In this case
    it could be HDMI works but nothing else does. You can declare which card
    is set as the default, by e.g. changing the card index order:

    options snd_hda_intel index=1,0

    Again compare Ubuntu and Gentoo 'aplay -L' output to spot any differences.

    HTH.

    PS. I forgot to mention, you can play with alsamixer and F6 to switch between cards in real time - if this happens to be the problem.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmhn47YACgkQseqq9sKV Zxm3vxAA7wX71dKsh1tPfJkXbm7ReJloJlcsWjOacGRAP3bd3Dptg822jwiJ0PJd nGD4enQvVIRHfBi/KBg1q4Hp+71paQWQ+5+boCL/vHBvujYhqL8YFI9XIHWfO8E6 tfhHk+8K+J84rel7C5dOTJt1PPcazcnBBbu1SeEQk2qDrayCaZK4zvgjmzfEgbR2 oFDVAaOwzZVjWnu39f57HZgU3+UGNCR/MP92cbnO0CLPZ6zAQe8h0AWMAkRZaseJ CFcNYF2uMLumnZzJu3XK8DZWQ0MAuOIIDr+Zl6qljon4uPVyIVBMwqtb6ohneB35 eaZohalcUSyGE0ba8hgrndAhja+6tdrPA5gJd/t0Pj4O2036VMg8Nmc3yoJo8RJE GDGtARScQ4T3n3CArK8vr9M+dI9NGQjtCO3hcXAjuO/R+A1y/96UFGPEVg9WiQ54 DXElj+/azgNZiKz1ladQPK1qfSxtztQ+9C2BarskdOCyauRxLJ75CX8z+83fPa6A nMJ1ugyCeA8VT+T5q218rBUknmWhGDKgbEAdSwL7oOIZjU7bt+sjpmSaY+puVfSA fqztUZWrObR+vUUWU2EnCcSlKlICaD3zSNhe+1UnqkZIEJOvmBvePNyxENoGUchs fxe7ZisH6hLWDN6XvLAJfecMRGZKK1w7nfauNjAWwjJOIwwFFPg=
    =JJ5W
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Mon Jul 7 09:42:44 2025
    On Sunday, 6 July 2025 21:57:59 British Summer Time John Blinka wrote:
    Javier and Michael,

    Sorry to have gone silent for a while. Had houseguests and didn’t want to ignore them while burying myself in kernel configuration.

    However, your combined suggestions have borne fruit. I turned on many
    things in Gentoo’s 6.12 kernel that were present in Ubuntu’s 6.14 kernel,
    and now sound works in Gentoo.

    “Many things” is quite vague, I know. I did a diffconfig between Gentoo and
    Ubuntu and mindlessly made Gentoo more like Ubuntu. Until the sheer tedium made me quit, compile a kernel, and reboot. It worked, but right now I have no idea why. I will gradually pare down the differences between my new working Gentoo 6.12 kernel configuration and the old nonworking Gentoo
    kernel config until I’ve identified the changes that brought sound to life. And I’ll report back then.

    I very much appreciate both of your suggestions and your willingness to help!!

    John Blinka

    Glad you got your sound going. It is usually a matter of enabling the modules in the kernel necessary for your hardware and perhaps adding any firmware, setting the order of the desired audio card to be used as the default if you have more than one card and unmuting it. When comparing kernel configs check what's build in the kernel and what is set as a module. Using 'alsactl init' flags up anything amiss as it tries to load needed modules, but I haven't had to use this for years now because the drives are less buggy than what they used to be.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmhriIQACgkQseqq9sKV Zxmz0RAA0is2vf6XgksmJ1cITJUhG8nGgtYgvn7DisMs9Yl+sw74leo1kFRiOzT6 0xAnvduCbGzwnLNQomRM5eB6hQxFSyj42t7MZYqFFJRusS9IDTFcmAKUOD/dZl13 DO1cHi+v5dWbnytnOFPgib+lnmScvC7d7V5wvgLyn1KMvgt/lHiiOjmnJ/Co1Wvi ohkOFLH4QRfS+Q+ML73zAal7YZvCRCN78fVE9Y7Ns7dtN26zw3GOhUHHJcnekuyB fHnfX0nEs5iJT0ORLYmu51lIw7bFevz+scdo+ljqJgRvMY67y6YsPOlHcDihCFR1 QSXmjEHnl1VfGrwnMZh9L6tyupwT7ctvpNBZU+w9f705/f3T23vdHRws/qec5mfa TUhoM+j04slQObdKZaEhrxcx+r/j53SoDX4P0O/YSJwA5bZk1t+dgY7B2bK/nI4C KDFHyqpsSXSFqa9Pm2DIgGntuBHZypona+5npsI070AcyYRNKb5mIS5OqSLS8Y2G WQ/JG20KFNeHmdXpL16Bco/CsUVHzVjogRbEmX0d3d2bnVJr13cqBH1eSYNSIjrA OvI2KaYaCaBko98KTQFXX7IUSGvz6L/ZrnfIxQ9eCZWIx/d+zZWjKa0H4mNv0Z7X BN9mMvPiFdPCaUKgc6mOvvFg7Oa9Th+QZT0gT1zvzLko7OkHN2I=
    =G7Mr
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)