<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/gadget/function/f_uac2.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-02-16T11:58:44Z</updated>
<entry>
<title>usb: gadget: f_uac2: Define specific wTerminalType</title>
<updated>2022-02-16T11:58:44Z</updated>
<author>
<name>Pavel Hofman</name>
</author>
<published>2022-01-31T07:18:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44e1c58b031d2e28ee1d17570b28297e0b8101c3'/>
<id>urn:sha1:44e1c58b031d2e28ee1d17570b28297e0b8101c3</id>
<content type='text'>
commit 5432184107cd0013761bdfa6cb6079527ef87b95 upstream.

Several users have reported that their Win10 does not enumerate UAC2
gadget with the existing wTerminalType set to
UAC_INPUT_TERMINAL_UNDEFINED/UAC_INPUT_TERMINAL_UNDEFINED, e.g.
https://github.com/raspberrypi/linux/issues/4587#issuecomment-926567213.
While the constant is officially defined by the USB terminal types
document, e.g. XMOS firmware for UAC2 (commonly used for Win10) defines
no undefined output terminal type in its usbaudio20.h header.

Therefore wTerminalType of EP-IN is set to
UAC_INPUT_TERMINAL_MICROPHONE and wTerminalType of EP-OUT to
UAC_OUTPUT_TERMINAL_SPEAKER for the UAC2 gadget.

Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20220131071813.7433-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb:gadget: f_uac1: fixed sync playback</title>
<updated>2021-10-25T07:19:21Z</updated>
<author>
<name>Pavel Hofman</name>
</author>
<published>2021-10-22T14:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9f273484358285b448aff65bffeb361d0b1f917'/>
<id>urn:sha1:d9f273484358285b448aff65bffeb361d0b1f917</id>
<content type='text'>
The u_audio param fb_max was not set to its default value in f_uac1.c.
As a result the maximum value of Playback Pitch ctl was kept at 1000000,
not allowing to set faster playback pitch for UAC1.

The setting required moving the default constant UAC2_DEF_FB_MAX from
u_uac2.h to FBACK_FAST_MAX in u_audio.h as that header is common for
f_uac1.c and f_uac2.c.

Fixes: 6fec018a7e70 ("usb: gadget: u_audio.c: Adding Playback Pitch ctl for sync playback")
Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Link: https://lore.kernel.org/r/20211022140339.248669-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: u_audio.c: Adding Playback Pitch ctl for sync playback</title>
<updated>2021-10-13T11:59:43Z</updated>
<author>
<name>Pavel Hofman</name>
</author>
<published>2021-10-13T07:39:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6fec018a7e70d611412dd961e596b0415c6d365c'/>
<id>urn:sha1:6fec018a7e70d611412dd961e596b0415c6d365c</id>
<content type='text'>
EP IN is hard-coded as ASYNC both in f_uac1 and f_uac2 but u_audio sends
steady number of audio frames in each USB packet, without any control.

This patch adds 'Playback Pitch 1000000' ctl analogous to the existing
'Capture Pitch 1000000' ctl. The calculation of playback req-&gt;length in
u_audio_iso_complete respects the Playback Pitch ctl value to 1ppm now.

Max. value for Playback Pitch is configured by the existing parameter
uac2_opts-&gt;fb_max, used also for the Capture Pitch.

Since the EP IN packet size can be increased by uac2_opts-&gt;fb_max now,
maxPacketSize for the playback direction is calculated by the same
algorithm as for the async capture direction in
f_uac2.c:set_ep_max_packet_size.

Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Link: https://lore.kernel.org/r/20211013073934.36476-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.15-rc5 into usb-next</title>
<updated>2021-10-11T05:39:38Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2021-10-11T05:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=620b74d01b9d4393bef6742bf121908322c2fe0b'/>
<id>urn:sha1:620b74d01b9d4393bef6742bf121908322c2fe0b</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac2: fixed EP-IN wMaxPacketSize</title>
<updated>2021-10-05T11:50:09Z</updated>
<author>
<name>Pavel Hofman</name>
</author>
<published>2021-09-24T08:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0560c9c552c1815e7b480bc11fd785fefc82bb27'/>
<id>urn:sha1:0560c9c552c1815e7b480bc11fd785fefc82bb27</id>
<content type='text'>
Async feedback patches broke enumeration on Windows 10 previously fixed
by commit 789ea77310f0 ("usb: gadget: f_uac2: always increase endpoint
max_packet_size by one audio slot").

While the existing calculation for EP OUT capture for async mode yields
size+1 frame due to uac2_opts-&gt;fb_max &gt; 0, playback side lost the +1
feature.  Therefore the +1 frame addition must be re-introduced for
playback. Win10 enumerates the device only when both EP IN and EP OUT
max packet sizes are (at least) +1 frame.

Fixes: e89bb4288378 ("usb: gadget: u_audio: add real feedback implementation")
Cc: stable &lt;stable@vger.kernel.org&gt;
Tested-by: Henrik Enquist &lt;henrik.enquist@gmail.com&gt;
Tested-by: Jack Pham &lt;jackp@codeaurora.org&gt;
Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Link: https://lore.kernel.org/r/20210924080027.5362-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.15-rc3 into usb-next</title>
<updated>2021-09-27T14:34:40Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2021-09-27T14:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae9a6149884e04b3460bd9d7ffe29c5ec8d223d8'/>
<id>urn:sha1:ae9a6149884e04b3460bd9d7ffe29c5ec8d223d8</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval</title>
<updated>2021-09-14T08:42:44Z</updated>
<author>
<name>Jack Pham</name>
</author>
<published>2021-09-09T17:48:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0e8a206a2a53a919e1709c654cb65d519f7befb'/>
<id>urn:sha1:f0e8a206a2a53a919e1709c654cb65d519f7befb</id>
<content type='text'>
For Isochronous endpoints, the SS companion descriptor's
wBytesPerInterval field is required to reserve bus time in order
to transmit the required payload during the service interval.
If left at 0, the UAC2 function is unable to transact data on its
playback or capture endpoints in SuperSpeed mode.

Since f_uac2 currently does not support any bursting this value can
be exactly equal to the calculated wMaxPacketSize.

Tested with Windows 10 as a host.

Fixes: f8cb3d556be3 ("usb: f_uac2: adds support for SS and SSP")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Jack Pham &lt;jackp@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210909174811.12534-3-jackp@codeaurora.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac2: Add missing companion descriptor for feedback EP</title>
<updated>2021-09-14T08:42:40Z</updated>
<author>
<name>Jack Pham</name>
</author>
<published>2021-09-09T17:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=595091a1426a3b2625dad322f69fe569dc9d8943'/>
<id>urn:sha1:595091a1426a3b2625dad322f69fe569dc9d8943</id>
<content type='text'>
The f_uac2 function fails to enumerate when connected in SuperSpeed
due to the feedback endpoint missing the companion descriptor.
Add a new ss_epin_fback_desc_comp descriptor and append it behind the
ss_epin_fback_desc both in the static definition of the ss_audio_desc
structure as well as its dynamic construction in setup_headers().

Fixes: 24f779dac8f3 ("usb: gadget: f_uac2/u_audio: add feedback endpoint support")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Jack Pham &lt;jackp@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210909174811.12534-2-jackp@codeaurora.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac2: clean up some inconsistent indenting</title>
<updated>2021-09-14T08:22:18Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2021-09-02T22:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18d6b39ee8959c6e513750879b52fd215533cc87'/>
<id>urn:sha1:18d6b39ee8959c6e513750879b52fd215533cc87</id>
<content type='text'>
There are bunch of statements where the indentation is not correct,
clean these up.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Link: https://lore.kernel.org/r/20210902224758.57600-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac2: remove redundant assignments to pointer i_feature</title>
<updated>2021-08-05T10:31:41Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2021-08-04T12:59:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59e477af7b1a2a0d1d4c934f9cfda7b753341f12'/>
<id>urn:sha1:59e477af7b1a2a0d1d4c934f9cfda7b753341f12</id>
<content type='text'>
Pointer i_feature is being initialized with a value and then immediately
re-assigned a new value in the next statement. Fix this by replacing the
the redundant initialization with the following assigned value.

Acked-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Addresses-Coverity: ("Unused value")
Link: https://lore.kernel.org/r/20210804125907.111654-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
