5757#define IS_BAP_INITIATOR \
5858 (IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SOURCE) || IS_ENABLED(CONFIG_BT_BAP_UNICAST_CLIENT))
5959
60- #define GENERATE_SINE_SUPPORTED (IS_ENABLED(CONFIG_LIBLC3) && !IS_ENABLED(CONFIG_USB_DEVICE_AUDIO ))
60+ #define GENERATE_SINE_SUPPORTED (IS_ENABLED(CONFIG_LIBLC3) && !IS_ENABLED(CONFIG_USBD_AUDIO2_CLASS ))
6161
6262#if defined(CONFIG_BT_BAP_UNICAST )
6363
@@ -318,7 +318,7 @@ static int init_lc3_encoder(struct shell_stream *sh_stream)
318318 return - EINVAL ;
319319 }
320320
321- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO )) {
321+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS )) {
322322 const size_t frame_size = bap_usb_get_frame_size (sh_stream );
323323
324324 if (frame_size > sizeof (lc3_tx_buf )) {
@@ -337,7 +337,7 @@ static int init_lc3_encoder(struct shell_stream *sh_stream)
337337
338338 sh_stream -> tx .lc3_encoder =
339339 lc3_setup_encoder (sh_stream -> lc3_frame_duration_us , sh_stream -> lc3_freq_hz ,
340- IS_ENABLED (CONFIG_USB_DEVICE_AUDIO ) ? USB_SAMPLE_RATE : 0 ,
340+ IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS ) ? USB_SAMPLE_RATE : 0 ,
341341 & sh_stream -> tx .lc3_encoder_mem );
342342 if (sh_stream -> tx .lc3_encoder == NULL ) {
343343 bt_shell_error ("Failed to setup LC3 encoder - wrong parameters?\n" );
@@ -375,7 +375,7 @@ static bool encode_frame(struct shell_stream *sh_stream, uint8_t index, size_t f
375375 const uint16_t octets_per_frame = sh_stream -> lc3_octets_per_frame ;
376376 int lc3_ret ;
377377
378- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO )) {
378+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS )) {
379379 enum bt_audio_location chan_alloc ;
380380 int err ;
381381
@@ -432,7 +432,7 @@ static size_t encode_frame_block(struct shell_stream *sh_stream, size_t frame_cn
432432
433433static void do_lc3_encode (struct shell_stream * sh_stream , struct net_buf * out_buf )
434434{
435- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO ) && !bap_usb_can_get_full_sdu (sh_stream )) {
435+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS ) && !bap_usb_can_get_full_sdu (sh_stream )) {
436436 /* No op - Will just send empty SDU */
437437 } else {
438438 size_t frame_cnt = 0U ;
@@ -2633,7 +2633,7 @@ static int init_lc3_decoder(struct shell_stream *sh_stream)
26332633 /* Create the decoder instance. This shall complete before stream_started() is called. */
26342634 sh_stream -> rx .lc3_decoder =
26352635 lc3_setup_decoder (sh_stream -> lc3_frame_duration_us , sh_stream -> lc3_freq_hz ,
2636- IS_ENABLED (CONFIG_USB_DEVICE_AUDIO ) ? USB_SAMPLE_RATE : 0 ,
2636+ IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS ) ? USB_SAMPLE_RATE : 0 ,
26372637 & sh_stream -> rx .lc3_decoder_mem );
26382638 if (sh_stream -> rx .lc3_decoder == NULL ) {
26392639 bt_shell_error ("Failed to setup LC3 decoder - wrong parameters?\n" );
@@ -2694,7 +2694,7 @@ static size_t decode_frame_block(struct lc3_data *data, size_t frame_cnt)
26942694 if (decode_frame (data , frame_cnt + decoded_frames )) {
26952695 decoded_frames ++ ;
26962696
2697- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO )) {
2697+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS )) {
26982698 enum bt_audio_location chan_alloc ;
26992699 int err ;
27002700
@@ -2722,7 +2722,7 @@ static size_t decode_frame_block(struct lc3_data *data, size_t frame_cnt)
27222722 /* If decoding failed, we clear the data to USB as it would contain
27232723 * invalid data
27242724 */
2725- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO )) {
2725+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS )) {
27262726 bap_usb_clear_frames_to_usb ();
27272727 }
27282728
@@ -3008,7 +3008,7 @@ static void stream_started_cb(struct bt_bap_stream *bap_stream)
30083008 return ;
30093009 }
30103010
3011- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO )) {
3011+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS )) {
30123012 /* Always mark as active when using USB */
30133013 sh_stream -> tx .active = true;
30143014 }
@@ -3029,7 +3029,7 @@ static void stream_started_cb(struct bt_bap_stream *bap_stream)
30293029
30303030 sh_stream -> rx .decoded_cnt = 0U ;
30313031
3032- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO )) {
3032+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS )) {
30333033 if ((sh_stream -> lc3_chan_allocation &
30343034 BT_AUDIO_LOCATION_FRONT_LEFT ) != 0 ) {
30353035 if (usb_left_stream == NULL ) {
@@ -3148,7 +3148,7 @@ static void clear_stream_data(struct shell_stream *sh_stream)
31483148 sh_stream -> is_rx = sh_stream -> is_tx = false;
31493149
31503150#if defined(CONFIG_LIBLC3 )
3151- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO )) {
3151+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS )) {
31523152 update_usb_streams (sh_stream );
31533153 }
31543154#endif /* CONFIG_LIBLC3 */
@@ -3931,7 +3931,7 @@ static int cmd_init(const struct shell *sh, size_t argc, char *argv[])
39313931
39323932#endif /* CONFIG_BT_AUDIO_TX */
39333933
3934- if (IS_ENABLED (CONFIG_USB_DEVICE_AUDIO ) &&
3934+ if (IS_ENABLED (CONFIG_USBD_AUDIO2_CLASS ) &&
39353935 (IS_ENABLED (CONFIG_BT_AUDIO_RX ) || IS_ENABLED (CONFIG_BT_AUDIO_TX ))) {
39363936 err = bap_usb_init ();
39373937 __ASSERT (err == 0 , "Failed to enable USB: %d" , err );
0 commit comments