audio: add to support mmap record am: 80c7d2ef11 am: 7e504ab9ba

Original change: https://googleplex-android-review.googlesource.com/c/device/google/raviole/+/14088589

Change-Id: I5944b509c8a0fa7571f845c38fa6707b5e9d26dd
This commit is contained in:
millerliang 2021-05-06 14:44:22 +00:00 committed by Automerger Merge Worker
commit a084ec9e09
20 changed files with 132 additions and 4 deletions

View file

@ -115,7 +115,7 @@
<!-- for output with AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST, 4 * 10ms buffer -->
<usecase id="UC_LOW_LATENCY_PLAYBACK" dev1="1" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
<!-- for output with AUDIO_OUTPUT_FLAG_MMAP_NOIRQ, 80 periods * 48 frames/period(=1ms w/ 48k sample rate) * 4 bytes/frame = 15360 bytes -->
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="80"/>
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="80"/>
<!-- for output with AUDIO_OUTPUT_FLAG_DEEP_BUFFER, 4 * 20ms buffer -->
<usecase id="UC_DEEP_BUFFER_PLAYBACK" dev1="5" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="4"/>
<!-- dev1: voice-call downlink dev2: voice-clal uplink -->
@ -131,6 +131,8 @@
<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 -->
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="240"/>
</usecase_attr>
<dsp_latency>

View file

@ -104,6 +104,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -196,6 +201,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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- Bluetooth Audio HAL -->

View file

@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- Bluetooth Audio HAL -->

View file

@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- A2dp Audio HAL -->

View file

@ -611,6 +611,15 @@
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
<path name="mmap-recordC">
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
</path>
<path name="mmap-recordC usb-headset-mic">
<ctl name="Audio Capture Mic Source" value="USB_MIC"/>
<ctl name="EP2 TX Mixer USB_TX" value="1"/>
</path>
<!-- codec setting -->>
<!-- Rx device -->
<path name="handset">

View file

@ -115,7 +115,7 @@
<!-- for output with AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST, 4 * 10ms buffer -->
<usecase id="UC_LOW_LATENCY_PLAYBACK" dev1="1" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
<!-- for output with AUDIO_OUTPUT_FLAG_MMAP_NOIRQ, 80 periods * 48 frames/period(=1ms w/ 48k sample rate) * 4 bytes/frame = 15360 bytes -->
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="80"/>
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="80"/>
<!-- for output with AUDIO_OUTPUT_FLAG_DEEP_BUFFER, 4 * 20ms buffer -->
<usecase id="UC_DEEP_BUFFER_PLAYBACK" dev1="5" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="4"/>
<!-- dev1: voice-call downlink dev2: voice-clal uplink -->
@ -131,6 +131,8 @@
<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 -->
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="240"/>
</usecase_attr>
<dsp_latency>

View file

@ -104,6 +104,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -196,6 +201,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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- Bluetooth Audio HAL -->

View file

@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- Bluetooth Audio HAL -->

View file

@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- A2dp Audio HAL -->

View file

@ -638,6 +638,15 @@
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
<path name="mmap-recordC">
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
</path>
<path name="mmap-recordC usb-headset-mic">
<ctl name="Audio Capture Mic Source" value="USB_MIC"/>
<ctl name="EP2 TX Mixer USB_TX" value="1"/>
</path>
<!-- codec setting -->>
<!-- Rx device -->
<path name="handset">

View file

@ -115,7 +115,7 @@
<!-- for output with AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST, 4 * 10ms buffer -->
<usecase id="UC_LOW_LATENCY_PLAYBACK" dev1="1" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
<!-- for output with AUDIO_OUTPUT_FLAG_MMAP_NOIRQ, 80 periods * 48 frames/period(=1ms w/ 48k sample rate) * 4 bytes/frame = 15360 bytes -->
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="80"/>
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="80"/>
<!-- for output with AUDIO_OUTPUT_FLAG_DEEP_BUFFER, 4 * 20ms buffer -->
<usecase id="UC_DEEP_BUFFER_PLAYBACK" dev1="5" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="4"/>
<!-- dev1: voice-call downlink dev2: voice-clal uplink -->
@ -131,6 +131,8 @@
<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 -->
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="240"/>
</usecase_attr>
<dsp_latency>

View file

@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -194,6 +199,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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- Bluetooth Audio HAL -->

View file

@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- Bluetooth Audio HAL -->

View file

@ -102,6 +102,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- A2dp Audio HAL -->

View file

@ -586,6 +586,15 @@
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
<path name="mmap-recordC">
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
</path>
<path name="mmap-recordC usb-headset-mic">
<ctl name="Audio Capture Mic Source" value="USB_MIC"/>
<ctl name="EP2 TX Mixer USB_TX" value="1"/>
</path>
<!-- codec setting -->>
<!-- Rx device -->
<path name="handset">

View file

@ -115,7 +115,7 @@
<!-- for output with AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST, 4 * 10ms buffer -->
<usecase id="UC_LOW_LATENCY_PLAYBACK" dev1="1" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
<!-- for output with AUDIO_OUTPUT_FLAG_MMAP_NOIRQ, 80 periods * 48 frames/period(=1ms w/ 48k sample rate) * 4 bytes/frame = 15360 bytes -->
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="80"/>
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="80"/>
<!-- for output with AUDIO_OUTPUT_FLAG_DEEP_BUFFER, 4 * 20ms buffer -->
<usecase id="UC_DEEP_BUFFER_PLAYBACK" dev1="5" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="4"/>
<!-- dev1: voice-call downlink dev2: voice-clal uplink -->
@ -131,6 +131,8 @@
<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 -->
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="240"/>
</usecase_attr>
<dsp_latency>

View file

@ -97,6 +97,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -168,6 +173,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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- Bluetooth Audio HAL -->

View file

@ -97,6 +97,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -168,6 +173,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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- Bluetooth Audio HAL -->

View file

@ -97,6 +97,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</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"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -168,6 +173,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="mmap_no_irq_in"
sources="Built-In Mic,USB Device In,USB Headset In"/>
</routes>
</module>
<!-- A2dp Audio HAL -->

View file

@ -689,6 +689,15 @@
<ctl name="Incall Capture Stream2" value="UL_DL"/>
</path>
<path name="mmap-recordC">
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
</path>
<path name="mmap-recordC usb-headset-mic">
<ctl name="Audio Capture Mic Source" value="USB_MIC"/>
<ctl name="EP2 TX Mixer USB_TX" value="1"/>
</path>
<!-- codec setting -->>
<!-- Rx device -->
<path name="handset">