Re: Re: [PATCH] usb: gadget: f_uac2: EP OUT adaptive instead of async

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

 



Dne 11. 02. 20 v 17:16 Ruslan Bilovol napsal(a):
> On Fri, Feb 7, 2020 at 6:55 PM Pavel Hofman <pavel.hofman@xxxxxxxxxxx> wrote:
>>
>> The existing UAC2 implementation presents its EP OUT as
>> USB_ENDPOINT_SYNC_ASYNC.
>>
>> However:
>> 1) f_uac2 does not define any feedback endpoint
>>
>> 2) IMO in reality it is adaptive - the USB host is the one which sets
>> the pace of data.
>>
>> Changing USB_ENDPOINT_SYNC_ASYNC to USB_ENDPOINT_SYNC_ADAPTIVE for the FS
>> and HS output endpoints corrects the config to reflect real functionality.
> 
> That's a good idea but ADAPTIVE endpoint still requires feedback endpoint for
> source (USB IN) case so the host can synchronize with such endpoint
> (see 3.16.2.2 of
> UAC2 spec "For adaptive audio source endpoints and asynchronous audio sink
> endpoints, an explicit synchronization mechanism is needed to maintain
> synchronization
> during transfers").

I apologize for missing this message. Please can we resume the discussion?

The tested combination is (not-changed) async IN and (changed) adaptive
OUT, which is what most USB-adaptive soundcards use. Such combination
does not require any feedback endpoint.

> 
>>
>> Also, the change makes the UAC2 gadget recognized and working
>> in MS Windows.
> 
> Does it recognizes well with both IN and OUT (e.g. capture+playback enabled)
> adaptive endpoints?

Only OUT is adaptive, IN stays async.

Thanks a lot,

Pavel.


> 
> Thanks,
> Ruslan
> 
>>
>> Signed-off-by: Pavel Hofman <pavel.hofman@xxxxxxxxxxx>
>> ---
>>  drivers/usb/gadget/function/f_uac2.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/gadget/function/f_uac2.c
>> b/drivers/usb/gadget/function/f_uac2.c
>> index db2d498..e8c9dd1 100644
>> --- a/drivers/usb/gadget/function/f_uac2.c
>> +++ b/drivers/usb/gadget/function/f_uac2.c
>> @@ -273,7 +273,7 @@ enum {
>>         .bDescriptorType = USB_DT_ENDPOINT,
>>
>>         .bEndpointAddress = USB_DIR_OUT,
>> -       .bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
>> +       .bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ADAPTIVE,
>>         .wMaxPacketSize = cpu_to_le16(1023),
>>         .bInterval = 1,
>>  };
>> @@ -282,7 +282,7 @@ enum {
>>         .bLength = USB_DT_ENDPOINT_SIZE,
>>         .bDescriptorType = USB_DT_ENDPOINT,
>>
>> -       .bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
>> +       .bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ADAPTIVE,
>>         .wMaxPacketSize = cpu_to_le16(1024),
>>         .bInterval = 4,
>>  };
>> --
>> 1.9.1
> 



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux