Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Strange ALSA behaviour, ALSA aplay X11
igadoter
 Posted: Jul 5 2015, 04:57 PM
Quote Post


SLF Member
***

Group: Members
Posts: 54
Member No.: 3337
Joined: 13-January 15









Hi,

I was blaming pulseaudio for my problems with sound, but after digging it seems that it is ALSA which should be blamed. By default I am running system in runlevel 3. When I am logged in (console:tty's) then
CODE

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
 Subdevices: 1/1
 Subdevice #0: subdevice #0

and it is ok! But after running X11
CODE

$ startx

so, now I am working in graphic mode, and when I issue the same command but now in xterm, then
CODE

$ aplay -l
aplay:  device_list:256: no soundcards found...

it is well ..crazy ? Why ALSA can't find audio card from the inside of X? Here's lspci
CODE

$ lspci | grep Audio
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)
PMEmail Poster
^
tux99
 Posted: Jul 6 2015, 02:28 AM
Quote Post


SLF Moderator
********

Group: Moderators
Posts: 1276
Member No.: 224
Joined: 28-May 11









I think it's Pulseaudio as pulseaudio puts itself inbetween the user level commands and ALSA even when you try to talk directly to ALSA (it uses some plugin for that, can't remember exactly as I always get rid of PA immediately when I install a PC, so haven't used PA in a long time).

See this guide for disabling PA on SL6:
http://scientificlinuxforum.org/index.php?showtopic=618

This post has been edited by tux99: Jul 6 2015, 02:30 AM

--------------------
My personal SL6 repository, specialized in audio/video software: http://pkgrepo.linuxtech.net/el6/
(can be used together with EPEL and ELRepo repositories) - repository mirror: http://linuxsoft.cern.ch/linuxtech/el6/
PM
^
igadoter
 Posted: Jul 6 2015, 06:26 AM
Quote Post


SLF Member
***

Group: Members
Posts: 54
Member No.: 3337
Joined: 13-January 15









I will dig a little in PA for time, but it is so complex! And even it's author admits that using PA causes security vulnerabilities.

But probably for me "playing" with PA is waste of time. So 20% chances that I will succeed and fix PA, 80% I will get rid of it.

I removed PA, but it fixed problem only partially. When running X session as common user alsa is unable to detect audio device! I mean issuing in xterm, gives
CODE

$ aplay -l
aplay:  device_list:256: no soundcards found...

but running X session from root account, I login into console as root, then I start X server, causes no such problem.

It seems that from the beginning it was actually security problem, somehow running X session affects my user privileges, disabling access to audio system - no matter via PA or directly using ALSA.

At least PA was reported that "sink is SUSPENDED, cause: SESSION". (!)

As SELinux is enabled, I am hesitating maybe it is SELinux policy, say additional security restrictions for standalone X11 session?

But, well at least switching between console and X server does not disable sound now, without PA.

What is the meaning of these pluses '+' at the end
CODE

$ ls -l /dev/snd
crw-rw----+ 1 root audio 116, 8 07-06 18:42 controlC0
crw-rw----+ 1 root audio 116, 7 07-06 18:42 hwC0D0
crw-rw----+ 1 root audio 116, 6 07-06 18:42 hwC0D1
crw-rw----+ 1 root audio 116, 5 07-06 18:42 pcmC0D0c
crw-rw----+ 1 root audio 116, 4 07-06 19:24 pcmC0D0p
crw-rw----+ 1 root audio 116, 3 07-06 18:42 seq
crw-rw----+ 1 root audio 116, 2 07-06 18:42 timer

?
PMEmail Poster
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll