<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>So it appears my alsa configuration was messing things up a bit I think, and as I have only one app using audio, there is only little interest in not using the default pulse config...</div><div>A parallel thread regarding AEC points out to time scheduling issues on raspberry pi.</div><div><br></div><div>So I could make AEC work by: </div><div> - removing my alsa config and just keeping the default pulse device</div><div> - loading module-alsa-sink with tsched=off</div><div> - defining my echo-cancel  sink and source as default</div><div><br></div><div>Now the autoload creates an additional sink for the alsa device <div>alsa_output.platform-bcm2835_audio.stereo-fallback and sets it by as the default sink, overwritting the default sink i defined in the configuration.</div></div><div><span style="font-family: monospace;"><br></span></div><div><div>How can i force pulse autoload to either not add that input device, or not set it as default sink?</div></div><div><span style="font-family: monospace;"><br></span></div><div>thanks</div><div><span style="font-family: monospace;">Monkey</span></div><div><br></div><div>On Tue, 2020-05-19 at 13:00 +0200, Monkey Bizness wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Hi,</div><div><br></div><div>I'm hoping someone here can help me figure out how to setup my configuration properly.</div><div><br></div><div>I'm trying to output sound through the echo-cancel module but by going through the alsa device. Unfortunately, the application doesn't support pulseaudio for the playback.</div><div><br></div><div>configuration:</div><span style="white-space: pre-wrap;">raspberry pi 4</span><div>ubuntu 20.04</div><div>ffmpeg : <span style="font-family: monospace;">4.2.2-1ubuntu1</span></div><div>pulseaudio : <span style="font-family: monospace;">13.99.1-1ubuntu3.2</span></div><div><span style="font-family: monospace;"><br></span></div><div><br></div><div><br></div><div>In order to do that, i've defined the echo-cancel configuration in /etc/pulse/default.pa:<span style="font-family: monospace;">load-module module-echo-cancel use_master_format=1 aec_method=webrtc aec_args="analog_gain_control=0\ digital_gain_control=1" source_name="echoCancel_source" sink_name="echoCancel_sink" </span></div><span style="font-family:monospace">
<br></span><div><span style="font-family:monospace">It works. I can test it with :</span></div><div><span style="font-family:monospace">ffmpeg -i recording.wav -f pulse -device echoCancel_sink test<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Now in order to playback through alsa, i've defined a pcm device:</span></div><div><span style="font-family: monospace;">cat /etc/alsa/conf.d/90-echocancel.conf  </span></div><span style="font-family:monospace">pcm.pulse-echo-cancel {
<br>        type pulse
<br>        device "echoCancel_sink"
<br>}
<br>
<br>ctl.pulse-echo-cancel {
<br>        type pulse
<br>        sink "echoCancel_sink"
<br>}<br></span><div></div><div></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">When I try this configuration with:</span></div><div></div><div><span style="font-family:monospace">ffmpeg -i recording.wav -f alsa pulse-echo-cancel<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Sound is scrambled and super slow.</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Does anyone know how to make this configuration work?</span></div><div><span style="font-family:monospace">Any pointer would be appreciated.</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">I feel I got the correct overall approach but i am missing something about the rate convertion or specification.</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Best regards</span></div><div><span style="font-family:monospace"><br></span></div>
<pre>_______________________________________________</pre><pre>pulseaudio-discuss mailing list</pre><a href="mailto:pulseaudio-discuss@lists.freedesktop.org"><pre>pulseaudio-discuss@lists.freedesktop.org</pre></a><pre><br></pre><a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss"><pre>https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</pre></a><pre><br></pre></blockquote></body></html>