hal: USB headset support for native playback.
Add USB Headset in the list of devices that support native playback.
Also add backend_idx for USB in the condition where it checks for
44.1khz support.
Change-Id: I85c4519d79dce44e0d15e9ea5b7074329fda7334
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 680396b..7ab55e8 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -3403,7 +3403,8 @@
if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE ||
out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET ||
- out_device & AUDIO_DEVICE_OUT_LINE)
+ out_device & AUDIO_DEVICE_OUT_LINE ||
+ out_device & AUDIO_DEVICE_OUT_USB_HEADSET)
ret = true;
return ret;
@@ -6519,7 +6520,8 @@
__func__);
}
/*reset sample rate to 48khz if sample rate less than 44.1khz, or device backend dose not support 44.1 khz*/
- if ((sample_rate == OUTPUT_SAMPLING_RATE_44100 && backend_idx != HEADPHONE_44_1_BACKEND)
+ if ((sample_rate == OUTPUT_SAMPLING_RATE_44100 && backend_idx != HEADPHONE_44_1_BACKEND &&
+ backend_idx != USB_AUDIO_RX_BACKEND)
|| sample_rate < OUTPUT_SAMPLING_RATE_44100) {
sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE;
ALOGD("%s:becf: afe: reset sample rate to default Sample Rate(48k)",__func__);