[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1bcf8eee-7d7f-48b2-aa0f-2c578d4ca79c@linux.intel.com>
Date: Fri, 30 Aug 2024 10:40:59 +0200
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Wesley Cheng <quic_wcheng@...cinc.com>, srinivas.kandagatla@...aro.org,
mathias.nyman@...el.com, perex@...ex.cz, conor+dt@...nel.org,
dmitry.torokhov@...il.com, corbet@....net, broonie@...nel.org,
lgirdwood@...il.com, tiwai@...e.com, krzk+dt@...nel.org,
Thinh.Nguyen@...opsys.com, bgoswami@...cinc.com, robh@...nel.org,
gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-sound@...r.kernel.org, linux-input@...r.kernel.org,
linux-usb@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-doc@...r.kernel.org, alsa-devel@...a-project.org
Subject: Re: [PATCH v26 12/33] ASoC: Add SOC USB APIs for adding an USB
backend
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@...cinc.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
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
Powered by blists - more mailing lists