Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

ALSA speaker-test fails: No such file or directory

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
avitase
n00b
n00b
Posts: 41
Joined: Sun Apr 26, 2015 5:31 pm

ALSA speaker-test fails: No such file or directory

  • Quote

Post by avitase » Sun Apr 12, 2020 5:21 pm

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: 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
... and thus tested the hdmi speaker via:

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
...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: 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
I didn't touch /etc/modprobe.d/alsa.conf so far... because I don't understand what to do here:/

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
Looking forward to get enlightened!
Top
RayDude
Advocate
Advocate
User avatar
Posts: 2194
Joined: Sat May 29, 2004 6:11 am
Location: San Jose, CA

  • Quote

Post by RayDude » Sat Apr 18, 2020 9:44 pm

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.
Top
ipic
Guru
Guru
User avatar
Posts: 467
Joined: Mon Dec 29, 2003 9:50 am
Location: UK

  • Quote

Post by ipic » Sat Apr 18, 2020 10:27 pm

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: Select all

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 ~ $ 
Top
Post Reply

3 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy