I have a fresh gentoo install on my desktop PC and have some problems playing sound. I want to use the speakers of my monitor (connected via one of the hdmi ports of my graphic card) and my headphones which I use to plugin into the front. I followed the ALSA Gentoo Wiki: https://wiki.gentoo.org/wiki/ALSA as close as possible but didn't understand all. This is the first time for me tinkering with ALSA directly, so please feel free to assume, that I know nothing and that everything I did so far was wrong.
I used aplay to find the name of my devices:
Code: Select all
# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=Generic,DEV=0
HD-Audio Generic, HDMI 0
HDMI Audio Output
hdmi:CARD=Generic,DEV=1
HD-Audio Generic, HDMI 1
HDMI Audio Output
hdmi:CARD=Generic,DEV=2
HD-Audio Generic, HDMI 2
HDMI Audio Output
hdmi:CARD=Generic,DEV=3
HD-Audio Generic, HDMI 3
HDMI Audio Output
hdmi:CARD=Generic,DEV=4
HD-Audio Generic, HDMI 4
HDMI Audio Output
hdmi:CARD=Generic,DEV=5
HD-Audio Generic, HDMI 5
HDMI Audio Output
default:CARD=Generic_1
HD-Audio Generic, ALC892 Analog
Default Audio Device
sysdefault:CARD=Generic_1
HD-Audio Generic, ALC892 Analog
Default Audio Device
front:CARD=Generic_1,DEV=0
HD-Audio Generic, ALC892 Analog
Front speakers
surround21:CARD=Generic_1,DEV=0
HD-Audio Generic, ALC892 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic_1,DEV=0
HD-Audio Generic, ALC892 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic_1,DEV=0
HD-Audio Generic, ALC892 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic_1,DEV=0
HD-Audio Generic, ALC892 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic_1,DEV=0
HD-Audio Generic, ALC892 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic_1,DEV=0
HD-Audio Generic, ALC892 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
Code: Select all
# speaker-test -t wav -c 2 hdmi
speaker-test 1.2.1
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.1.2/work/alsa-lib-1.2.1.2/src/pcm/pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
Code: Select all
# cat /proc/asound/cards
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfcca0000 irq 62
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfc800000 irq 64
Code: Select all
# lspci | grep -i audio
0b:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio
0d:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
Code: Select all
# cat /etc/modprobe.d/alsa.conf
# Alsa kernel modules' configuration file.
# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore
##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
## ALSA portion
## alias snd-card-0 snd-interwave
## alias snd-card-1 snd-ens1371
## OSS/Free portion
## alias sound-slot-0 snd-card-0
## alias sound-slot-1 snd-card-1
##
# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
## OSS/Free portion - card #2
## alias sound-service-1-0 snd-mixer-oss
## alias sound-service-1-3 snd-pcm-oss
## alias sound-service-1-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
# Set this to the correct number of cards.
options snd cards_limit=1


