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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e0167cad-6af7-fc2a-f783-609a114d94fd@quicinc.com>
Date:   Wed, 26 Jul 2023 16:06:41 -0700
From:   Wesley Cheng <quic_wcheng@...cinc.com>
To:     Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        <agross@...nel.org>, <andersson@...nel.org>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
        <catalin.marinas@....com>, <will@...nel.org>,
        <mathias.nyman@...el.com>, <gregkh@...uxfoundation.org>,
        <lgirdwood@...il.com>, <broonie@...nel.org>, <perex@...ex.cz>,
        <tiwai@...e.com>, <srinivas.kandagatla@...aro.org>,
        <bgoswami@...cinc.com>, <Thinh.Nguyen@...opsys.com>
CC:     <linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-usb@...r.kernel.org>, <alsa-devel@...a-project.org>,
        <quic_jackp@...cinc.com>, <oneukum@...e.com>,
        <albertccwang@...gle.com>, <o-takashi@...amocchi.jp>
Subject: Re: [PATCH v4 27/32] sound: soc: qdsp6: Add SND kcontrol to select
 offload device

Hi Pierre,

On 7/25/2023 2:16 AM, Pierre-Louis Bossart wrote:
> 
> 
> On 7/25/23 04:34, Wesley Cheng wrote:
>> Expose a kcontrol on the platform sound card, which will allow for
>> userspace to determine which USB card number and PCM device to offload.
>> This allows for userspace to potentially tag an alternate path for a
>> specific USB SND card and PCM device.  Previously, control was absent, and
>> the offload path would be enabled on the last USB SND device which was
>> connected.  This logic will continue to be applicable if no mixer input is
>> received for specific device selection.
>>
>> An example to configure the offload device using tinymix:
>> tinymix -D 0 set 'Q6USB offload SND device select' 1 0
>>
>> The above will set the Q6AFE device token to choose offload on card#1 and
>> pcm#0.  Device selection is made possible by setting the Q6AFE device
>> token.  The audio DSP utilizes this parameter, and will pass this field
>> back to the USB offload driver within the QMI stream requests.
> 
> I must be missing something... If you have a card 0 which exposes a
> control to change what the card1 does, then it means you have a card0
> with a PCM device what can potentially be used concurrently with the
> card1 exposing an offload device.
> 
> Is there any sort of mutual exclusion to make sure the same USB endpoint
> is not used twice?
> > One would hope that when a device is opened the matching non-offloaded
> one (or ones in the case of implicit feedback) is disabled or marked as
> used?
> 
> I would guess in your Android setup you have control on such behavior at
> the HAL level, but in the more generic Linux use I don't see what
> would orchestrate the use of two devices, and at the kernel level what
> would prevent it.
> 
Still going through the comments and trying to address the suggestions 
in the code, so will reply pack to those as I make the needed changes.

As for the above question, the following change was made with the 
intention to prevent the above scenario.

https://lore.kernel.org/linux-usb/20230725023416.11205-23-quic_wcheng@quicinc.com/

Thanks
Wesley Cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ