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: <ee95520b-cdcc-4e10-a70e-683993cafe36@quicinc.com>
Date: Tue, 25 Mar 2025 18:42:11 -0700
From: Wesley Cheng <quic_wcheng@...cinc.com>
To: Stephan Gerhold <stephan.gerhold@...aro.org>
CC: <srinivas.kandagatla@...aro.org>, <mathias.nyman@...el.com>,
        <perex@...ex.cz>, <conor+dt@...nel.org>, <dmitry.torokhov@...il.com>,
        <corbet@....net>, <broonie@...nel.org>, <lgirdwood@...il.com>,
        <krzk+dt@...nel.org>, <pierre-louis.bossart@...ux.intel.com>,
        <Thinh.Nguyen@...opsys.com>, <tiwai@...e.com>, <robh@...nel.org>,
        <gregkh@...uxfoundation.org>, <linux-kernel@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-sound@...r.kernel.org>,
        <linux-input@...r.kernel.org>, <linux-usb@...r.kernel.org>,
        <linux-arm-msm@...r.kernel.org>, <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v36 30/31] ALSA: usb-audio: qcom: Add USB offload route
 kcontrol

Hi Stephan,

On 3/25/2025 4:35 AM, Stephan Gerhold wrote:
> On Tue, Mar 18, 2025 at 05:51:40PM -0700, Wesley Cheng wrote:
>> In order to allow userspace/applications know about USB offloading status,
>> expose a sound kcontrol that fetches information about which sound card
>> and PCM index the USB device is mapped to for supporting offloading.  In
>> the USB audio offloading framework, the ASoC BE DAI link is the entity
>> responsible for registering to the SOC USB layer.
>>
>> It is expected for the USB SND offloading driver to add the kcontrol to the
>> sound card associated with the USB audio device.  An example output would
>> look like:
>>
>> tinymix -D 1 get 'USB Offload Playback Route PCM#0'
>> -1, -1 (range -1->255)
>>
>> This example signifies that there is no mapped ASoC path available for the
>> USB SND device.
>>
>> tinymix -D 1 get 'USB Offload Playback Route PCM#0'
>> 0, 0 (range -1->255)
>>
>> This example signifies that the offload path is available over ASoC sound
>> card index#0 and PCM device#0.
>>
>> The USB offload kcontrol will be added in addition to the existing
>> kcontrols identified by the USB SND mixer.  The kcontrols used to modify
>> the USB audio device specific parameters are still valid and expected to be
>> used.  These parameters are not mirrored to the ASoC subsystem.
>>
>> Signed-off-by: Wesley Cheng <quic_wcheng@...cinc.com>
>> ---
>>  sound/usb/Kconfig                  |  10 ++
>>  sound/usb/qcom/Makefile            |   4 +
>>  sound/usb/qcom/mixer_usb_offload.c | 158 +++++++++++++++++++++++++++++
>>  sound/usb/qcom/mixer_usb_offload.h |  17 ++++
>>  sound/usb/qcom/qc_audio_offload.c  |   2 +
>>  5 files changed, 191 insertions(+)
>>  create mode 100644 sound/usb/qcom/mixer_usb_offload.c
>>  create mode 100644 sound/usb/qcom/mixer_usb_offload.h
>>
>> diff --git a/sound/usb/Kconfig b/sound/usb/Kconfig
>> index 6daa551738da..7d8833945711 100644
>> --- a/sound/usb/Kconfig
>> +++ b/sound/usb/Kconfig
>> @@ -176,9 +176,19 @@ config SND_BCD2000
>>  	  To compile this driver as a module, choose M here: the module
>>  	  will be called snd-bcd2000.
>>  
>> +config SND_USB_QC_OFFLOAD_MIXER
>> +	tristate "Qualcomm USB Audio Offload mixer control"
> 
> This looks like a "bool" and not a "tristate", since the ifneq in the
> Makefile below ignores whether this is a "y" or "m".
> 

Yeah, let me fix this.

>> +	help
>> +	 Say Y to enable the Qualcomm USB audio offloading mixer controls.
>> +	 This exposes an USB offload capable kcontrol to signal to
>> +	 applications about which platform sound card can support USB
>> +	 audio offload.  The returning values specify the mapped ASoC card
>> +	 and PCM device the USB audio device is associated to.
>> +
>>  config SND_USB_AUDIO_QMI
>>  	tristate "Qualcomm Audio Offload driver"
>>  	depends on QCOM_QMI_HELPERS && SND_USB_AUDIO && USB_XHCI_SIDEBAND && SND_SOC_USB
>> +	select SND_USB_OFFLOAD_MIXER
> 
> And I think "SND_USB_OFFLOAD_MIXER" (without _QC suffix) doesn't exist
> anymore after v30? I see there was some discussion around that there.
> Is this supposed to be "select SND_USB_QC_OFFLOAD_MIXER"?
> 
> If yes, isn't this option always selected if SND_USB_AUDIO_QMI is
> enabled? In that case you could just drop the config option...
> 

Will address this as well.

Thanks
Wesley Cheng


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ