Code: Select all
$ speaker-test
speaker-test 1.2.11
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory
Any help is appreciated.
Code: Select all
$ speaker-test
speaker-test 1.2.11
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory
Code: Select all
# emerge -pv alsa-utils
# rc-update add alsasound boot
! Unmute channels with:
# alsamixer
! Be sure to unmute all (also SPDIF): It must be OO and not MM
! I tested ALSA with:
# speaker-test -t wav -c 2
-> Failed
# aplay -l
->
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: PCH [HDA Intel PCH], Gerät 0: ALC897 Analog [ALC897 Analog]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 1: ALC897 Digital [ALC897 Digital]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 3: HDMI 0 [Acer ET430K]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 7: HDMI 1 [HDMI 1]
Sub-Geräte: 1/1
[...]
<-
! Configure default device: my monitor (HDMI 0) ->
# nano -w /etc/asound.conf
=>
defaults.pcm.card 0
defaults.pcm.device 3
<=
# speaker-test -t wav -c 2
-> now okCode: Select all
cat /proc/asound/cards0 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfcf40000 irq 63
1 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfcc00000 irq 64
Code: Select all
$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7410000 irq 40
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xf7080000 irq 17

Code: Select all
$ aplay --list-devices
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
Code: Select all
$ aplay --list-pcms
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=PCH
HDA Intel PCH, ALC662 rev1 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC662 rev1 Analog
Front output / input
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC662 rev1 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC662 rev1 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC662 rev1 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC662 rev1 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC662 rev1 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC662 rev1 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=NVidia,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
HDA NVidia, HDMI 1
HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
HDA NVidia, HDMI 2
HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
HDA NVidia, HDMI 3
HDMI Audio Output

Code: Select all
pcm.!default {
type hw
card 0
device 0
}
ctl.!default {
type hw
card 0
}
What exactly has not worked ? Your test with "speaker-test" ?sakey wrote:Thanks for the answer, Pietinger, but unfortunately it has not worked.
Code: Select all
$ cat /etc/asound.conf
defaults.pcm.!card PCH
defaults.pcm.device 1
defaults.ctl.!card PCH
Code: Select all
speaker-testEvery card has a number ... it is 0 for your PCH ... and this:sakey wrote:My card has a name so that is why I am using !card instead of cardCode: Select all
$ cat /etc/asound.conf defaults.pcm.!card PCH defaults.pcm.device 1 defaults.ctl.!card PCH
Code: Select all
card 0: PCH [HDA Intel PCH], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]Code: Select all
$ cat /etc/asound.conf
defaults.pcm.card 0
defaults.pcm.device 0what are the permissions on this file? It should be readable by everyone:sakey wrote:Same error -2. I forgot to say, default device works as root
Code: Select all
-rw-r--r-- 1 root root 42 18. Mai 2023 asound.confCode: Select all
$ ls asound.conf -l
.rw-r--r-- 62 sakey 19 Jun 20:42 asound.conf

In that case, I'd guess that either one or more of the config files, or one or more of the devices in /dev/snd, are not readable for your user.sakey wrote:Same error -2. I forgot to say, default device works as root
Code: Select all
$ ls -l /dev/snd/
drwxr-xr-x 2 root root 60 May 14 09:17 by-path
crw-rw---- 1 root audio 116, 0 May 14 09:17 controlC0
crw-rw---- 1 root audio 116, 16 May 14 09:17 pcmC0D0p
crw-rw---- 1 root audio 116, 1 May 14 09:17 seq
crw-rw---- 1 root audio 116, 33 May 14 09:17 timer
Code: Select all
$ /bin/ls -l
total 0
crw-rw---- 1 root audio 116, 7 Jun 19 15:51 controlC0
crw-rw---- 1 root audio 116, 13 Jun 19 15:51 controlC1
crw-rw---- 1 root audio 116, 5 Jun 19 15:51 hwC0D2
crw-rw---- 1 root audio 116, 6 Jun 19 15:51 hwC0D3
crw-rw---- 1 root audio 116, 12 Jun 19 15:51 hwC1D0
crw-rw---- 1 root audio 116, 3 Jun 19 15:51 pcmC0D0c
crw-rw---- 1 root audio 116, 2 Jun 19 20:42 pcmC0D0p
crw-rw---- 1 root audio 116, 4 Jun 19 15:51 pcmC0D2c
crw-rw---- 1 root audio 116, 8 Jun 19 15:51 pcmC1D3p
crw-rw---- 1 root audio 116, 9 Jun 19 15:51 pcmC1D7p
crw-rw---- 1 root audio 116, 10 Jun 19 15:51 pcmC1D8p
crw-rw---- 1 root audio 116, 11 Jun 19 15:51 pcmC1D9p
crw-rw---- 1 root audio 116, 33 Jun 19 15:51 timer
Code: Select all
open("/dev/snd/controlC3", O_RDWR|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC3", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/dev/aloadC3", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC3", O_RDWR|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
writev(1, [{iov_base="Playback open error: -2,No such "..., iov_len=49}, {iov_base="\n", iov_len=1}], 2Playback open error: -2,No such file or directory
) = 50
exit_group(1) = ?
+++ exited with 1 +++
This looks weird to me. If the file is owned by your user, then it should be in your home directory, and be named .asoundrc or in your ~/.config/alsa/ directory and named asoundrc. If the file is in /etc, it should be owned by root and be named asound.conf.sakey wrote:It is owned by my user account. Does root have to own it?Code: Select all
$ ls asound.conf -l .rw-r--r-- 62 sakey 19 Jun 20:42 asound.conf
Mode 664 or mode 660? You show 660, and that is what I have on my system. You wrote 664.lars_the_bear wrote:It's usual to have something like this:with group 'audio' and mode 664.Code: Select all
$ ls -l /dev/snd/ drwxr-xr-x 2 root root 60 May 14 09:17 by-path crw-rw---- 1 root audio 116, 0 May 14 09:17 controlC0 crw-rw---- 1 root audio 116, 16 May 14 09:17 pcmC0D0p crw-rw---- 1 root audio 116, 1 May 14 09:17 seq crw-rw---- 1 root audio 116, 33 May 14 09:17 timer
Code: Select all
$ namei -l /etc/asound.conf ~/.asoundrc ~/.config/alsa/asoundrc ; for f in /etc/asound.conf ~/.asoundrc ~/.config/alsa/asoundrc; do echo "$f"; cat -n "$f"; done
f: /etc/asound.conf
drwxr-xr-x root root /
drwxr-xr-x root root etc
-rw-r--r-- sakey sakey asound.conf
f: /home/sakey/.asoundrc
drwxr-xr-x root root /
drwxr-xr-x root root home
drwx------ sakey sakey sakey
.asoundrc - No such file or directory
f: /home/sakey/.config/alsa/asoundrc
drwxr-xr-x root root /
drwxr-xr-x root root home
drwx------ sakey sakey sakey
drwxr-xr-x sakey sakey .config
drwxr-xr-x sakey sakey alsa
-rw-r--r-- sakey sakey asoundrc
/etc/asound.conf
1 defaults.pcm.card 0
2 defaults.pcm.device 0
3 defaults.ctl.card 0
/home/sakey/.asoundrc
cat: /home/sakey/.asoundrc: No such file or directory
/home/sakey/.config/alsa/asoundrc
1 pcm.!default {
2 type hw
3 card 3
4 device 1
5