volume: Handle varying channel count for shared volumes
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 14 Sep 2011 07:40:52 +0000 (13:10 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 14 Sep 2011 08:45:01 +0000 (14:15 +0530)
commit2ef7bc6a8092731e2370cd28d34cb932c191e967
tree36d8eae2c3b032195e6d2a17e433753ef235fca8
parenta9c85074cbf6903e5eb9789f470f6c2c3ee40734
volume: Handle varying channel count for shared volumes

This handles the case where a virtual sink/source and it's master have
different channel counts. The solution is not ideal because if the
former has fewer channels and the master has channel volumes that are
not all at the same level, it will lose this information and have all
channels at the same level.

This is not just a theoretical problem, since module-echo-cancel
prefers a mono virtual source/sink and will usually be sitting on top of
a stereo ALSA source/sink.

That said, I don't really see a good solution to this problem, so the
idea is to make volume sharing optional (on by default) in
module-echo-cancel, so that the few people who care can then disable it
if they so desire.
src/pulsecore/sink.c
src/pulsecore/source.c