You are not logged in.

#1 2014-09-05 23:41:35

EscapedNull
Member
Registered: 2013-12-04
Posts: 129

[SOLVED] ALSA: Playback open error: -2,No such file or directory

I'm setting up a fresh Arch installation on a new system, and I'm stuck at ALSA. The hardware seems to be detected just fine, kernel modules are in place, and cards are available in alsamixer. The problem is that I have not heard any sound through all the testing I've done so far, and furthermore speaker-test outputs an error on some commands.

$ lspci | grep -i audio
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)

$ 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
default:CARD=Generic_1
    HD-Audio Generic, 92HD81B1X5 Analog
    Default Audio Device
sysdefault:CARD=Generic_1
    HD-Audio Generic, 92HD81B1X5 Analog
    Default Audio Device
front:CARD=Generic_1,DEV=0
    HD-Audio Generic, 92HD81B1X5 Analog
    Front speakers
surround21:CARD=Generic_1,DEV=0
    HD-Audio Generic, 92HD81B1X5 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic_1,DEV=0
    HD-Audio Generic, 92HD81B1X5 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic_1,DEV=0
    HD-Audio Generic, 92HD81B1X5 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic_1,DEV=0
    HD-Audio Generic, 92HD81B1X5 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic_1,DEV=0
    HD-Audio Generic, 92HD81B1X5 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic_1,DEV=0
    HD-Audio Generic, 92HD81B1X5 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

 $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 $ ls -R /dev/snd
/dev/snd:
by-path  controlC0  controlC1  hwC0D0  hwC1D0  pcmC0D3p  pcmC1D0c  pcmC1D0p  seq  timer

/dev/snd/by-path:
pci-0000:00:01.1  pci-0000:00:14.2

 $ cat /proc/asound/version 
Advanced Linux Sound Architecture Driver Version k3.16.1-1-ARCH.
 
$ ls -R /proc/asound/
/proc/asound/:
Generic  Generic_1  card0  card1  cards  devices  hwdep  modules  oss  pcm  seq  timers  version

/proc/asound/card0:
codec#0  eld#0.0  id  pcm3p

/proc/asound/card0/pcm3p:
info  sub0

/proc/asound/card0/pcm3p/sub0:
hw_params  info  prealloc  prealloc_max  status  sw_params

/proc/asound/card1:
codec#0  id  pcm0c  pcm0p

/proc/asound/card1/pcm0c:
info  sub0

/proc/asound/card1/pcm0c/sub0:
hw_params  info  prealloc  prealloc_max  status  sw_params

/proc/asound/card1/pcm0p:
info  sub0

/proc/asound/card1/pcm0p/sub0:
hw_params  info  prealloc  prealloc_max  status  sw_params

/proc/asound/oss:
devices  sndstat

/proc/asound/seq:

$ groups
... audio ...

$ cat /proc/asound/devices 
  2: [ 0]   : control
  3: [ 0- 3]: digital audio playback
  4: [ 0- 0]: hardware dependent
  5: [ 1]   : control
  6: [ 1- 0]: digital audio playback
  7: [ 1- 0]: digital audio capture
  8: [ 1- 0]: hardware dependent
 33:        : timer

  $ cat /proc/asound/card0/
codec#0  eld#0.0  id       pcm3p/   

 $ cat /proc/asound/card0/id
Generic

$ cat /proc/asound/card1/id
Generic_1

$ cat /proc/asound/pcm 
00-03: HDMI 0 : HDMI 0 : playback 1
01-00: 92HD81B1X5 Analog : 92HD81B1X5 Analog : playback 1 : capture 1

$ speaker-test -D null
Playback device is null
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 1 to 206158430
Period size range from 0 to 206158431
Using max buffer size 206158428
Periods = 4
was set period_size = 51539607
was set buffer_size = 206158428
 0 - Front Left
Time per period = 0.901123
 0 - Front Left
^CTime per period = 0.923538

$ speaker-test -D default
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

$ speaker-test -D default -c 2
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

$ speaker-test -D hdmi        
Playback device is hdmi
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Channels count (1) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument

 $ speaker-test -D hdmi -c 2
Playback device is hdmi
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
^CTime per period = 6.712498


$ speaker-test -D sysdefault
Playback device is sysdefault
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

$ speaker-test -D sysdefault -c 2
Playback device is sysdefault
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

$ speaker-test -D surround21     
Playback device is surround21
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory

$ speaker-test -D surround21 -c 2
Playback device is surround21
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory

$ lsmod | grep snd
snd_hda_codec_idt      56908  1 
snd_hda_codec_generic    63126  1 snd_hda_codec_idt
snd_hda_codec_hdmi     45117  1 
snd_hda_intel          26327  1 
snd_hda_controller     26727  1 snd_hda_intel
snd_hda_codec         108552  5 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep              17244  1 snd_hda_codec
snd_pcm                88487  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              26614  1 snd_pcm
snd                    69340  10 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_idt,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
soundcore              13031  2 snd,snd_hda_codec

$ cat /proc/asound/**/info
card: 0
device: 3
subdevice: 0
stream: PLAYBACK
id: HDMI 0
name: HDMI 0
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
card: 0
device: 3
subdevice: 0
stream: PLAYBACK
id: HDMI 0
name: HDMI 0
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
card: 1
device: 0
subdevice: 0
stream: CAPTURE
id: 92HD81B1X5 Analog
name: 92HD81B1X5 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
card: 1
device: 0
subdevice: 0
stream: CAPTURE
id: 92HD81B1X5 Analog
name: 92HD81B1X5 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: 92HD81B1X5 Analog
name: 92HD81B1X5 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: 92HD81B1X5 Analog
name: 92HD81B1X5 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

That's the gist of it, anyway. I can provide more information as needed. Assistance is much appreciated!

Disclaimer:
I usually put more time into solving problems on my own before posting on the forum, but I'd like to have this fixed as quickly as possible as audio is rather important. With that having been said, I haven't read the ALSA documentation, nor the alsa-utils manuals. I don't really understand the difference between a "card" and a "device" and a "mixer" and a "PCM", so feel free to give me the RTFM.

Edit: solved.

Last edited by EscapedNull (2014-09-06 00:59:15)

Offline

#2 2014-09-05 23:49:32

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] ALSA: Playback open error: -2,No such file or directory

https://bbs.archlinux.org/viewtopic.php … 3#p1446773 only use the line where index has two values.

Offline

#3 2014-09-06 00:11:00

EscapedNull
Member
Registered: 2013-12-04
Posts: 129

Re: [SOLVED] ALSA: Playback open error: -2,No such file or directory

emeres wrote:

https://bbs.archlinux.org/viewtopic.php … 3#p1446773 only use the line where index has two values.

Well, I have no idea what I just did or why, but it worked! I'll dig into the details when I have some free time. Thanks!

Offline

#4 2014-09-06 00:22:48

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] ALSA: Playback open error: -2,No such file or directory

 You are welcome. Additional explanation has been added at the referenced post, read the whole thread or search for my other posts, then it should be clear. For the record, this is the correct solution:

$ cat /etc/modprobe.d/50-alsa.conf
options snd-hda-intel index=1,0

 Edit: And remember to mark the thread as solved.

Last edited by emeres (2014-09-06 00:23:45)

Offline

#5 2014-12-28 04:23:48

chickengod37
Member
Registered: 2014-04-13
Posts: 1

Re: [SOLVED] ALSA: Playback open error: -2,No such file or directory

HI, another newbie here with the exact same problem, except for the fix didn't work for me.

$ cat /etc/modprobe.d/50-alsa.conf
options snd-hda-intel index=1,0

The variable is set just like in emeres's solution, but there was no change the output of speaker-test.

$ speaker-test -D default -c 2

speaker-test 1.0.28

Playback devices is default
Stream parameters are 4800Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmis_open) unable to open slave
Playback open error: -2, No such file or directory

Does anyone have any other information relating to how to fix this, am I just an idiot?

Offline

#6 2014-12-28 20:12:47

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 341
Website

Re: [SOLVED] ALSA: Playback open error: -2,No such file or directory

@chickengod37 Please start a new thread describing your issue in detail also give output of

cat /proc/asound/cards

Regards

Offline

Board footer

Powered by FluxBB