haptics: enable hapitcs sink and slot setting

Bug: 220068530
Test: trigger audio coupled haptics via sound picker app
Change-Id: I08885ae97e6f47a2840680481c3f9fb56cbe3c47
This commit is contained in:
Tai Kuo 2022-02-16 19:09:24 +08:00 committed by TreeHugger Robot
parent 3ae3bd1b52
commit 1b93fdd730
4 changed files with 34 additions and 33 deletions

View file

@ -50,11 +50,11 @@
samplingRates="8000 16000 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
</mixPort-->
<!--mixPort name="haptic" role="source">
<mixPort name="haptic" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A" />
</mixPort-->
</mixPort>
<!--mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
@ -185,27 +185,27 @@
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
<route type="mix" sink="Speaker"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="Speaker Safe"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT A2DP Out"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT A2DP Headphones"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO Headset"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<!--route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" /-->
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>

View file

@ -50,11 +50,11 @@
samplingRates="8000 16000 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
</mixPort-->
<!--mixPort name="haptic" role="source">
<mixPort name="haptic" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A" />
</mixPort-->
</mixPort>
<!--mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
@ -170,21 +170,21 @@
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
<route type="mix" sink="Speaker"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="Speaker Safe"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO Headset"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<!--route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" /-->
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>

View file

@ -50,11 +50,11 @@
samplingRates="8000 16000 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
</mixPort-->
<!--mixPort name="haptic" role="source">
<mixPort name="haptic" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A" />
</mixPort-->
</mixPort>
<!--mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST">
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
@ -170,21 +170,21 @@
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
<route type="mix" sink="Speaker"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="Speaker Safe"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="Earpiece"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO Headset"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,deep buffer"/>
sources="primary output,deep buffer,haptic"/>
<!--route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" /-->
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>

View file

@ -39,6 +39,7 @@
<ctl name="TDM_0_TX Sample Rate" value="SR_48K" />
<!-- Haptic setting -->
<ctl name="Haptics Source" value="PCM"/>
<ctl name="HAPTIC_RX Format" value="S32_LE"/>
<ctl name="HAPTIC_RX SlotFmt" value="S32_LE"/>
<ctl name="HAPTIC_RX Chan" value="Four"/>