bluetooth: reinitialize the sample spec when switching profile
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Tue, 10 Feb 2009 21:48:37 +0000 (23:48 +0200)
committerMarc-André Lureau <marcandre.lureau@gmail.com>
Tue, 10 Feb 2009 21:53:36 +0000 (23:53 +0200)
commitcce4359831b5ff02f63e9748671fa744d500d27f
tree65f224d3cc425a70c81002e0e21316317ff4880c
parentcac0f9ef2b91462778600821f456248efffb2517
bluetooth: reinitialize the sample spec when switching profile

When doing init_profile(), the value u->sample_spec is modified to the
one which has been last configured. In case of HSP, it will be 8kHz.

Later on, when setting the profile to A2DP, it picks up the lower rate
available which match with current u->sample_spec.

In my case, it would be 16kHz. To circunvent the issue, I decided to
reinitialize the u->sample_spec to default value with user module
argument requested rate.
src/modules/bluetooth/module-bluetooth-device.c