<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello.</p>
<p><br>
</p>
<p>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.<br>
</p>
<p><br>
</p>
<p>What am I trying to do:</p>
<p>I am trying to route pulse audio through default PCM in alsa.</p>
<p><br>
</p>
<p>here is my .asoundrc which works perfectly fine untill I do 2
things.</p>
<p>1. Install Pulse Audio.</p>
<p>2. Restart PC.</p>
<p><br>
</p>
<p><br>
</p>
<p>All commands and actions below are in chronological order.<br>
</p>
<p>i was able to route pulseaudio over 'default' PCM.</p>
<p>Here is my .asoundrc file:</p>
<p><font color="#6633ff"><br>
</font></p>
<p><font color="#6633ff"><i>pcm.downmix {</i><i><br>
</i><i>type vdownmix</i><i><br>
</i><i>slave.pcm "hware"</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i>pcm.dmixed1 {</i><i><br>
</i><i> type dmix</i><i><br>
</i><i> ipc_key 1029</i><i><br>
</i><i> slave {</i><i><br>
</i><i> pcm "hware"</i><i><br>
</i><i> period_time 0</i><i><br>
</i><i># period_size 1024</i><i><br>
</i><i> buffer_size 8192</i><i><br>
</i><i># rate 192000</i><i><br>
</i><i> rate 48000</i><i><br>
</i><i># rate 96000</i><i><br>
</i><i> channels 2</i><i><br>
</i><i> format S32_LE</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i><br>
</i><i><br>
</i><i>pcm.hware{</i><i><br>
</i><i> type hw</i><i><br>
</i><i> card 0</i><i><br>
</i><i># rate 96000</i><i><br>
</i><i> </i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i><br>
</i><i>#actual dmix device</i><i><br>
</i><i>pcm.dmixed {</i><i><br>
</i><i> type dmix</i><i><br>
</i><i> ipc_key 1024</i><i><br>
</i><i> slave {</i><i><br>
</i><i> pcm "hw:0"</i><i><br>
</i><i> period_time 0</i><i><br>
</i><i># period_size 1024</i><i><br>
</i><i> buffer_size 8192</i><i><br>
</i><i> rate 192000</i><i><br>
</i><i># rate 48000</i><i><br>
</i><i># rate 96000</i><i><br>
</i><i> channels 2</i><i><br>
</i><i> format S32_LE</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i>#just something i amm messing with</i><i><br>
</i><i>pcm.retarded{</i><i><br>
</i><i> type hw</i><i><br>
</i><i> card 0</i><i><br>
</i><i> device 0</i><i><br>
</i><i> rate 192000</i><i><br>
</i><i> channels 2</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i>#USB mic</i><i><br>
</i><i>pcm.dsnooped {</i><i><br>
</i><i> type dsnoop</i><i><br>
</i><i> ipc_key 1025</i><i><br>
</i><i> slave.pcm "hw:1,0"</i><i><br>
</i><i> slave{</i><i><br>
</i><i> rate 48000</i><i><br>
</i><i> }</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i>#makes possible for app to by default use input and
output source. Usefull for anything VOIP</i><i><br>
</i><i>pcm.duplex {</i><i><br>
</i><i> type asym</i><i><br>
</i><i> playback.pcm "dmixed"</i><i><br>
</i><i> capture.pcm "dsnooped"</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i><br>
</i><i># Instruct ALSA to use pcm.duplex as the default device</i><i><br>
</i><i>pcm.!default {</i><i><br>
</i><i> type plug</i><i><br>
</i><i>slave.pcm{</i><i><br>
</i><i>@func getenv</i><i><br>
</i><i>vars [ ALSA_PCM ]</i><i><br>
</i><i>default "duplex"</i><i><br>
</i><i>}</i><i><br>
</i><i>}</i><i><br>
</i><i><br>
</i><i><br>
</i><i># FOR USER: to start app woth downmix option use:
ALSA_PCM=downmix app_name</i><i><br>
</i><i>#for steam ALSA_PCM=downmix %command%</i></font></p>
<p><br>
</p>
<p>I naturally tweaked some settings.</p>
<p>No settings being tweaked for alsa.</p>
<p>Exception is .asoundrc.</p>
<p><br>
</p>
<p>When I run pulseaudio after restart I get:</p>
<p><font color="#993399">dimko@(none)dimko's Desktop ~ $ pulseaudio
<br>
E: [pulseaudio] module.c: Failed to load module
"module-alsa-sink" (argument: "device=default"): initialization
failed.</font><br>
</p>
<p>Server is there and doesn't work</p>
<p>I kill the pulseaudio wit ctrl c</p>
<p><br>
</p>
<p>i do this:</p>
<p><i><font color="#993399">dimko@(none)dimko's Desktop ~ $
speaker-test <br>
<br>
speaker-test 1.1.6<br>
<br>
Playback device is default<br>
Stream parameters are 48000Hz, S16_LE, 1 channels<br>
Using 16 octaves of pink noise<br>
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<br>
Playback open error: -2,No such file or directory</font></i></p>
<p><i><font color="#993399"><br>
</font></i></p>
<p>No slightest doubt in my mind, issue NOT caused by alsa.</p>
<p>To further prove that it's not .alsamixer. I move ,asoundrc file
away</p>
<p><font color="#993399"><br>
</font></p>
<p><font color="#993399">dimko@(none)dimko's Desktop ~ $ pwd<br>
/home/dimko</font></p>
<p><font color="#993399">dimko@(none)dimko's Desktop ~ $ mv
.asoundrc .asoundrc_moved</font></p>
<p><br>
</p>
<p>I repeat operation of speaker testing to see if moving .asoundrc
made any difference. Nope.</p>
<p><font color="#993399"><br>
</font></p>
<p><font color="#993399">speaker-test <br>
<br>
speaker-test 1.1.6<br>
<br>
Playback device is default<br>
Stream parameters are 48000Hz, S16_LE, 1 channels<br>
Using 16 octaves of pink noise<br>
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<br>
Playback open error: -2,No such file or directory<br>
</font></p>
<p><br>
</p>
<p>I have run this as root:</p>
<p><font color="#993399">(none)dimko's Desktop /home/dimko # cat
/proc/asound/card0/pcm*/sub*/hw_params<br>
closed</font></p>
<p><br>
</p>
<p>Changes I made to pulse server settings, under my specific user:</p>
<p><font color="#993399"><br>
</font></p>
<p><font color="#993399">dimko@(none)dimko's Desktop ~ $ cat
/home/dimko/.config/pulse/default.pa<br>
load-module module-alsa-sink device=default<br>
load-module module-alsa-source device=default<br>
load-module module-native-protocol-unix</font></p>
<p><br>
</p>
<p>Now with pulseaudio being down, i still have issues with alsa:</p>
<p><font color="#993399">dimko@(none)dimko's Desktop ~ $ ps aux
|grep pulse<br>
dimko 8611 0.0 0.0 12400 924 pts/1 S+ 16:42 0:00
grep --colour=auto pulse<br>
</font></p>
<p><font color="#993399"><br>
</font></p>
<p><font color="#993399">dimko@(none)dimko's Desktop ~ $
speaker-test <br>
<br>
speaker-test 1.1.6<br>
<br>
Playback device is default<br>
Stream parameters are 48000Hz, S16_LE, 1 channels<br>
Using 16 octaves of pink noise<br>
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<br>
Playback open error: -2,No such file or directory</font></p>
<p><br>
</p>
<p>So whatever pulse is doing is extremely invasive and harmful.</p>
<p>Even after you shut it down - it has effect on ALSA.</p>
<p>So, how can I remedy it?</p>
<p>How can i make pulse non invasive, and just use one PCM i want to
generally use, that works just fine without pulse?</p>
<p><br>
</p>
<p>I want something like this: pulse -> alsa PCM 'default' ->
diver - > sound on my PC.</p>
<p>I want pulse to act like program that can take other programs
output?</p>
<p><br>
It already works that way if I install pulse and dont restart my
computer.</p>
<p>Also i noticed, that 'pulse' PCM is not present untill I restart
my Gentoo.</p>
<p><br>
</p>
<p>I did not modify systemd to start pulse by default.</p>
<p><br>
</p>
<p>Anyone, please?</p>
<p><br>
Regards</p>
<p>Dmitri<br>
</p>
</body>
</html>