hal: Add support for LINE out device
- Add support for AUDIO_DEVICE_OUT_LINE device.
Treat it same as Wired Headphone device w.r.t.
routing and acdb device.
If the acdb or backend is different it can be
updated using audio_platform_info.xml.
- Increase deep buffer period size to 40ms and
with peroid count as 2
Change-Id: Ic0821a4f22f99d44e98c2bd48179edcaa2c9247e
diff --git a/hal/msm8916/platform.h b/hal/msm8916/platform.h
index 7a25b70..40b34bc 100644
--- a/hal/msm8916/platform.h
+++ b/hal/msm8916/platform.h
@@ -45,7 +45,8 @@
*/
#define AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND \
(AUDIO_DEVICE_OUT_EARPIECE | AUDIO_DEVICE_OUT_SPEAKER | \
- AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE)
+ AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE|\
+ AUDIO_DEVICE_OUT_LINE)
/*
* Below are the input devices for which back end is same, SLIMBUS_0_TX.
@@ -73,9 +74,11 @@
SND_DEVICE_OUT_SPEAKER_REVERSE,
SND_DEVICE_OUT_SPEAKER_WSA,
SND_DEVICE_OUT_SPEAKER_VBAT,
+ SND_DEVICE_OUT_LINE,
SND_DEVICE_OUT_HEADPHONES,
SND_DEVICE_OUT_HEADPHONES_44_1,
SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES,
+ SND_DEVICE_OUT_SPEAKER_AND_LINE,
SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_1,
SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2,
SND_DEVICE_OUT_VOICE_HANDSET,
@@ -83,6 +86,7 @@
SND_DEVICE_OUT_VOICE_SPEAKER_WSA,
SND_DEVICE_OUT_VOICE_SPEAKER_VBAT,
SND_DEVICE_OUT_VOICE_HEADPHONES,
+ SND_DEVICE_OUT_VOICE_LINE,
SND_DEVICE_OUT_HDMI,
SND_DEVICE_OUT_SPEAKER_AND_HDMI,
SND_DEVICE_OUT_BT_SCO,
@@ -209,8 +213,8 @@
* We should take care of returning proper size when AudioFlinger queries for
* the buffer size of an input/output stream
*/
-#define DEEP_BUFFER_OUTPUT_PERIOD_SIZE 960
-#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 5
+#define DEEP_BUFFER_OUTPUT_PERIOD_SIZE 1920
+#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 2
#define LOW_LATENCY_OUTPUT_PERIOD_SIZE 240
#define LOW_LATENCY_OUTPUT_PERIOD_COUNT 2