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]
Date: Fri, 26 Apr 2024 14:55:09 -0700
From: Wesley Cheng <quic_wcheng@...cinc.com>
To: Amadeusz Sławiński
	<amadeuszx.slawinski@...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>,
        <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 09/41] ASoC: Add SOC USB APIs for adding an USB
 backend

Hi Amadeusz,

On 4/26/2024 6:25 AM, Amadeusz Sławiński wrote:
> On 4/25/2024 11:50 PM, 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>
>> ---
> 
> (...)
> 
>> +const char *snd_soc_usb_get_components_tag(bool playback)
>> +{
>> +    if (playback)
>> +        return "usbplybkoffld: 1";
>> +    else
>> +        return "usbcapoffld: 1";
>> +}
>> +EXPORT_SYMBOL_GPL(snd_soc_usb_get_components_tag);
> 
> Is this used to expose some information to userspace?
> Can those be some more readable strings if so, like:
> usbplaybackoffload, usbcaptureoffload
> 

Sure we can make it a bit more complete.  Was trying to keep it short, 
but if the intention isn't clear on the tag, then we can keep the full form.

> (...)
> 
>> +
>> +    node = snd_soc_find_phandle(usbdev);
>> +    if (IS_ERR(node))
>> +        return -ENODEV;
>> +
>> +    ctx = snd_soc_find_usb_ctx(node);
>> +    of_node_put(node);
>> +    if (!ctx)
>> +        return -ENODEV;
> 
> Perhaps introduce some helper function, you do this 
> snd_soc_find_phandle() followed by snd_soc_find_usb_ctx() in few places...
> 

Will do.  Will make a helper and replace instances with this.

Thanks
Wesley Cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ