summaryrefslogtreecommitdiffstats
path: root/hal/msm8974/platform.c
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-03-22 08:38:45 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-03-22 08:38:45 -0700
commit079d264c0ed9e99b4f3f739de096d37fd1da748f (patch)
tree5545e125b32d5055e64c70d497dd0679ce7a51be /hal/msm8974/platform.c
parent5045a5a1131145a1f8aea063c0782a7a818ebf2b (diff)
parentfc743088328a36a6527e4e36314b734c5ed64673 (diff)
downloadhardware_qcom_audio-079d264c0ed9e99b4f3f739de096d37fd1da748f.tar.gz
hardware_qcom_audio-079d264c0ed9e99b4f3f739de096d37fd1da748f.tar.bz2
hardware_qcom_audio-079d264c0ed9e99b4f3f739de096d37fd1da748f.zip
Merge "hal: Avoid setting wrong sample rate for headset device"
Diffstat (limited to 'hal/msm8974/platform.c')
-rw-r--r--hal/msm8974/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 987e7a84..e03792cd 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -6513,7 +6513,7 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
* Handset and speaker may have diffrent backend. Check if the device is speaker or handset,
* and these devices are restricited to 48kHz.
*/
- if ((platform_get_backend_index(snd_device) == DEFAULT_CODEC_BACKEND) &&
+ if (!codec_device_supports_native_playback(usecase->devices) &&
(platform_check_backends_match(SND_DEVICE_OUT_SPEAKER, snd_device) ||
platform_check_backends_match(SND_DEVICE_OUT_HANDSET, snd_device))) {
if (bit_width >= 24) {