Re: [PATCH v26 19/33] ASoC: qcom: qdsp6: Introduce USB AFE port to q6dsp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/30/2024 2:12 AM, Pierre-Louis Bossart wrote:
>
> On 8/29/24 21:40, Wesley Cheng wrote:
>> The QC ADSP is able to support USB playback endpoints, so that the main
>> application processor can be placed into lower CPU power modes.  This adds
>> the required AFE port configurations and port start command to start an
>> audio session.
>>
>> Specifically, the QC ADSP can support all potential endpoints that are
>> exposed by the audio data interface.  This includes, feedback endpoints
>> (both implicit and explicit) as well as the isochronous (data) endpoints.
> I think you meant
>
> "
> this includes isochronous data endpoints, in either synchronous mode or
> asynchronous mode. In the latter case both implicit or explicit feedback
> endpoints are supported.
> "
>
> And now I don't remember how *controls* are handled.
>
> Is this the case that all controls exposed by endpoint zero are visible
> in both the regular USB-audio card AND the offloaded card, with changes
> mirrored?
I think we had a discussion about this previously, but can't seem to find it.  The USB volume controls (ie controls still handled by the control EP) are going to still reside only within the USB SND card.  As of now, there aren't any kcontrols that are being added to the ASoC platform card for offload.
> It's important to explain so that the volumes are consistent no matter
> which path is used. This should be added to the documentation.
>
>
>> +static const struct snd_soc_dai_ops q6afe_usb_ops = {
>> +	.probe		= msm_dai_q6_dai_probe,
>> +	.prepare	= q6afe_dai_prepare,
>> +	.hw_params	= q6afe_usb_hw_params,
>> +	/*
>> +	 * Shutdown callback required to stop the USB AFE port, which is enabled
>> +	 * by the prepare() stage.  This stops the audio traffic on the USB AFE
>> +	 * port on the Q6DSP.
>> +	 */
>> +	.shutdown	= q6afe_dai_shutdown,
>> +	/*
>> +	 * Startup callback not needed, as AFE port start command passes the PCM
>> +	 * parameters within the AFE command, which is provided by the PCM core
>> +	 * during the prepare() stage.
>> +	 */
> Humm, now this is a bit confusing. Why would you need a shutdown, can't
> you use the hw_free() callback for symmetry with prepare()?

I thought that it was hw_params() -- hw_free() and prepare() -- shutdown()?

"DPCM runs the PCM trigger(stop), hw_free(), shutdown() operations on DAI0 for headset since the path is now disabled.

DPCM runs the PCM ops for startup(), hw_params(), prepare() and trigger(start) for DAI1 Speakers since the path is enabled."

https://www.kernel.org/doc/html/v6.10/sound/soc/dpcm.html

Thanks

Wesley Cheng

>



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux