USB Audio: Enable HIFI Playback on the audio HAL part on Raviole.

Test: Test: local build test. If use highspeed usb + capture. AOC crash. otherwise, everything is normal
Bug: 182996456
Change-Id: I48958acf8dfc77fa90096fc72cd6912c460e1db2
This commit is contained in:
Joey Poomarin Phloyphisut 2021-05-24 04:44:31 +00:00 committed by Poomarin Phloyphisut
parent dc760c40dd
commit 3375ea9045
20 changed files with 104 additions and 28 deletions

View file

@ -135,6 +135,8 @@
<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"/>
<!-- for hifi -->
<usecase id="UC_HIFI_PLAYBACK" dev1="25"/>
</usecase_attr>
<dsp_latency>
@ -196,7 +198,7 @@
</device_handle>
<device_handle>
<hadnler libname="audio_usb_aoc.so"/>
<hadnler libname="audio_usb_aoc.so" argu="MaxSamplingRate=96000"/>
</device_handle>
<external_module>

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -186,9 +187,9 @@
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,deep buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -165,9 +166,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -165,9 +166,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -506,6 +506,20 @@
<ctl name="TDM_0_RX Mixer EP8" value="1"/>
</path>
<path name="hifi-playbackP">
</path>
<path name="hifi-playbackP usb-headphone">
<ctl name="PCM Playback Volume" value="1000"/>
</path>
<path name="hifi-recordC">
</path>
<path name="hifi-recordC usb-headphone">
<ctl name="PCM Playback Volume" value="1000"/>
</path>
<!-- audio capture dynamic route -->
<path name="audio-recordC">
<ctl name="EP1 TX Mixer INTERNAL_MIC_TX" value="1"/>

View file

@ -135,6 +135,8 @@
<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"/>
<!-- for hifi -->
<usecase id="UC_HIFI_PLAYBACK" dev1="25"/>
</usecase_attr>
<dsp_latency>
@ -196,7 +198,7 @@
</device_handle>
<device_handle>
<hadnler libname="audio_usb_aoc.so"/>
<hadnler libname="audio_usb_aoc.so" argu="MaxSamplingRate=96000"/>
</device_handle>
<external_module>

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -186,9 +187,9 @@
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,deep buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -165,9 +166,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -165,9 +166,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -533,6 +533,20 @@
<ctl name="TDM_0_RX Mixer EP8" value="1"/>
</path>
<path name="hifi-playbackP">
</path>
<path name="hifi-playbackP usb-headphone">
<ctl name="PCM Playback Volume" value="1000"/>
</path>
<path name="hifi-recordC">
</path>
<path name="hifi-recordC usb-headphone">
<ctl name="PCM Playback Volume" value="1000"/>
</path>
<!-- audio capture dynamic route -->
<path name="audio-recordC">
<ctl name="EP1 TX Mixer INTERNAL_MIC_TX" value="1"/>

View file

@ -135,6 +135,8 @@
<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"/>
<!-- for hifi -->
<usecase id="UC_HIFI_PLAYBACK" dev1="25"/>
</usecase_attr>
<dsp_latency>
@ -196,7 +198,7 @@
</device_handle>
<device_handle>
<hadnler libname="audio_usb_aoc.so"/>
<hadnler libname="audio_usb_aoc.so" argu="MaxSamplingRate=96000"/>
</device_handle>
<external_module>

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -186,9 +187,9 @@
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -165,9 +166,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -112,6 +112,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -165,9 +166,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,haptic,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -462,6 +462,20 @@
<ctl name="TDM_0_RX Mixer EP8" value="1"/>
</path>
<path name="hifi-playbackP">
</path>
<path name="hifi-playbackP usb-headphone">
<ctl name="PCM Playback Volume" value="1000"/>
</path>
<path name="hifi-recordC">
</path>
<path name="hifi-recordC usb-headphone">
<ctl name="PCM Playback Volume" value="1000"/>
</path>
<!-- audio capture dynamic route -->
<path name="audio-recordC">
<ctl name="EP1 TX Mixer INTERNAL_MIC_TX" value="1"/>

View file

@ -135,6 +135,8 @@
<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"/>
<!-- for hifi -->
<usecase id="UC_HIFI_PLAYBACK" dev1="25"/>
</usecase_attr>
<dsp_latency>
@ -196,7 +198,7 @@
</device_handle>
<device_handle>
<hadnler libname="audio_usb_aoc.so"/>
<hadnler libname="audio_usb_aoc.so" argu="MaxSamplingRate=96000"/>
</device_handle>
<external_module>

View file

@ -107,6 +107,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -160,9 +161,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -107,6 +107,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -160,9 +161,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -107,6 +107,7 @@
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
@ -160,9 +161,9 @@
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx"/>
sources="primary output,deep buffer,raw,compressed_offload,mmap_no_irq_out,voip_rx,hifi_playback"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT SCO Headset"

View file

@ -538,6 +538,20 @@
<ctl name="TDM_0_RX Mixer EP8" value="1"/>
</path>
<path name="hifi-playbackP">
</path>
<path name="hifi-playbackP usb-headphone">
<ctl name="PCM Playback Volume" value="1000"/>
</path>
<path name="hifi-recordC">
</path>
<path name="hifi-recordC usb-headphone">
<ctl name="PCM Playback Volume" value="1000"/>
</path>
<!-- audio capture dynamic route -->
<path name="audio-recordC">
<ctl name="EP1 TX Mixer INTERNAL_MIC_TX" value="1"/>