Score:1

Primary sound card not detected by alsamixer

ru flag

I installed Ubuntu 20.04 on my PC. My screen has built-in speakers. Sound is only coming via the speakers of my screen which is connect via HDMI. They are not powerful enough and I want to connect my speakers to the master output. On the sound setting I have no other output option and Ubuntu is unable to recognize my native sound card even on alsamixer.

This is the output of lspci -v | grep -A7 -i "audio":

00:1f.3 Multimedia audio controller: Intel Corporation Cannon Point-LP High Definition Audio Controller (rev 30)
    DeviceName: Onboard - Sound
    Subsystem: Intel Corporation Cannon Point-LP High Definition Audio Controller
    Flags: bus master, fast devsel, latency 32, IRQ 139
    Memory at a1338000 (64-bit, non-prefetchable) [size=16K]
    Memory at a1000000 (64-bit, non-prefetchable) [size=1M]
    Capabilities: <access denied>
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel, snd_sof_pci

aplay -l:

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

At the end of my /etc/modprobe.d/alsa-base.conf:

    # Prevent abnormal drivers from grabbing index 0
    options bt87x index=-2
    options cx88_alsa index=-2
    options saa7134-alsa index=-2
    options snd-atiixp-modem index=-2
    options snd-intel8x0m index=-2
    options snd-via82xx-modem index=-2
    options snd-usb-audio index=-2
    options snd-usb-caiaq index=-2
    options snd-usb-ua101 index=-2
    options snd-usb-us122l index=-2
    options snd-usb-usx2y index=-2
    # Ubuntu #62691, enable MPU for snd-cmipci
    options snd-cmipci mpu_port=0x330 fm_port=0x388
    # Keep snd-pcsp from being loaded as first soundcard
    options snd-pcsp index=-2
    # Keep snd-usb-audio from beeing loaded as first soundcard
    options snd-usb-audio index=-2

This is what my alsamixer is showing if I try to select another sound card: enter image description here

I am aware my question is a duplicate but I tried many suggestions on the web none of which worked for me.

Score:0
pk flag

The second Card should also be listed/loaded. For the not wanted HDMI-Devices I used the module pci_stub to claim the Audio-Device before the snd-modules are loaded. After adding the line you have to execute update-initramfs -u if i remember correctly.

To use the pci_stub-Module on your not wanted Soundcard, you have to get the PCI-Vendor-Info with lspci -nn. In my Case this was the following

lspci -nn |grep -i audio
01:00.1 Audio device [0403]: NVIDIA Corporation TU116 High Definition Audio Controller [10de:1aeb] (rev a1)
06:00.0 Audio device [0403]: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series] [1102:0012] (rev 01)

As i want to get rid of the 'Audio Card' from my GPU the wanted ID is "10de:1aeb". You then put the pci_stub ids=10de:1aeb in the File /etc/initramfs-tools/modules.

The listet modules in that File will be loaded' before automatic Module-Loading where a device ususally gets the correct module/driver. The ids=10de:1aeb or in your case some other String is needed so that the correct PCI-Card will be chosen(i think it doesn't even work without) which then ,through the pci_stub-module, will be blocked from 'auto-loading' the correct 'snd-*' module. And therefore no /dev/snd/hwXYZ-Device will be created and alsa won't recognize it as a Sound-Card.

lspci -s 01:00.01 -v
01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
    Subsystem: Gigabyte Technology Co., Ltd TU116 High Definition Audio Controller
    Flags: bus master, fast devsel, latency 0, IRQ 10, IOMMU group 1
    Memory at df080000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Kernel driver in use: pci-stub
    Kernel modules: snd_hda_intel

Here you can see the 'Kernel driver in use'

And as a result of blocking the NVIDIA-CARD i got only one Card recognized

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Creative [HDA Creative], device 0: ALC898 Analog [ALC898 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

It isn't directly your problem but maybe it helps. :-)

In my Case Sound worked, but Switching the Hardware-IDs around for alsa and things like that... ..*******.. my Displays don't even have Speakers..

ru flag
Thank you for your answer. Could you please explain your answer further? I am not an advanced Linux user.
crpb avatar
pk flag
I think that should do.
crpb avatar
pk flag
Or do i understand your 'lspci |grep' output now as if the second Card isn't even recognized by your system?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.