View previous topic :: View next topic |
Author |
Message |
FilthyPitDog Apprentice
Joined: 12 Jan 2021 Posts: 199 Location: South Pacific
|
Posted: Sat Dec 28, 2024 12:46 am Post subject: [Solved] ALSA - unable to open slave |
|
|
When I try playing any audio with alsa I get this below
Code: | ➜ speaker-test -c2
speaker-test 1.2.12
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.12/work/alsa-lib-1.2.12/src/pcm/pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory |
There is nothing in /var/tmp/portage so I dont know why its checking there...? _________________ Gentoo is a way of life...
Last edited by FilthyPitDog on Sat Dec 28, 2024 3:00 am; edited 1 time in total |
|
Back to top |
|
|
FilthyPitDog Apprentice
Joined: 12 Jan 2021 Posts: 199 Location: South Pacific
|
Posted: Sat Dec 28, 2024 2:59 am Post subject: |
|
|
Solved
Code: | ➜ speaker-test -c2
speaker-test 1.2.12
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Periods = 4
was set period_size = 1024
was set buffer_size = 4096
0 - Front Left
1 - Front Right |
by creating ~/.asoundrc with contents:
Code: | defaults.pcm.!card 2
defaults.pcm.!device 0 |
as card 2 is what I needed
Code: | ➜ 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 0: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 7: HDMI 1 [MSI G27CQ4 E2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Generic_1 [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0 |
_________________ Gentoo is a way of life... |
|
Back to top |
|
|
FranciscoJaimes n00b
Joined: 15 Jan 2025 Posts: 24 Location: Mexico
|
Posted: Wed Jan 15, 2025 10:14 pm Post subject: |
|
|
The error you're encountering is related to ALSA trying to access files in /var/tmp/portage, which is not a typical location for ALSA configuration or data files. This might be caused by a broken or misconfigured ALSA installation.
To resolve this:
Check your ALSA configuration:
Make sure your /etc/asound.conf or ~/.asoundrc files are set up correctly, especially if you're using a custom setup. They should not reference /var/tmp/portage.
Rebuild ALSA libraries:
Try rebuilding the ALSA libraries to ensure everything is properly configured. You can do this with:
bash
sudo emerge --rebuild media-libs/alsa-lib
Clear temporary files:
If there are leftover files in /var/tmp/portage, you can safely remove them (since they are temporary) with:
bash
sudo rm -rf /var/tmp/portage/*
Check the ALSA device:
Make sure the audio device exists and is accessible by running:
aplay -l
After doing these steps, try running speaker-test again to check if the issue is resolved. |
|
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
|
|