View previous topic :: View next topic |
Author |
Message |
avitase n00b
Joined: 26 Apr 2015 Posts: 41
|
Posted: Sun Apr 12, 2020 5:21 pm Post subject: ALSA speaker-test fails: No such file or directory |
|
|
Hi,
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: | # 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
|
... and thus tested the hdmi speaker via:
Code: | # 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
|
...which obviously failes, same for front. Interestingly, alsamixer shows empty blocks for all S/PDIF1...5 (Card: HD-Audio Generic, Chip: ATI R6xx HDMI), but rather reasonable volume bars for my second card (Card: HD-Audio Generic, Chip: Realtek ALC892). I can vaguely remember, that before emerging and removing pulseaudio, I didn't get the speaker-test failure for hdmi (but still for front) but couldn't here anything anyhow, but I couldn't reproduce this configuration....
Code: | # 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: | # 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
|
I didn't touch /etc/modprobe.d/alsa.conf so far... because I don't understand what to do here:/
Code: | # 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
|
Looking forward to get enlightened! |
|
Back to top |
|
|
RayDude Advocate
Joined: 29 May 2004 Posts: 2066 Location: San Jose, CA
|
Posted: Sat Apr 18, 2020 9:44 pm Post subject: |
|
|
There are a lot of hdmi devices listed in aplay, you need to try each of them to figure out which device the monitor is connected to.
Try sending the waveform to all of the hdmi outputs, not just the first, one of them should work.
If you use a GUI, then you can install pulseaudio. It will help you identify connected devices, however you have to enable it and rebuild everything and tell alsa apps to redirect to pulse and pulse to use alsa output.
pavucontrol or pavucontrol-qt will let you choose your output device and when it works, you'll get a graphic on X that shows you selected HDMI...
There might be a way to see what devices are connected in lspci as well... I've not done it though. _________________ Some day there will only be free software. |
|
Back to top |
|
|
ipic Guru
Joined: 29 Dec 2003 Posts: 383 Location: UK
|
Posted: Sat Apr 18, 2020 10:27 pm Post subject: |
|
|
I have a very similar aplay -L output, which makes me think you are using a graphics card with 5 ports (2xHDMI, 2xDisplay port, 1xDVI in my case).
If you are running an X session, xrandr tells you what is connected. In my case: Code: |
ipic@ian2 ~ $ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
HDMI-A-0 disconnected (normal left inverted right x axis y axis)
HDMI-A-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.00*+ 50.00 59.94
1680x1050 59.88
1280x1024 75.02 60.02
1440x900 74.98 59.90
1280x960 60.00
1280x800 60.00
1152x864 75.00
1280x720 60.00 50.00 59.94
1440x576 50.00
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08
DVI-D-0 disconnected (normal left inverted right x axis y axis)
ipic@ian2 ~ $ |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|