Hi Chanyeol, On Wed, Nov 2, 2011 at 2:05 PM, Chan-yeol Park <[email protected]> wrote: > In case we change profile, we should release the previous transport > in order to suspend headset connection. > --- > src/modules/bluetooth/module-bluetooth-device.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/src/modules/bluetooth/module-bluetooth-device.c > b/src/modules/bluetooth/module-bluetooth-device.c > index efbc144..9423a01 100644 > --- a/src/modules/bluetooth/module-bluetooth-device.c > +++ b/src/modules/bluetooth/module-bluetooth-device.c > @@ -2567,6 +2567,13 @@ static int card_set_profile(pa_card *c, > pa_card_profile *new_profile) { > stop_thread(u); > shutdown_bt(u); > > + /* release transport if exist */ > + if (u->transport) { > + bt_transport_release(u); > + pa_xfree(u->transport); > + u->transport = NULL; > + } > + > if (USE_SCO_OVER_PCM(u)) > restore_sco_volume_callbacks(u);
This should only happen if profile is set to 'off' otherwise init_profile->setup_bt will take care of releasing the current transport, btw Frederic already send a patch sometime ago to fix this problem we just didn't integrate because the 1.0 release. -- Luiz Augusto von Dentz _______________________________________________ pulseaudio-discuss mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
