[pulseaudio-discuss] many troubles with pulseaudio

Dmitri Seletski drjoms at gmail.com
Thu Feb 14 16:51:33 UTC 2019


Hello.


I am forced to send an email to this group. I am not big fan of 
pulseaudio generally. If not for Firefox requirement of pulse audio - 
I'd not install pulse audio at all.


What am I trying to do:

I am trying to route pulse audio through default PCM in alsa.


here is my .asoundrc which works perfectly fine untill I do 2 things.

1. Install Pulse Audio.

2. Restart PC.



All commands and actions below are in chronological order.

i was able to route pulseaudio over 'default' PCM.

Here is my .asoundrc file:


/pcm.downmix {//
//type vdownmix//
//slave.pcm "hware"//
//}//
//
//pcm.dmixed1 {//
//    type dmix//
//    ipc_key 1029//
//    slave {//
//          pcm "hware"//
//        period_time 0//
//#        period_size 1024//
//        buffer_size 8192//
//#        rate 192000//
//        rate 48000//
//#        rate 96000//
//    channels 2//
//    format S32_LE//
//}//
//
//}//
//
//
//
//pcm.hware{//
//    type hw//
//    card 0//
//#    rate 96000//
////
//}//
//
//
//#actual dmix device//
//pcm.dmixed {//
//    type dmix//
//    ipc_key 1024//
//    slave {//
//          pcm "hw:0"//
//        period_time 0//
//#        period_size 1024//
//        buffer_size 8192//
//        rate 192000//
//#        rate 48000//
//#        rate 96000//
//    channels 2//
//    format S32_LE//
//}//
//
//}//
//
//#just something i amm messing with//
//pcm.retarded{//
//    type hw//
//    card 0//
//    device 0//
//    rate 192000//
//    channels 2//
//}//
//
//#USB mic//
//pcm.dsnooped {//
//    type dsnoop//
//    ipc_key 1025//
//    slave.pcm "hw:1,0"//
//    slave{//
//    rate 48000//
//    }//
//}//
//
//#makes possible for app to by default use input and output source. 
Usefull for anything VOIP//
//pcm.duplex {//
//    type asym//
//    playback.pcm "dmixed"//
//    capture.pcm "dsnooped"//
//}//
//
//
//# Instruct ALSA to use pcm.duplex as the default device//
//pcm.!default {//
//    type plug//
//slave.pcm{//
//@func getenv//
//vars [ ALSA_PCM ]//
//default "duplex"//
//}//
//}//
//
//
//# FOR USER: to start app woth downmix option use: ALSA_PCM=downmix 
app_name//
//#for steam  ALSA_PCM=downmix %command%/


I naturally tweaked some settings.

No settings being tweaked for alsa.

Exception is .asoundrc.


When I run pulseaudio after restart I get:

dimko@(none)dimko's Desktop ~ $ pulseaudio
E: [pulseaudio] module.c: Failed to load module "module-alsa-sink" 
(argument: "device=default"): initialization failed.

Server is there and doesn't work

I kill the pulseaudio wit ctrl c


i do this:

/dimko@(none)dimko's Desktop ~ $ speaker-test

speaker-test 1.1.6

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib 
/var/tmp/portage/media-libs/alsa-lib-1.1.6-r1/work/alsa-lib-1.1.6/src/pcm/pcm_dmix.c:1099:(snd_pcm_dmix_open) 
unable to open slave
Playback open error: -2,No such file or directory/

/
/

No slightest doubt in my mind, issue NOT caused by alsa.

To further prove that it's not .alsamixer. I move ,asoundrc file away


dimko@(none)dimko's Desktop ~ $ pwd
/home/dimko

dimko@(none)dimko's Desktop ~ $ mv .asoundrc .asoundrc_moved


I  repeat operation of speaker testing to see if moving .asoundrc made 
any difference. Nope.


speaker-test

speaker-test 1.1.6

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib 
/var/tmp/portage/media-libs/alsa-lib-1.1.6-r1/work/alsa-lib-1.1.6/src/pcm/pcm_dmix.c:1099:(snd_pcm_dmix_open) 
unable to open slave
Playback open error: -2,No such file or directory


I have run this as root:

(none)dimko's Desktop /home/dimko # cat 
/proc/asound/card0/pcm*/sub*/hw_params
closed


Changes I made to pulse server settings, under my specific user:


dimko@(none)dimko's Desktop ~ $ cat /home/dimko/.config/pulse/default.pa
load-module module-alsa-sink device=default
load-module module-alsa-source device=default
load-module module-native-protocol-unix


Now with pulseaudio being down, i still have issues with alsa:

dimko@(none)dimko's Desktop ~ $ ps aux |grep pulse
dimko     8611  0.0  0.0  12400   924 pts/1    S+   16:42   0:00 grep 
--colour=auto pulse


dimko@(none)dimko's Desktop ~ $ speaker-test

speaker-test 1.1.6

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib 
/var/tmp/portage/media-libs/alsa-lib-1.1.6-r1/work/alsa-lib-1.1.6/src/pcm/pcm_dmix.c:1099:(snd_pcm_dmix_open) 
unable to open slave
Playback open error: -2,No such file or directory


So whatever pulse is doing is extremely invasive and harmful.

Even after you shut it down - it has effect on ALSA.

So, how can I remedy it?

How can i make pulse non invasive, and just use one PCM i want to 
generally use, that works just fine without pulse?


I want something like this: pulse -> alsa PCM 'default' -> diver - > 
sound on my PC.

I want pulse to act like program that can take other programs output?


It already works that way if I install pulse and dont restart my computer.

Also i noticed, that 'pulse' PCM is not present untill I restart my Gentoo.


I did not modify systemd to start pulse by default.


Anyone, please?


Regards

Dmitri

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20190214/7f4fc3ea/attachment.html>


More information about the pulseaudio-discuss mailing list