Re: [PATCH v26 12/33] ASoC: Add SOC USB APIs for adding an USB backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 8/29/24 21:40, Wesley Cheng wrote:
> Some platforms may have support for offloading USB audio devices to a
> dedicated audio DSP.  Introduce a set of APIs that allow for management of
> USB sound card and PCM devices enumerated by the USB SND class driver.
> This allows for the ASoC components to be aware of what USB devices are
> available for offloading.
> 
> Signed-off-by: Wesley Cheng <quic_wcheng@xxxxxxxxxxx>

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>

minor nit-picks below if you respin the series.

> +
> +/**
> + * struct snd_soc_usb_device
> + * @card_idx - sound card index associated with USB device
> + * @chip_idx - USB sound chip array index
> + * @cpcm_idx - capture PCM index array associated with USB device
> + * @ppcm_idx - playback PCM index array associated with USB device
> + * @num_playback - number of playback streams
> + * @num_capture - number of capture streams
> + * @list - list head for SoC USB devices
> + **/
> +struct snd_soc_usb_device {
> +	int card_idx;
> +	int chip_idx;
> +
> +	/* PCM index arrays */
> +	unsigned int *cpcm_idx; /* TODO: capture path is not tested yet */
> +	unsigned int *ppcm_idx;
> +	int num_playback;
> +	int num_capture; /* TODO: capture path is not tested yet */

nit-pick: I would keep the order between capture and playback consistent.

> +int snd_soc_usb_connect(struct device *usbdev, struct snd_soc_usb_device *sdev);
> +int snd_soc_usb_disconnect(struct device *usbdev, struct snd_soc_usb_device *sdev);
> +void *snd_soc_usb_find_priv_data(struct device *dev);

nit-pick: I would keep the parameter naming consistent with
struct device *usbdev


> +static inline void *snd_soc_usb_find_priv_data(struct device *dev)

same here.

> +/**
> + * snd_soc_usb_allocate_port() - allocate a SOC USB port for offloading support
> + * @component: USB DPCM backend DAI component
> + * @num_streams: number of offloading sessions supported
> + * @data: private data
> + *
> + * Allocate and initialize a SOC USB port.  The SOC USB port is used to communicate
> + * different USB audio devices attached, in order to start audio offloading handled
> + * by an ASoC entity.  USB device plug in/out events are signalled with a

typo: signaled






[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux