Skip to content

Commit

Permalink
garnet: audio: Import Bluetooth Devices Encodings for Dolby Processing
Browse files Browse the repository at this point in the history
Signed-off-by: Omar Mohamed <omarcoptan9@gmail.com>
  • Loading branch information
johnmart19 authored and kleidione committed Jan 22, 2025
1 parent 2f6f9f6 commit e78d932
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions configs/audio/audio_policy_configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,23 @@
</devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort>

<!-- Custom Bluetooth Ports Declarations for Dolby Processing -->
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"
encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"
encodedFormats="AUDIO_FORMAT_LDAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
</devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
Expand Down Expand Up @@ -346,6 +363,14 @@
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />

<!-- Custom Bluetooth Routes Declaration for Dolby Processing -->
<route type="mix" sink="BT A2DP Out"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT A2DP Headphones"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,deep_buffer,compressed_offload,voip_rx"/>
</routes>

</module>
Expand Down

0 comments on commit e78d932

Please sign in to comment.