[pulseaudio-discuss] How to avoid module-echo-cancel's "Echo-Cancel Source Stream" being created on a monitor source of an ALSA sink? If module-echo-cancel is loaded before the ALSA source is created.
Colin Guthrie
gmane at colin.guthr.ie
Thu Aug 11 05:11:40 PDT 2011
'Twas brillig, and Lin, Mengdong at 28/07/11 07:50 did gyre and gimble:
> I found the module-echo-cancel's "Echo-Cancel Source Stream" can be
> created on a monitor source of an new created ALSA sink by mistake, if
> the real ALSA source is not created yet.
>
> Could anyone tell me how to fix this issue?
I could have helped debug this better had I been aware of the Intel
AppUp presentation yesterday where they were able to supply MeeGo EXOPC
tablets to developers. Sadly I missed this session as I was too busy
hacking on PA and didn't get one. Very frustrating as just about
everyone I can see here today now has one of these devices :( Is this
one of the devices that exhibits this hardware setup?
Anyway, I'll try and help in a "theory only" mode....
> On my MeeGo platform, the ALSA sink/source don’t always exist because
> the ALSA and Bluetooth HSP headset share one hardware data link. So when
> BT HSP headset is connected, ALSA card will change into a “hsp” profile
> , remove the “normal” ALSA sink/source pair and create a “hsp”
> sink/source pair for BT. And after BT HSP headset is disconnected, ALSA
> card restores its original profile, remove “hsp” sink/source and create
> “normal” ALSA sink/source again.
>
>
>
> My problem is that when BT HSP is disconnected during a phone call, I
> got the above routing error and a pa deadlock described in another loop:
> http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-July/010741..html
> <http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-July/010741.html>
>
> The module-echo-cancel is loaded again when the VOIP stream is routing
> back to the new created ALSA sink. But because the ALSA source is not
> created yet (will be later), PA routes the “Echo-Cancel Source Stream”
> to the monitor source of the ALSA sink.
One solution is perhaps to modify the echo cancel module to use the
DONT_MOVE flags. This would prevent PA moving it at all and instead kill
the stream which should, I think, ultimately unload the echo-cancel
module completely.
Hopefully then when the other stuff is loaded a new echo-cancel module
will then be loaded.
This seems like a bit of a nasty cycle tho', and I can't help but feel
there is a better way :(
> How to make “Echo-Cancel Source Stream” link to the right ALSA source,
> which will be created a little later?
Longer term, obvious this whole nasty situation would be avoided with a
properly filter API rather than this system of using virtual sinks, but
we have to work with what we've got now.
I'll try and give the problem a little thought and get back to you if I
come up with anything.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss
mailing list