lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d70c19f-bab8-4e50-9551-de406a0e0314@linux.intel.com>
Date: Fri, 26 Apr 2024 15:25:18 +0200
From: Amadeusz Sławiński
 <amadeuszx.slawinski@...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,
 corbet@....net, lgirdwood@...il.com, andersson@...nel.org,
 krzysztof.kozlowski+dt@...aro.org, gregkh@...uxfoundation.org,
 Thinh.Nguyen@...opsys.com, broonie@...nel.org, bgoswami@...cinc.com,
 tiwai@...e.com, robh@...nel.org, konrad.dybcio@...aro.org
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
 linux-sound@...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 v20 22/41] ASoC: usb: Add PCM format check API for USB
 backend

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@...cinc.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?

> +{
> +	struct snd_usb_stream *as;
> +
> +	as = snd_usb_find_suppported_substream(card_idx, params, direction);
> +	if (!as)
> +		return -EOPNOTSUPP;
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL_GPL(snd_soc_usb_find_format);
> +
>   /**
>    * snd_soc_usb_allocate_port() - allocate a SOC USB device
>    * @component: USB DPCM backend DAI component
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ