nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches
audio_usb.h File Reference
#include <zephyr/kernel.h>
#include <zephyr/usb/usbd.h>

Go to the source code of this file.

Macros

#define USB_1MS_BLOCKS_NUM_MAX
 
#define USB_BLOCK_1MS_MONO_SIZE    (CONFIG_AUDIO_SAMPLE_RATE_HZ * CONFIG_AUDIO_BIT_DEPTH_OCTETS / MSEC_PER_SEC)
 
#define USB_BLOCK_MULTI_CHAN_1MS_SIZE    (USB_BLOCK_1MS_MONO_SIZE * MAX(CONFIG_AUDIO_INPUT_CHANNELS, CONFIG_AUDIO_OUTPUT_CHANNELS))
 

Functions

struct usbd_context * audio_usbd_init_device (usbd_msg_cb_t msg_cb)
 
bool audio_usb_headphones_out_enabled (void)
 Get the state of the USB devices headphones out.
 
bool audio_usb_headset_out_enabled (void)
 Get the state of the USB devices headset out.
 
bool audio_usb_headset_in_enabled (void)
 Get the state of the USB devices headset in.
 
int audio_usb_start (struct k_msgq *audio_q_out_ptr, struct k_msgq *audio_q_in_ptr)
 Set pointers to the queues to be used by the USB module and start sending/receiving data.
 
int audio_usb_stop (void)
 Stop sending/receiving data.
 
int audio_usb_disable (void)
 Stop and disable USB device.
 
int audio_usb_init (bool host_in, bool host_out)
 Register and enable USB device.