usb: gadget: f_uac2: fix range size of sampling frequency control

Refer to the UAC 2.0 spec "Table 5-7: 4-byte Control RANGE
Parameter Block", the range size of sampling frequency control
is wNumSubRanges + n * (dMIN + dMAX + dRES), n is the total
of the sampling frequency.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iababf610914688f178621915e03bdabe58fe310b
This commit is contained in:
William Wu
2021-09-28 20:07:55 +08:00
parent 7dee443c55
commit 16dc44d17c

View File

@@ -590,7 +590,7 @@ struct cntrl_range_lay3 {
} __packed;
#define ranges_size(c) (sizeof(c.wNumSubRanges) + c.wNumSubRanges \
* sizeof(struct cntrl_ranges_lay3))
* sizeof(struct cntrl_range_lay3))
struct cntrl_ranges_lay3 {
__u16 wNumSubRanges;
struct cntrl_range_lay3 r[UAC_MAX_RATES];