How to Troubleshoot Audio or Sound on Gentoo

  2 mins read  

Linux controls the computer’s audio with a system that identifies the architecture and plays the audio behind the device’s drive.

The current component that the Linux kernel uses to perform this function is ALSA which stands for Advanced Linux Sound Architecture.

Normally, ALSA supports up to eight boards numbered 0 through 7. Each board is a physical or logical core device with input, output or sound control capability and can also be addressed by its id which is an explanatory string such as Headset or ICH9 .

If the board is omitted, this means board 0 or default board, where most of the sounds are played and that is determined by the operating system. Plates have numbered devices starting with 0.

When you install Gentoo, these devices generally do not automatically recognize for various reasons

  • 1 — You did not properly enable the device drive in the kernel. So first make sure the device is enabled in the Linux Kernel
lspci | grep -i audio
cd /usr/src/linux && make menuconfig

Activate the following kernel options:

/assets/img/media/kernel-alsa.gif

The lsmod command can be helpful.

If the system has more than 8 sound outputs (Each HDMI output on a GPU will count as one), the max number of sound cards will need to be increased:

/assets/img/media/kernel-alsa-2.gif

  • 2 — Next you need to check if the devices are being listed
cat /proc/asound/cards
  • 3— Compile alsautils so you can see the devices and configure them
emerge --ask media-sound/alsa-utils
  • 4 — With the normal user (not the root) run the command below and read the tips that appear (for example, F6 to list the sound cards)
# normal user, dont'n run root
alsamixer

/assets/img/media/alsamixer.gif

  • 5 — If nothing happens and the problem persists, force the card to read by editing the file alsa.conf
vim /etc/modprobe.d/alsa.conf

And insert the content below at the end of the file

options snd-ca0106 index=0
alias snd-card-1 snd-hda-intel
options snd-hda-intel index=1
options snd cards_limit=2

Restart the system and enjoy the sound!

via: Marcos Oliveira Medium

Join our Facebook group