samples: Bluetooth: Broadcast audio sink USB headset on nRF52 Series
Broadcast audio sink USB headset on nRF52 Series with USB support. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
bd5e906f68
commit
cd6674f7c2
15 changed files with 45 additions and 22 deletions
|
@ -47,7 +47,8 @@ config ENABLE_LC3
|
||||||
bool "Enable the LC3 codec"
|
bool "Enable the LC3 codec"
|
||||||
# By default let's enable it in the platforms we know are capable of supporting it
|
# By default let's enable it in the platforms we know are capable of supporting it
|
||||||
default y
|
default y
|
||||||
depends on (ARCH_POSIX || SOC_NRF5340_CPUAPP)
|
depends on CPU_HAS_FPU && \
|
||||||
|
(ARCH_POSIX || SOC_COMPATIBLE_NRF52X || SOC_COMPATIBLE_NRF5340_CPUAPP)
|
||||||
select LIBLC3
|
select LIBLC3
|
||||||
select FPU
|
select FPU
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Use USB Audio as audio sink
|
||||||
|
CONFIG_USE_USB_AUDIO_OUTPUT=y
|
||||||
|
CONFIG_USB_DEVICE_PRODUCT="USB Broadcast Sink"
|
|
@ -0,0 +1,15 @@
|
||||||
|
zephyr_udc0: &usbd {
|
||||||
|
compatible = "nordic,nrf-usbd";
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
hs_0: hs_0 {
|
||||||
|
compatible = "usb-audio-hs";
|
||||||
|
mic-feature-mute;
|
||||||
|
mic-channel-l;
|
||||||
|
mic-channel-r;
|
||||||
|
|
||||||
|
hp-feature-mute;
|
||||||
|
hp-channel-l;
|
||||||
|
hp-channel-r;
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Use USB Audio as audio sink
|
||||||
|
CONFIG_USE_USB_AUDIO_OUTPUT=y
|
||||||
|
CONFIG_USB_DEVICE_PRODUCT="USB Broadcast Sink"
|
|
@ -0,0 +1,15 @@
|
||||||
|
zephyr_udc0: &usbd {
|
||||||
|
compatible = "nordic,nrf-usbd";
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
hs_0: hs_0 {
|
||||||
|
compatible = "usb-audio-hs";
|
||||||
|
mic-feature-mute;
|
||||||
|
mic-channel-l;
|
||||||
|
mic-channel-r;
|
||||||
|
|
||||||
|
hp-feature-mute;
|
||||||
|
hp-channel-l;
|
||||||
|
hp-channel-r;
|
||||||
|
};
|
||||||
|
};
|
|
@ -1,7 +1,3 @@
|
||||||
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
|
# Use USB Audio as audio sink
|
||||||
# inctease stack size for that thread.
|
|
||||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
|
|
||||||
CONFIG_ENABLE_LC3=y
|
|
||||||
CONFIG_TARGET_BROADCAST_CHANNEL=1
|
|
||||||
CONFIG_USE_USB_AUDIO_OUTPUT=y
|
CONFIG_USE_USB_AUDIO_OUTPUT=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="USB Broadcast Sink"
|
CONFIG_USB_DEVICE_PRODUCT="USB Broadcast Sink"
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
|
|
||||||
# inctease stack size for that thread.
|
|
||||||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
|
|
|
@ -20,8 +20,10 @@ tests:
|
||||||
- nrf52_bsim
|
- nrf52_bsim
|
||||||
- nrf52833dk/nrf52820
|
- nrf52833dk/nrf52820
|
||||||
- nrf52833dk/nrf52833
|
- nrf52833dk/nrf52833
|
||||||
|
- nrf52840dongle/nrf52840
|
||||||
integration_platforms:
|
integration_platforms:
|
||||||
- nrf52_bsim
|
- nrf52_bsim
|
||||||
- nrf52833dk/nrf52833
|
- nrf52833dk/nrf52833
|
||||||
|
- nrf52840dongle/nrf52840
|
||||||
extra_args: OVERLAY_CONFIG=overlay-bt_ll_sw_split.conf
|
extra_args: OVERLAY_CONFIG=overlay-bt_ll_sw_split.conf
|
||||||
tags: bluetooth
|
tags: bluetooth
|
||||||
|
|
|
@ -1259,7 +1259,7 @@ static int init(void)
|
||||||
|
|
||||||
usb_audio_register(hs_dev, &usb_ops);
|
usb_audio_register(hs_dev, &usb_ops);
|
||||||
err = usb_enable(NULL);
|
err = usb_enable(NULL);
|
||||||
if (err != 0) {
|
if (err && err != -EALREADY) {
|
||||||
printk("Failed to enable USB\n");
|
printk("Failed to enable USB\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
CONFIG_MAIN_STACK_SIZE=4096
|
# Use USB Audio as audio source
|
||||||
|
|
||||||
# Use USB Audio as input
|
|
||||||
CONFIG_USE_USB_AUDIO_INPUT=y
|
CONFIG_USE_USB_AUDIO_INPUT=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr Broadcast Source"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr Broadcast Source"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
CONFIG_MAIN_STACK_SIZE=4096
|
# Use USB Audio as audio source
|
||||||
|
|
||||||
# Use USB Audio as input
|
|
||||||
CONFIG_USE_USB_AUDIO_INPUT=y
|
CONFIG_USE_USB_AUDIO_INPUT=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr Broadcast Source"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr Broadcast Source"
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
CONFIG_MAIN_STACK_SIZE=4096
|
|
|
@ -1,5 +1,3 @@
|
||||||
CONFIG_MAIN_STACK_SIZE=4096
|
# Use USB Audio as audio source
|
||||||
|
|
||||||
# Use USB Audio as input
|
|
||||||
CONFIG_USE_USB_AUDIO_INPUT=y
|
CONFIG_USE_USB_AUDIO_INPUT=y
|
||||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr Broadcast Source"
|
CONFIG_USB_DEVICE_PRODUCT="Zephyr Broadcast Source"
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
CONFIG_MAIN_STACK_SIZE=4096
|
|
|
@ -1 +0,0 @@
|
||||||
CONFIG_MAIN_STACK_SIZE=4096
|
|
Loading…
Add table
Add a link
Reference in a new issue