hal: Fix the audio loss issue on codec back end
- Start music playback, plug in and plug out headset and press
'Next' button in the Music app immediately. Repeating these steps
result complete loss of audio on HW codec.
- When headset is pluged out and Next is pressed immediately, the
audio HAL triggers audio routing change from Headset to Speaker,
and closure of compress playback driver. The later is not lock
protected which result un protected access of back end information
in the ALSA framework. This leads to incorrect routing and hence
loss of audio. It is also observed that sometimes it could lead
to crash in kernel and phone reboots.
- Fix by ensuring that the kernel driver close is also lock protected
along with other routing events.
Bug: 11088400
Change-Id: I785effb09e5cef7ba20ee43e0ef91dc296d4e58a
1 file changed