[P23] Enable LE Audio broadcast offload

1. Set the LE Audio broadcast switcher property
2. Enable LE Audio broadcast profile
3. Add support for BLE Broadcast output in audio policy file
4. Add broadcast offload capability

Test: Manual
Tag: #feature
Bug: 268170293
Change-Id: I423d08442a99cf73535f5664f81c722c62b60996
This commit is contained in:
Patty Huang 2023-02-06 16:20:03 +08:00
parent 71a3b4068b
commit f5c46e3aa7
7 changed files with 42 additions and 6 deletions

View file

@ -186,6 +186,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort> </devicePort>
<devicePort tagName="BT BLE Broadcast" type="AUDIO_DEVICE_OUT_BLE_BROADCAST" role="sink"
encodedFormats="AUDIO_FORMAT_LC3">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source"> <devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source">
</devicePort> </devicePort>
<devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
@ -216,6 +221,8 @@
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="BT BLE Speaker" <route type="mix" sink="BT BLE Speaker"
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="BT BLE Broadcast"
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"

View file

@ -186,6 +186,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort> </devicePort>
<devicePort tagName="BT BLE Broadcast" type="AUDIO_DEVICE_OUT_BLE_BROADCAST" role="sink"
encodedFormats="AUDIO_FORMAT_LC3">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source"> <devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source">
</devicePort> </devicePort>
<devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
@ -216,6 +221,8 @@
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="BT BLE Speaker" <route type="mix" sink="BT BLE Speaker"
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="BT BLE Broadcast"
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"

View file

@ -186,6 +186,11 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort> </devicePort>
<devicePort tagName="BT BLE Broadcast" type="AUDIO_DEVICE_OUT_BLE_BROADCAST" role="sink"
encodedFormats="AUDIO_FORMAT_LC3">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source"> <devicePort tagName="BLE Headset Mic" type="AUDIO_DEVICE_IN_BLE_HEADSET" role="source">
</devicePort> </devicePort>
<devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source"> <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
@ -216,6 +221,8 @@
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="BT BLE Speaker" <route type="mix" sink="BT BLE Speaker"
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="BT BLE Broadcast"
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/>
<route type="mix" sink="USB Device Out" <route type="mix" sink="USB Device Out"
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/>
<route type="mix" sink="USB Headset Out" <route type="mix" sink="USB Headset Out"

View file

@ -51,6 +51,9 @@
<scenario encode="OneChanStereo_32_2" decode="OneChanMono_32_2"/> <scenario encode="OneChanStereo_32_2" decode="OneChanMono_32_2"/>
<scenario encode="TwoChanStereo_32_2" decode="OneChanMono_32_2"/> <scenario encode="TwoChanStereo_32_2" decode="OneChanMono_32_2"/>
<scenario encode="OneChanMono_32_2" decode="OneChanMono_32_2"/> <scenario encode="OneChanMono_32_2" decode="OneChanMono_32_2"/>
<!-- broadcast -->
<scenario encode="invalid" decode="invalid" broadcast="BcastStereo_24_2"/>
<scenario encode="invalid" decode="invalid" broadcast="BcastStereo_16_2"/>
</scenarioList> </scenarioList>
<configurationList> <configurationList>
<configuration name="OneChanMono_16_1" codecConfiguration="LC3_16k_1" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/> <configuration name="OneChanMono_16_1" codecConfiguration="LC3_16k_1" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
@ -68,6 +71,8 @@
<configuration name="OneChanMono_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/> <configuration name="OneChanMono_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
<configuration name="TwoChanStereo_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="STEREO_TWO_CISES_PER_DEVICE"/> <configuration name="TwoChanStereo_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="STEREO_TWO_CISES_PER_DEVICE"/>
<configuration name="OneChanStereo_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="STEREO_ONE_CIS_PER_DEVICE"/> <configuration name="OneChanStereo_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="STEREO_ONE_CIS_PER_DEVICE"/>
<configuration name="BcastStereo_24_2" codecConfiguration="LC3_24k_2" strategyConfiguration="BROADCAST_STEREO"/>
<configuration name="BcastStereo_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="BROADCAST_STEREO"/>
</configurationList> </configurationList>
<codecConfigurationList> <codecConfigurationList>
<codecConfiguration name="LC3_16k_1" codec="LC3" samplingFrequency="16000" frameDurationUs="7500" octetsPerCodecFrame="30"/> <codecConfiguration name="LC3_16k_1" codec="LC3" samplingFrequency="16000" frameDurationUs="7500" octetsPerCodecFrame="30"/>
@ -80,6 +85,7 @@
<strategyConfiguration name="STEREO_ONE_CIS_PER_DEVICE" audioLocation="STEREO" connectedDevice="2" channelCount="1"/> <strategyConfiguration name="STEREO_ONE_CIS_PER_DEVICE" audioLocation="STEREO" connectedDevice="2" channelCount="1"/>
<strategyConfiguration name="STEREO_TWO_CISES_PER_DEVICE" audioLocation="STEREO" connectedDevice="1" channelCount="2"/> <strategyConfiguration name="STEREO_TWO_CISES_PER_DEVICE" audioLocation="STEREO" connectedDevice="1" channelCount="2"/>
<strategyConfiguration name="MONO_ONE_CIS_PER_DEVICE" audioLocation="MONO" connectedDevice="1" channelCount="1"/> <strategyConfiguration name="MONO_ONE_CIS_PER_DEVICE" audioLocation="MONO" connectedDevice="1" channelCount="1"/>
<strategyConfiguration name="BROADCAST_STEREO" audioLocation="STEREO" connectedDevice="0" channelCount="2"/>
</strategyConfigurationList> </strategyConfigurationList>
</leAudioOffloadSetting> </leAudioOffloadSetting>

View file

@ -151,12 +151,15 @@ PRODUCT_PRODUCT_PROPERTIES += \
bluetooth.profile.hap.client.enabled=true \ bluetooth.profile.hap.client.enabled=true \
bluetooth.profile.mcp.server.enabled=true \ bluetooth.profile.mcp.server.enabled=true \
bluetooth.profile.ccp.server.enabled=true \ bluetooth.profile.ccp.server.enabled=true \
bluetooth.profile.vcp.controller.enabled=true bluetooth.profile.vcp.controller.enabled=true \
bluetooth.profile.bap.broadcast.assist.enabled=true \
bluetooth.profile.bap.broadcast.source.enabled=true
# Bluetooth LE Audio enable hardware offloading # Bluetooth LE Audio enable hardware offloading
PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \
ro.bluetooth.leaudio_offload.supported=true \ ro.bluetooth.leaudio_offload.supported=true \
persist.bluetooth.leaudio_offload.disabled=false persist.bluetooth.leaudio_offload.disabled=false \
ro.bluetooth.leaudio_broadcast_switcher.supported=true
# Bluetooth LE Auido offload capabilities setting # Bluetooth LE Auido offload capabilities setting
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \

View file

@ -151,12 +151,15 @@ PRODUCT_PRODUCT_PROPERTIES += \
bluetooth.profile.hap.client.enabled=true \ bluetooth.profile.hap.client.enabled=true \
bluetooth.profile.mcp.server.enabled=true \ bluetooth.profile.mcp.server.enabled=true \
bluetooth.profile.ccp.server.enabled=true \ bluetooth.profile.ccp.server.enabled=true \
bluetooth.profile.vcp.controller.enabled=true bluetooth.profile.vcp.controller.enabled=true \
bluetooth.profile.bap.broadcast.assist.enabled=true \
bluetooth.profile.bap.broadcast.source.enabled=true
# Bluetooth LE Audio enable hardware offloading # Bluetooth LE Audio enable hardware offloading
PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \
ro.bluetooth.leaudio_offload.supported=true \ ro.bluetooth.leaudio_offload.supported=true \
persist.bluetooth.leaudio_offload.disabled=false persist.bluetooth.leaudio_offload.disabled=false \
ro.bluetooth.leaudio_broadcast_switcher.supported=true
# Bluetooth LE Auido offload capabilities setting # Bluetooth LE Auido offload capabilities setting
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \

View file

@ -146,12 +146,15 @@ PRODUCT_PRODUCT_PROPERTIES += \
bluetooth.profile.hap.client.enabled=true \ bluetooth.profile.hap.client.enabled=true \
bluetooth.profile.mcp.server.enabled=true \ bluetooth.profile.mcp.server.enabled=true \
bluetooth.profile.ccp.server.enabled=true \ bluetooth.profile.ccp.server.enabled=true \
bluetooth.profile.vcp.controller.enabled=true bluetooth.profile.vcp.controller.enabled=true \
bluetooth.profile.bap.broadcast.assist.enabled=true \
bluetooth.profile.bap.broadcast.source.enabled=true
# Bluetooth LE Audio enable hardware offloading # Bluetooth LE Audio enable hardware offloading
PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \
ro.bluetooth.leaudio_offload.supported=true \ ro.bluetooth.leaudio_offload.supported=true \
persist.bluetooth.leaudio_offload.disabled=false persist.bluetooth.leaudio_offload.disabled=false \
ro.bluetooth.leaudio_broadcast_switcher.supported=true
# Bluetooth LE Auido offload capabilities setting # Bluetooth LE Auido offload capabilities setting
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \