<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/gadget/function/f_uac1.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-12-15T12:55:29Z</updated>
<entry>
<title>usb: gadget: f_uac1: Replace snprintf() with the safer scnprintf() variant</title>
<updated>2023-12-15T12:55:29Z</updated>
<author>
<name>Lee Jones</name>
<email>lee@kernel.org</email>
</author>
<published>2023-12-13T16:42:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c1a371866db9c44ab3004b5fc06df066a1b96262'/>
<id>urn:sha1:c1a371866db9c44ab3004b5fc06df066a1b96262</id>
<content type='text'>
There is a general misunderstanding amongst engineers that {v}snprintf()
returns the length of the data *actually* encoded into the destination
array.  However, as per the C99 standard {v}snprintf() really returns
the length of the data that *would have been* written if there were
enough space for it.  This misunderstanding has led to buffer-overruns
in the past.  It's generally considered safer to use the {v}scnprintf()
variants in their place (or even sprintf() in simple cases).  So let's
do that.

Link: https://lwn.net/Articles/69419/
Link: https://github.com/KSPP/linux/issues/105
Cc: Ruslan Bilovol &lt;ruslan.bilovol@gmail.com&gt;
Cc: Julian Scheel &lt;julian@jusst.de&gt;
Cc: Bryan Wu &lt;cooloney@kernel.org&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20231213164246.1021885-3-lee@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: f_uac1: adds support for SS and SSP</title>
<updated>2023-12-15T12:54:37Z</updated>
<author>
<name>Perr Zhang</name>
<email>perr@usb7.net</email>
</author>
<published>2023-12-13T11:21:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b8fb6db6cb04e3c35d661d0f6cf6f8dc7444ce0c'/>
<id>urn:sha1:b8fb6db6cb04e3c35d661d0f6cf6f8dc7444ce0c</id>
<content type='text'>
Patch adds support of SS and SSP speed.
Tested with rockchip rk3399 dwc3

Signed-off-by: Perr Zhang &lt;perr@usb7.net&gt;
Link: https://lore.kernel.org/r/20231213112106.605260-1-strongbox8@zoho.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac1: allow changing interface name via configfs</title>
<updated>2022-01-26T13:10:40Z</updated>
<author>
<name>Yunhao Tian</name>
<email>t123yh.xyz@gmail.com</email>
</author>
<published>2022-01-22T11:24:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dfb05b5dc3afd90e564b69b88ff6be6947a0f32f'/>
<id>urn:sha1:dfb05b5dc3afd90e564b69b88ff6be6947a0f32f</id>
<content type='text'>
This adds "function_name" configfs entry to change string value
of the iInterface field. This field will be shown in Windows' audio
settings panel, so being able to change it is useful. It will default
to "AC Interface" just as before if unchanged.

Signed-off-by: Yunhao Tian &lt;t123yh.xyz@gmail.com&gt;
Link: https://lore.kernel.org/r/20220122112446.1415547-1-t123yh.xyz@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac1: Add suspend callback</title>
<updated>2022-01-26T13:06:09Z</updated>
<author>
<name>Pavel Hofman</name>
<email>pavel.hofman@ivitera.com</email>
</author>
<published>2022-01-21T15:53:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d1d11dd1306908bc18b6592bbd21ba7d19a931e5'/>
<id>urn:sha1:d1d11dd1306908bc18b6592bbd21ba7d19a931e5</id>
<content type='text'>
Add suspend callback to f_uac1 function, calling corresponding method
of u_audio in order to stop the respective PCM streams and to notify
subscribed clients about the stop.

Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Link: https://lore.kernel.org/r/20220121155308.48794-11-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac1: Support multiple sampling rates</title>
<updated>2022-01-26T13:06:08Z</updated>
<author>
<name>Julian Scheel</name>
<email>julian@jusst.de</email>
</author>
<published>2022-01-21T15:53:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=695d39ffc2b59b8333ff85724619514f98613205'/>
<id>urn:sha1:695d39ffc2b59b8333ff85724619514f98613205</id>
<content type='text'>
A list of sampling rates can be specified via configfs. All enabled
sampling rates are sent to the USB host on request. When the host
selects a sampling rate the internal active rate is updated.

Config strings with single value stay compatible with the previous version.

Multiple samplerates passed as configuration arrays to g_audio module
when built for f_uac1.

Signed-off-by: Julian Scheel &lt;julian@jusst.de&gt;
Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Link: https://lore.kernel.org/r/20220121155308.48794-7-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: u_audio: Move dynamic srate from params to rtd</title>
<updated>2022-01-26T13:06:08Z</updated>
<author>
<name>Pavel Hofman</name>
<email>pavel.hofman@ivitera.com</email>
</author>
<published>2022-01-21T15:53:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8722a949e62ad77b3e4acc11fc44774ebbc32356'/>
<id>urn:sha1:8722a949e62ad77b3e4acc11fc44774ebbc32356</id>
<content type='text'>
Parameters uac_params.p_srate/c_srate are dynamic now and are not part
of parametric configuration anymore. Move them to the
runtime struct uac_rtd_params for each stream.

Suggested-by: John Keeping &lt;john@metanate.com&gt;
Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Link: https://lore.kernel.org/r/20220121155308.48794-4-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: u_audio: Support multiple sampling rates</title>
<updated>2022-01-26T13:06:08Z</updated>
<author>
<name>Julian Scheel</name>
<email>julian@jusst.de</email>
</author>
<published>2022-01-21T15:53:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c565ad07ef35f5c7461ba9fc08dbb3a61420b8d2'/>
<id>urn:sha1:c565ad07ef35f5c7461ba9fc08dbb3a61420b8d2</id>
<content type='text'>
Implement support for multiple sampling rates in u_audio part of the
audio gadget. The currently configured rates are exposed through
read-only amixer controls 'Capture Rate' and 'Playback Rate'.

Signed-off-by: Julian Scheel &lt;julian@jusst.de&gt;
Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Link: https://lore.kernel.org/r/20220121155308.48794-3-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>
<email>pavel.hofman@ivitera.com</email>
</author>
<published>2021-10-22T14:03:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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: f_uac1: fixing inconsistent indenting</title>
<updated>2021-08-18T13:33:02Z</updated>
<author>
<name>Pavel Hofman</name>
<email>pavel.hofman@ivitera.com</email>
</author>
<published>2021-08-17T10:05:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1bc220835526ae076eecfb7ed513f80f22cf840d'/>
<id>urn:sha1:1bc220835526ae076eecfb7ed513f80f22cf840d</id>
<content type='text'>
Fixing inconsistent indenting identified by kernel test
robot.

Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Acked-By: Felipe Balbi &lt;balbi@kernel.org&gt;
Link: https://lore.kernel.org/r/20210817100555.4437-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: f_uac1: add volume and mute support</title>
<updated>2021-07-21T08:10:11Z</updated>
<author>
<name>Ruslan Bilovol</name>
<email>ruslan.bilovol@gmail.com</email>
</author>
<published>2021-07-12T12:55:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0356e6283c7177391d144612f4b12986ed5c4f6e'/>
<id>urn:sha1:0356e6283c7177391d144612f4b12986ed5c4f6e</id>
<content type='text'>
This adds bi-directional (host-&gt;device, device-&gt;host)
volume/mute support to the f_uac1 driver by adding
Feature Units and interrupt endpoint.

Currently only master channel is supported.

Volume and mute are configurable through configfs,
by default volume has -100..0 dB range with 1 dB step.

Similar to existing flexible endpoints configuration,
Feature Unit won't be added to the topology if both
mute and volume are not enabled, also interrupt endpoint
isn't added to the device if no feature unit is present

Signed-off-by: Ruslan Bilovol &lt;ruslan.bilovol@gmail.com&gt;
Signed-off-by: Pavel Hofman &lt;pavel.hofman@ivitera.com&gt;
Link: https://lore.kernel.org/r/20210712125529.76070-5-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
