You are not logged in.
Pages: 1
I have a system with a minimalistic sound setup via alsa.
It is connected to a TV via HDMI.
The graphics output works fine, but I am struggling with the audio output.
$ sudo amixer
Simple mixer control 'Master',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 81 [93%] [-4.50dB] [on]
Front Right: Playback 81 [93%] [-4.50dB] [on]
Simple mixer control 'Mic Boost',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 0 [0%] [0.00dB]
Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',1
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',2
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',3
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958',4
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 39 [62%] [12.00dB] [on]
Front Right: Capture 39 [62%] [12.00dB] [on]
Simple mixer control 'Loopback Mixing',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Disabled'
With
aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav
I can successfully play the test sound.
However I cannot get the sound to work with any other program, e.g. mplayer.
$ mplayer /usr/share/sounds/alsa/Front_Center.wav
MPlayer SVN-r38139 (C) 2000-2019 MPlayer Team
225 audio & 465 video codecs
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing /usr/share/sounds/alsa/Front_Center.wav.
libavformat version 58.29.100 (external)
Audio only file format detected.
Load subtitles in /usr/share/sounds/alsa/
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 1 ch, s16le, 768.0 kbit/100.00% (ratio: 96000->96000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
[AO_ALSA] Playback open error: Permission denied
AO: [pulse] Init failed: Connection refused
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
[JACK] cannot open server
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': Permission denied
[OpenAL] could not open device
DVB card number must be between 1 and 4
AO: [null] 48000Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 1.4 (01.3) of 1.0 (01.0) 0.2%
Audio output truncated at end.
A: 1.4 (01.3) of 1.0 (01.0) 0.2%
Exiting... (End of file)
In the above example I hear nothing.
I read through this paragraph but also the configurations did not work:
$ cat .asoundrc
pcm.!default {
type hw
card 0
device 3
}
$ cat .asoundrc
defaults.pcm.card 0
defaults.pcm.device 3
defaults.ctl.card 0
What am I missing?
Solution:
The respective user had to be in the group audio.
This happens if you skip the main article...
Last edited by schard (2019-11-26 12:19:08)
macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }
Offline
normally your user doesn't *need* to be in the audio group, you are likely just masking a deeper issue by doing so. often times your audio card is blocked because it's in some shape or form used by something else, or you don't have a proper logind session. What's your output for
sudo fuser -v /dev/snd/*
?
Offline
$ LANG=C sudo fuser -v /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/pcmC0D3p: digsig 3183 F.... adl
Which seems right. digsig is the user for the digital signage application, which is run by adl (yes, we still use flash, unfortunately).
Since I added the user to the audio group, the sound is working fine.
Last edited by schard (2019-11-26 13:33:21)
macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }
Offline
Pages: 1