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: <9d0ba8c8-9c8f-a45a-cf14-5d1829273cfa@quicinc.com>
Date: Wed, 8 May 2024 17:13:37 -0700
From: Wesley Cheng <quic_wcheng@...cinc.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        <srinivas.kandagatla@...aro.org>, <mathias.nyman@...el.com>,
        <perex@...ex.cz>, <conor+dt@...nel.org>, <corbet@....net>,
        <lgirdwood@...il.com>, <andersson@...nel.org>, <krzk+dt@...nel.org>,
        <gregkh@...uxfoundation.org>, <Thinh.Nguyen@...opsys.com>,
        <broonie@...nel.org>, <bgoswami@...cinc.com>, <tiwai@...e.com>,
        <bagasdotme@...il.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 v21 33/39] ASoC: usb: Fetch ASoC sound card information

Hi Pierre,

On 5/7/2024 2:33 PM, Pierre-Louis Bossart wrote:
> 
>> +/**
>> + * snd_soc_usb_device_offload_available() - Fetch BE DAI link sound card
>> + * @dev: the device to find in SOC USB
>> + *
>> + * Finds the component linked to a specific SOC USB instance, and returns
>> + * the sound card number for the platform card supporting offloading.
>> + *
>> + */
>> +int snd_soc_usb_device_offload_available(struct device *dev)
>> +{
>> +	struct snd_soc_usb *ctx;
>> +
>> +	ctx = snd_soc_find_usb_ctx(dev);
>> +	if (!ctx)
>> +		return -ENODEV;
>> +
>> +	return ctx->component->card->snd_card->number;
>> +}
> 
> Presumably there's a notification to help applications discard this
> information on removal?

If the platform/ASoC sound card is removed then the USB BE DAI is going 
to be unregistered from SOC USB.  This would lead to the 
snd_soc_find_usb_ctx() to return with -ENODEV to the USB SND offload 
kcontrol call.

Thanks
Wesley Cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ