bluetooth: fix set_volume_cb on sco over pcm
commit2386471e10c25c01e7b4b7885c41ce72de6e84ca
authorMarc-André Lureau <marc-andre.lureau@nokia.com>
Mon, 28 Mar 2011 12:35:16 +0000 (28 15:35 +0300)
committerColin Guthrie <colin@mageia.org>
Fri, 1 Apr 2011 12:32:11 +0000 (1 13:32 +0100)
tree0f8be9519c831fd9844ee651705864fceffec509
parent209b7b781d8d1a5ac5f1442bd647098c2a3c4e18
bluetooth: fix set_volume_cb on sco over pcm

The current implementation is totally bogus, it cast the over_sink
userdata to the bluetooth-device userdata... It was failing nicely
because the previous code had a gentle safe-guard in u->profile ==
PROFILE_HSP, and u->profile was just random.

There is no easy way to associate additional data to a sink or
source. Two solutions seems possible: looking up loaded modules and
check which one was handling the sink/source, or using pa_shared. I
went for the second solution.
src/modules/bluetooth/module-bluetooth-device.c