diff options
author | Eric Laurent <elaurent@google.com> | 2015-09-09 18:10:07 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-09-09 18:10:07 -0700 |
commit | 9af4b91ddd17beb8e0db420874014a5662848159 (patch) | |
tree | 17431b6e3a7d6bb3d70f7f13d124f04e239bf059 | |
parent | 2facd29ca7a04fcfe01b83cf044d552d6b728dd7 (diff) | |
download | hardware_qcom_audio-9af4b91ddd17beb8e0db420874014a5662848159.tar.gz hardware_qcom_audio-9af4b91ddd17beb8e0db420874014a5662848159.tar.bz2 hardware_qcom_audio-9af4b91ddd17beb8e0db420874014a5662848159.zip |
hal: fix backend check routine for combo device
If there is path change between combo device and general device that
shares backend, previous device should be disabled before the new device
is enabled. Otherwise, by the race conditio, the new device would be
disabled by previous combo device
For example, when the previous device is 'speaker-and-headphone' and the new
devcie is 'voice-headphones', there is possibility that
'voice-headphones' get mute by disabling 'speaker-and-headphone'.
BUG=23916345
Change-Id: I765b3c0b6576f22c4aca290846d58dd1c6dfb8c5
-rw-r--r-- | hal/msm8974/platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 7baf2265..63b1a9b7 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -1211,7 +1211,7 @@ bool platform_check_backends_match(snd_device_t snd_device1, snd_device_t snd_de const char * be_itf2 = hw_interface_table[snd_device2]; if (NULL != be_itf1 && NULL != be_itf2) { - if (0 != strcmp(be_itf1, be_itf2)) + if ((NULL == strstr(be_itf2, be_itf1)) || (NULL == strstr(be_itf1, be_itf2))) result = false; } |