<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/usb/stream.c, branch linux-5.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-01-07T10:10:17Z</updated>
<entry>
<title>ALSA: usb-audio: Always check descriptor sizes in parser code</title>
<updated>2019-01-07T10:10:17Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2019-01-02T16:12:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e96d7280f16e2f787307f695a31296b9e4a1cd7'/>
<id>urn:sha1:3e96d7280f16e2f787307f695a31296b9e4a1cd7</id>
<content type='text'>
There are a few places where we access the data without checking the
actual object size from the USB audio descriptor.  This may result in
OOB access, as recently reported.

This patch addresses these missing checks.  Most of added codes are
simple bLength checks in the caller side.  For the input and output
terminal parsers, we put the length check in the parser functions.
For the input terminal, a new argument is added to distinguish between
UAC1 and the rest, as they treat different objects.

Reported-by: Mathias Payer &lt;mathias.payer@nebelwelt.net&gt;
Reported-by: Hui Peng &lt;benquike@163.com&gt;
Tested-by: Hui Peng &lt;benquike@163.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Fix invalid use of sizeof in parse_uac_endpoint_attributes()</title>
<updated>2018-08-02T05:26:37Z</updated>
<author>
<name>Wei Yongjun</name>
</author>
<published>2018-08-02T04:31:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=11175556eec58b27a1398e80f8b1302314f2242c'/>
<id>urn:sha1:11175556eec58b27a1398e80f8b1302314f2242c</id>
<content type='text'>
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.

Fixes: 7edf3b5e6a45 ("ALSA: usb-audio: AudioStreaming Power Domain parsing")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks</title>
<updated>2018-07-31T13:01:45Z</updated>
<author>
<name>Jorge Sanjuan</name>
</author>
<published>2018-07-31T12:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0a4959eb4e94ce98ee5549dd7d1296d41162ca8'/>
<id>urn:sha1:a0a4959eb4e94ce98ee5549dd7d1296d41162ca8</id>
<content type='text'>
Make use of UAC3 Power Domains associated to an Audio Streaming
path within the PCM's logic. This means, when there is no audio
being transferred (pcm is closed), the host will set the Power Domain
associated to that substream to state D1. When audio is being transferred
(from hw_params onwards), the Power Domain will be set to D0 state.

This is the way the host lets the device know which Terminal
is going to be actively used and it is for the device to
manage its own internal resources on that UAC3 Power Domain.

Note the resume method now sets the Power Domain to D1 state as
resuming the device doesn't mean audio streaming will occur.

Signed-off-by: Jorge Sanjuan &lt;jorge.sanjuan@codethink.co.uk&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: AudioStreaming Power Domain parsing</title>
<updated>2018-07-31T13:01:30Z</updated>
<author>
<name>Jorge Sanjuan</name>
</author>
<published>2018-07-31T12:28:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7edf3b5e6a4544b42d3572a7058f8ffe96349ee8'/>
<id>urn:sha1:7edf3b5e6a4544b42d3572a7058f8ffe96349ee8</id>
<content type='text'>
Power Domains in the UAC3 spec are mainly intended to be
associated to an Input or Output Terminal so the host
changes the power state of the entire capture or playback
path within the topology.

This patch adds support for finding Power Domains associated
to an Audio Streaming Interface (bTerminalLink) and adds a
reference to them in the usb audio substreams (snd_usb_substream).

Signed-off-by: Jorge Sanjuan &lt;jorge.sanjuan@codethink.co.uk&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Allow non-vmalloc buffer for PCM buffers</title>
<updated>2018-05-29T08:01:54Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2018-05-27T11:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f274baa49be67dd8a9f318cd95da6ef9f565d06b'/>
<id>urn:sha1:f274baa49be67dd8a9f318cd95da6ef9f565d06b</id>
<content type='text'>
Currently, USB-audio driver allocates the PCM buffer via vmalloc(), as
this serves merely as an intermediate buffer that is copied to each
URB transfer buffer.  This works well in general on x86, but on some
archs this may result in cache coherency issues when mmap is used.
OTOH, it works also on such arch unless mmap is used.

This patch is a step for mitigating the inconvenience; a new module
option "use_vmalloc" is provided so that user can choose to allocate
the DMA coherent buffer instead of the existing vmalloc buffer.
The drawback is that it'd be the standard dma_alloc_coherent() calls
and the system would require contiguous pages on non-x86 archs.

Note that it's a global option and not dynamically switchable since
the buffer is pre-allocated at the probe time.  In theory, it's
possible to be switchable, but it'd be trickier and racier.

As default use_vmalloc option is set to true, so that the old behavior
is kept.  For allowing the coherent mmap on ARM or MIPS, pass
use_vmalloc=0 option explicitly.

Reported-and-tested-by: Daniel Danzberger &lt;daniel@dd-wrt.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb: stream: fix potential memory leak during uac3 interface parsing</title>
<updated>2018-05-18T06:40:40Z</updated>
<author>
<name>Ruslan Bilovol</name>
</author>
<published>2018-05-17T22:08:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6cd17ea70b26f66651c7afc123245e379dd14450'/>
<id>urn:sha1:6cd17ea70b26f66651c7afc123245e379dd14450</id>
<content type='text'>
UAC3 channel map is created during interface parsing,
and in some cases was not freed in failure paths.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Ruslan Bilovol &lt;ruslan.bilovol@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' into for-next</title>
<updated>2018-05-15T05:30:23Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2018-05-15T05:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8def12d9cd45b6abad87c5dc5a88a18c739762be'/>
<id>urn:sha1:8def12d9cd45b6abad87c5dc5a88a18c739762be</id>
<content type='text'>
Back-merge of UAC3 fixes for applying further enhancements.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: Use Class Specific EP for UAC3 devices.</title>
<updated>2018-05-15T05:29:10Z</updated>
<author>
<name>Jorge Sanjuan</name>
</author>
<published>2018-05-11T15:25:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c99f0802e42fcd38e84ee4d306691805ebed204f'/>
<id>urn:sha1:c99f0802e42fcd38e84ee4d306691805ebed204f</id>
<content type='text'>
bmAtributes offset doesn't exist in the UAC3 CS_EP descriptor.
Hence, checking for pitch control as if it was UAC2 doesn't make
any sense. Use the defined UAC3 offsets instead.

Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support")
Signed-off-by: Jorge Sanjuan &lt;jorge.sanjuan@codethink.co.uk&gt;
Reviewed-by: Ruslan Bilovol &lt;ruslan.bilovol@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb: add UAC3 BADD profiles support</title>
<updated>2018-05-13T06:54:35Z</updated>
<author>
<name>Ruslan Bilovol</name>
</author>
<published>2018-05-04T01:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17156f23e93c0f59e06dd2aaffd06221341caaee'/>
<id>urn:sha1:17156f23e93c0f59e06dd2aaffd06221341caaee</id>
<content type='text'>
Recently released USB Audio Class 3.0 specification
contains BADD (Basic Audio Device Definition) document
which describes pre-defined UAC3 configurations.

BADD support is mandatory for UAC3 devices, it should be
implemented as a separate USB device configuration.
As per BADD document, class-specific descriptors
shall not be included in the Device’s Configuration
descriptor ("inferred"), but host can guess them
from BADD profile number, number of endpoints and
their max packed sizes.

This patch adds support of all BADD profiles from the spec

Signed-off-by: Ruslan Bilovol &lt;ruslan.bilovol@gmail.com&gt;
Tested-by: Jorge Sanjuan &lt;jorge.sanjuan@codethink.co.uk&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb: stream: refactor uac3 audio interface parsing</title>
<updated>2018-05-04T07:39:12Z</updated>
<author>
<name>Ruslan Bilovol</name>
</author>
<published>2018-05-04T01:24:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eda553f43217ac873a771fd2bd538dfe5faae5e6'/>
<id>urn:sha1:eda553f43217ac873a771fd2bd538dfe5faae5e6</id>
<content type='text'>
Offload snd_usb_parse_audio_interface() function
which became quite long after adding UAC3 spec support.

Move class-specific parts of uac3 parsing to separate
function which now produce audioformat structure that
is ready to be fed to snd_usb_add_audio_stream().

Signed-off-by: Ruslan Bilovol &lt;ruslan.bilovol@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
