Messages in this thread | | | Date | Tue, 30 Apr 2024 01:01:29 -0700 | Subject | Re: [PATCH v20 22/41] ASoC: usb: Add PCM format check API for USB backend | From | Wesley Cheng <> |
| |
Hi Amadeusz,
On 4/26/2024 6:25 AM, Amadeusz Sławiński wrote: > On 4/25/2024 11:51 PM, Wesley Cheng wrote: >> Introduce a helper to check if a particular PCM format is supported by >> the >> USB audio device connected. If the USB audio device does not have an >> audio profile which can support the requested format, then notify the USB >> backend. >> >> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> >> --- > > (...) > >> +/** >> + * snd_soc_usb_find_format() - Check if audio format is supported >> + * @card_idx: USB sound chip array index >> + * @params: PCM parameters >> + * @direction: capture or playback >> + * >> + * Ensure that a requested audio profile from the ASoC side is able >> to be >> + * supported by the USB device. >> + * >> + * Return 0 on success, negative on error. >> + * >> + */ >> +int snd_soc_usb_find_format(int card_idx, struct snd_pcm_hw_params >> *params, >> + int direction) > > Perhaps name function similar to its snd_usb equivalent, so > snd_soc_usb_find_supported_format? >
Will do.
Thanks Wesley Cheng
| |