OSDN Git Service

Hearing Aid - codec switching
authorJakub Pawlowski <jpawlowski@google.com>
Tue, 10 Apr 2018 07:16:53 +0000 (00:16 -0700)
committerHansong Zhang <hsz@google.com>
Wed, 26 Sep 2018 21:17:44 +0000 (14:17 -0700)
commit1934566cbaf3d5d14a7f66b967c63ece66bc6f92
treecda98ba7425e04d0ff07f2017c29bbab274abd7a
parent611a85c2f591f7ee66d488b59a35e469d700bb32
Hearing Aid - codec switching

StartSendingAudio internally sets the codec to the HearingAidAudioSource.
OnDeviceAvailable callback triggers audio framework to  grab codec
configuration from HearingAidAudioSource. Those calls must be made in proper
order, otherwise audio framework will grab bad codec configuration.

This patch also remove default codec configuration, and crash if codec
configuration is not done correctly.

Bug: 116317072
Bug: 116044083
Test: use hearing aid supporting 24kHz codec
Change-Id: I9419d58fa8728fc8e0f0c2d2ed8d8d741309a9a3
Merged-In: I9419d58fa8728fc8e0f0c2d2ed8d8d741309a9a3
Merged-In: I8ce09c709a9cb4e79413a99fc344dffe824bc707
bta/hearing_aid/hearing_aid.cc
bta/hearing_aid/hearing_aid_audio_source.cc
bta/include/bta_hearing_aid_api.h