audio: add to support low-latency-record(fast intput)
AudioRecord not support PCM_FLOAT on FAST path yet.(b/77913243)
Use 16-bit format for low-latency-record.
Bug: 175673727
Test: OboeTester
Change-Id: I450d161cd1b236717ad01287b95f56a284443040
diff --git a/audio/oriole/config/audio_platform_configuration.xml b/audio/oriole/config/audio_platform_configuration.xml
index 577283f..70fd649 100644
--- a/audio/oriole/config/audio_platform_configuration.xml
+++ b/audio/oriole/config/audio_platform_configuration.xml
@@ -131,7 +131,9 @@
<usecase id="UC_HOSTLESS_UL" dev1="15"/>
<!-- for VOIP input, 4 * 10ms buffer -->
<usecase id="UC_VOIP_RECORD" dev1="17" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
- <!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 480 periods * 1ms buffer,32-bit,2 ch, buffer size 92160 bytes -->
+ <!-- for input wit AUDIO_INPUT_FLAG_FAST 480 periods * 1ms buffer, 16-bit, 2ch, buffer size 92160 bytes-->
+ <usecase id="UC_LOW_LATENCY_AUDIO_RECORD" dev1="10" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="480"/>
+ <!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 240 periods * 1ms buffer, 32-bit,2 ch, buffer size 92160 bytes -->
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="240"/>
</usecase_attr>
diff --git a/audio/oriole/config/audio_policy_configuration.xml b/audio/oriole/config/audio_policy_configuration.xml
index 12b4dc8..6201639 100644
--- a/audio/oriole/config/audio_policy_configuration.xml
+++ b/audio/oriole/config/audio_policy_configuration.xml
@@ -104,6 +104,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -201,6 +206,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml
index a151fbd..36df571 100644
--- a/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml
+++ b/audio/oriole/config/audio_policy_configuration_a2dp_offload_disabled.xml
@@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -178,6 +183,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/oriole/config/audio_policy_configuration_bluetooth_legacy_hal.xml b/audio/oriole/config/audio_policy_configuration_bluetooth_legacy_hal.xml
index 26bf869..a4284b0 100644
--- a/audio/oriole/config/audio_policy_configuration_bluetooth_legacy_hal.xml
+++ b/audio/oriole/config/audio_policy_configuration_bluetooth_legacy_hal.xml
@@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -178,6 +183,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/oriole/config/mixer_paths.xml b/audio/oriole/config/mixer_paths.xml
index a07a611..ed4025f 100644
--- a/audio/oriole/config/mixer_paths.xml
+++ b/audio/oriole/config/mixer_paths.xml
@@ -611,6 +611,15 @@
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
+ <path name="low-latency-recordC">
+ <ctl name="EP3 TX Mixer INTERNAL_MIC_TX" value="1"/>
+ </path>
+
+ <path name="low-latency-recordC usb-headset-mic">
+ <ctl name="Audio Capture Mic Source" value="USB_MIC"/>
+ <ctl name="EP3 TX Mixer USB_TX" value="1"/>
+ </path>
+
<path name="mmap-recordC">
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
</path>
diff --git a/audio/raven/config/audio_platform_configuration.xml b/audio/raven/config/audio_platform_configuration.xml
index 577283f..70fd649 100644
--- a/audio/raven/config/audio_platform_configuration.xml
+++ b/audio/raven/config/audio_platform_configuration.xml
@@ -131,7 +131,9 @@
<usecase id="UC_HOSTLESS_UL" dev1="15"/>
<!-- for VOIP input, 4 * 10ms buffer -->
<usecase id="UC_VOIP_RECORD" dev1="17" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
- <!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 480 periods * 1ms buffer,32-bit,2 ch, buffer size 92160 bytes -->
+ <!-- for input wit AUDIO_INPUT_FLAG_FAST 480 periods * 1ms buffer, 16-bit, 2ch, buffer size 92160 bytes-->
+ <usecase id="UC_LOW_LATENCY_AUDIO_RECORD" dev1="10" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="480"/>
+ <!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 240 periods * 1ms buffer, 32-bit,2 ch, buffer size 92160 bytes -->
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="240"/>
</usecase_attr>
diff --git a/audio/raven/config/audio_policy_configuration.xml b/audio/raven/config/audio_policy_configuration.xml
index 12b4dc8..6201639 100644
--- a/audio/raven/config/audio_policy_configuration.xml
+++ b/audio/raven/config/audio_policy_configuration.xml
@@ -104,6 +104,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -201,6 +206,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml
index a151fbd..36df571 100644
--- a/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml
+++ b/audio/raven/config/audio_policy_configuration_a2dp_offload_disabled.xml
@@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -178,6 +183,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/raven/config/audio_policy_configuration_bluetooth_legacy_hal.xml b/audio/raven/config/audio_policy_configuration_bluetooth_legacy_hal.xml
index 26bf869..a4284b0 100644
--- a/audio/raven/config/audio_policy_configuration_bluetooth_legacy_hal.xml
+++ b/audio/raven/config/audio_policy_configuration_bluetooth_legacy_hal.xml
@@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -178,6 +183,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/raven/config/mixer_paths.xml b/audio/raven/config/mixer_paths.xml
index 9fdfdb9..f815f5f 100644
--- a/audio/raven/config/mixer_paths.xml
+++ b/audio/raven/config/mixer_paths.xml
@@ -638,6 +638,15 @@
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
+ <path name="low-latency-recordC">
+ <ctl name="EP3 TX Mixer INTERNAL_MIC_TX" value="1"/>
+ </path>
+
+ <path name="low-latency-recordC usb-headset-mic">
+ <ctl name="Audio Capture Mic Source" value="USB_MIC"/>
+ <ctl name="EP3 TX Mixer USB_TX" value="1"/>
+ </path>
+
<path name="mmap-recordC">
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
</path>
diff --git a/audio/slider/config/audio_platform_configuration.xml b/audio/slider/config/audio_platform_configuration.xml
index 9ef4b77..fa14105 100644
--- a/audio/slider/config/audio_platform_configuration.xml
+++ b/audio/slider/config/audio_platform_configuration.xml
@@ -131,7 +131,9 @@
<usecase id="UC_HOSTLESS_UL" dev1="15"/>
<!-- for VOIP input, 4 * 10ms buffer -->
<usecase id="UC_VOIP_RECORD" dev1="17" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
- <!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 480 periods * 1ms buffer,32-bit,2 ch, buffer size 92160 bytes -->
+ <!-- for input wit AUDIO_INPUT_FLAG_FAST 480 periods * 1ms buffer, 16-bit, 2ch, buffer size 92160 bytes-->
+ <usecase id="UC_LOW_LATENCY_AUDIO_RECORD" dev1="10" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="480"/>
+ <!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 240 periods * 1ms buffer, 32-bit,2 ch, buffer size 92160 bytes -->
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="240"/>
</usecase_attr>
diff --git a/audio/slider/config/audio_policy_configuration.xml b/audio/slider/config/audio_policy_configuration.xml
index 99a99d8..4a7d24e 100644
--- a/audio/slider/config/audio_policy_configuration.xml
+++ b/audio/slider/config/audio_policy_configuration.xml
@@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -199,6 +204,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/slider/config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/slider/config/audio_policy_configuration_a2dp_offload_disabled.xml
index a151fbd..36df571 100644
--- a/audio/slider/config/audio_policy_configuration_a2dp_offload_disabled.xml
+++ b/audio/slider/config/audio_policy_configuration_a2dp_offload_disabled.xml
@@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -178,6 +183,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/slider/config/audio_policy_configuration_bluetooth_legacy_hal.xml b/audio/slider/config/audio_policy_configuration_bluetooth_legacy_hal.xml
index 26bf869..a4284b0 100644
--- a/audio/slider/config/audio_policy_configuration_bluetooth_legacy_hal.xml
+++ b/audio/slider/config/audio_policy_configuration_bluetooth_legacy_hal.xml
@@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -178,6 +183,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/slider/config/mixer_paths.xml b/audio/slider/config/mixer_paths.xml
index ad914d9..1d7fe9f 100644
--- a/audio/slider/config/mixer_paths.xml
+++ b/audio/slider/config/mixer_paths.xml
@@ -586,6 +586,15 @@
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
+ <path name="low-latency-recordC">
+ <ctl name="EP3 TX Mixer INTERNAL_MIC_TX" value="1"/>
+ </path>
+
+ <path name="low-latency-recordC usb-headset-mic">
+ <ctl name="Audio Capture Mic Source" value="USB_MIC"/>
+ <ctl name="EP3 TX Mixer USB_TX" value="1"/>
+ </path>
+
<path name="mmap-recordC">
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
</path>
diff --git a/audio/whitefin/config/audio_platform_configuration.xml b/audio/whitefin/config/audio_platform_configuration.xml
index 9ef4b77..fa14105 100644
--- a/audio/whitefin/config/audio_platform_configuration.xml
+++ b/audio/whitefin/config/audio_platform_configuration.xml
@@ -131,7 +131,9 @@
<usecase id="UC_HOSTLESS_UL" dev1="15"/>
<!-- for VOIP input, 4 * 10ms buffer -->
<usecase id="UC_VOIP_RECORD" dev1="17" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
- <!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 480 periods * 1ms buffer,32-bit,2 ch, buffer size 92160 bytes -->
+ <!-- for input wit AUDIO_INPUT_FLAG_FAST 480 periods * 1ms buffer, 16-bit, 2ch, buffer size 92160 bytes-->
+ <usecase id="UC_LOW_LATENCY_AUDIO_RECORD" dev1="10" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="480"/>
+ <!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 240 periods * 1ms buffer, 32-bit,2 ch, buffer size 92160 bytes -->
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="240"/>
</usecase_attr>
diff --git a/audio/whitefin/config/audio_policy_configuration.xml b/audio/whitefin/config/audio_policy_configuration.xml
index b0be8f2..6b27cb2 100644
--- a/audio/whitefin/config/audio_policy_configuration.xml
+++ b/audio/whitefin/config/audio_policy_configuration.xml
@@ -97,6 +97,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -173,6 +178,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/whitefin/config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/whitefin/config/audio_policy_configuration_a2dp_offload_disabled.xml
index 1721ac5..caaafdf 100644
--- a/audio/whitefin/config/audio_policy_configuration_a2dp_offload_disabled.xml
+++ b/audio/whitefin/config/audio_policy_configuration_a2dp_offload_disabled.xml
@@ -97,6 +97,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -173,6 +178,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/whitefin/config/audio_policy_configuration_bluetooth_legacy_hal.xml b/audio/whitefin/config/audio_policy_configuration_bluetooth_legacy_hal.xml
index 7894506..13119ce 100644
--- a/audio/whitefin/config/audio_policy_configuration_bluetooth_legacy_hal.xml
+++ b/audio/whitefin/config/audio_policy_configuration_bluetooth_legacy_hal.xml
@@ -97,6 +97,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000"
@@ -173,6 +178,8 @@
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
<route type="mix" sink="voip_tx"
sources="Built-In Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
diff --git a/audio/whitefin/config/mixer_paths.xml b/audio/whitefin/config/mixer_paths.xml
index 2808af0..c617137 100644
--- a/audio/whitefin/config/mixer_paths.xml
+++ b/audio/whitefin/config/mixer_paths.xml
@@ -689,6 +689,15 @@
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
+ <path name="low-latency-recordC">
+ <ctl name="EP3 TX Mixer INTERNAL_MIC_TX" value="1"/>
+ </path>
+
+ <path name="low-latency-recordC usb-headset-mic">
+ <ctl name="Audio Capture Mic Source" value="USB_MIC"/>
+ <ctl name="EP3 TX Mixer USB_TX" value="1"/>
+ </path>
+
<path name="mmap-recordC">
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
</path>