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: <d0c1e6a8-3caa-3530-d49a-a8b820d19cf1@quicinc.com>
Date: Thu, 9 May 2024 14:34:01 -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 09/39] ASoC: qcom: qdsp6: Introduce USB AFE port to
 q6dsp

Hi Pierre,

On 5/9/2024 5:54 AM, Pierre-Louis Bossart wrote:
> 
> 
> 
>>> Wait, is this saying you will have exactly one PCM device/FE DAI
>>> connected to the USB BE DAI exposed in patch 11?
>>>
>>>> +    SND_SOC_DAPM_MIXER("USB Mixer", SND_SOC_NOPM, 0, 0,
>>>> +               usb_mixer_controls,
>>>> +               ARRAY_SIZE(usb_mixer_controls)),
>>>> +
>>>
>>> And then what is the role of the USB mixer if you only have one input?
>>>
>>> I must be missing something.
>>>
>>
>> Not sure if this is a QCOM specific implementation, but the way the DT
>> is defined for the USB offload path is as follows:
>>
>>      usb-dai-link {
>>          link-name = "USB Playback";
>>
>>          cpu {
>>              sound-dai = <&q6afedai USB_RX>;
>>          };
>>
>>          codec {
>>              sound-dai = <&usbdai USB_RX>;
>>          };
>>
>>          platform {
>>              sound-dai = <&q6routing>;
>>          };
>>      };
>>
>> Based on our DT parser helper API (qcom_snd_parse_of()) this isn't going
>> to create a PCM device.  The PCM devices are created for nodes that
>> don't have a codec and platform defined:
>>
>>      mm1-dai-link {
>>          link-name = "MultiMedia1";
>>          cpu {
>>              sound-dai = <&q6asmdai      MSM_FRONTEND_DAI_MULTIMEDIA1>;
>>          };
>>      };
>>
>> The ASM path is the entity that defines the number of PCM devices that
>> is created for the QC ASoC platform card, and is where the actual PCM
>> data is sent over to the DSP.  So there could be several PCM devices
>> that can use the USB BE DAI.
> 
> ok, but then how would this work with the ALSA controls reporting which
> PCM device can be used? I didn't see a mechanism allowing for more than
> one offloaded device, IIRC the control reported just ONE PCM device number.

With respects to the PCM devices exposed by the ASoC card, the USB Mixer 
controls which "Multimedia" (ASM) path can be routed to the USB BE DAI.

The kcontrols you are mentioning are controlling which USB card and USB 
PCM device to execute the offloading on.  As of now, at least for the 
QCOM implementation, we support only offloading on one path/USB 
interface.  I can't comment on how other offloading solutions look like, 
but we pass the USB PCM and card index as part of our AFE port open 
command (done from USB BE DAI).  This will result in a USB QMI message 
back (from ADSP) to our USB SND offload driver, which carries all the 
information about the selected card and PCM index to execute offloading on.

One thing I can do is to actually make the kcontrols for selecting the 
PCM and card devices to look at the num_supported_streams.  This would 
at least allow for vendors that have support for more potential 
offloading streams to select more than one.

Thanks
Wesley Cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ