Re: [PATCH v23 32/32] ASoC: doc: Add documentation for SOC USB

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

 



Hi Pierre/Amadeusz,

On 7/2/2024 1:30 AM, Pierre-Louis Bossart wrote:
>>> There are really multiple layers to deal with
>>>
>>> a) is the controller able to support the offload path? IIRC this is
>>> embedded in an obscure XHCI property, it would make sense to expose it
>>> as a control, or component string, of the USB card.
>> If a component string/tag is desired, I already have some way of doing that.  I can add it to the USB card.
>>
>>> b) is there a companion card capable of dealing with the offload path?
>>> Since the presence of this card may depend on driver probe, there should
>>> be a control on the USB card. userspace could detect changes to this
>>> control and detect if that path is or is no longer enabled.
>> So currently, the "USB Offload Playback Capable Card" kcontrol (on the USB card) will determine if there is an offload path.  However, this differs than what Amadeusz is suggesting, in that he wants a single kcontrol created for EACH USB card identified (per USB audio device), and a simple enable/disable control to determine if the offload path is enabled for that card/pcm stream.
>>
>> It would be a simpler approach for the userspace, and if the card that handles the offload card isn't present, then these enable/disable control will be set to "disabled," and even if users attempt to set the control, it won't go through.
> Not following. Are you suggesting userspace would modify the
> enable/disable status?

Yes, this is the suggestion.  One writeable kcontrol on the USB SND audio device that will control if that USB audio device is going to be offloaded.  If the kcontrol reads back "enabled" (or 1) then userspace knows that the offload path is active.  Else, if it reads "disabled" (or 0) after the attempt to set the kcontrol, then the offload path was unsuccessfully enabled, ie maybe due to no available offload streams.

> I would just have a read-only control that reports what the hardware can
> do and which other card can deal with offload. It's up to userspace to
> select the offloaded PCM device or not.
>
That is what I have implemented in the previous patch series.  One USB SND kcontrol within each USB audio device, which points to the ASoC platform card that supports offloading:

"USB Offload Playback Capable Card" --> returns the card index to the ASoC platform card


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux