Re: [PATCH] usb: gadget: f_uac1: add set requests support

From: Jing Leng
Date: Wed Feb 16 2022 - 20:42:25 EST


Hi Greg KH,

> So is this a bug in the Host side to not do stuff like this? Why not
> fix it there instead?
>
> Where is the requirement that this command must be handled by the
> device?
>

First we need to clarify two issues.

1. Does the Ubuntu go beyond the UAC1 specification?
No.
On page 66 of the UAC1 specification (
https://www.usb.org/sites/default/files/audio10.pdf):
The bRequest can be SET_CUR, SET_MIN, SET_MAX, SET_RES or SET_MEM.
In most cases, only the CUR and MEM attribute will be supported for
the Set request. However, this specification does not prevent a
designer from making other attributes programmable.
Supplement: Windows 10 only sends SET_CUR request.

2. Does the old version kernel have the problem on the Ubuntu?
NO. (e.g. linux-5.10)
The problem is introduced by the following modification:
commit 0356e6283c7177391d144612f4b12986ed5c4f6e
Author: Ruslan Bilovol <ruslan.bilovol@xxxxxxxxx>
Date: Mon Jul 12 14:55:29 2021 +0200

usb: gadget: f_uac1: add volume and mute support

Since Ubuntu doesn't go beyond the UAC1 specification and the problem
is introduced by new version kernel, Why don't we perfect it on
kernel side?

Thanks
Jing Leng