<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/usb/caiaq/input.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-11-13T12:33:47Z</updated>
<entry>
<title>ALSA: caiaq: Use snd_card_free_when_closed() at disconnection</title>
<updated>2024-11-13T12:33:47Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2024-11-13T11:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b04dcbb7f7b1908806b7dc22671cdbe78ff2b82c'/>
<id>urn:sha1:b04dcbb7f7b1908806b7dc22671cdbe78ff2b82c</id>
<content type='text'>
The USB disconnect callback is supposed to be short and not too-long
waiting.  OTOH, the current code uses snd_card_free() at
disconnection, but this waits for the close of all used fds, hence it
can take long.  It eventually blocks the upper layer USB ioctls, which
may trigger a soft lockup.

An easy workaround is to replace snd_card_free() with
snd_card_free_when_closed().  This variant returns immediately while
the release of resources is done asynchronously by the card device
release at the last close.

This patch also splits the code to the disconnect and the free phases;
the former is called immediately at the USB disconnect callback while
the latter is called from the card destructor.

Fixes: 523f1dce3743 ("[ALSA] Add Native Instrument usb audio device support")
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Link: https://patch.msgid.link/20241113111042.15058-5-tiwai@suse.de
</content>
</entry>
<entry>
<title>ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`</title>
<updated>2023-05-04T07:50:11Z</updated>
<author>
<name>Ruliang Lin</name>
</author>
<published>2023-05-04T06:50:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d727e1856ef22dd9337199430258cb64cbbc658'/>
<id>urn:sha1:0d727e1856ef22dd9337199430258cb64cbbc658</id>
<content type='text'>
Smatch complains that:
snd_usb_caiaq_input_init() warn: missing error code 'ret'

This patch adds a new case to handle the situation where the
device does not support any input methods in the
`snd_usb_caiaq_input_init` function. It returns an `-EINVAL` error code
to indicate that no input methods are supported on the device.

Fixes: 523f1dce3743 ("[ALSA] Add Native Instrument usb audio device support")
Signed-off-by: Ruliang Lin &lt;u202112092@hust.edu.cn&gt;
Reviewed-by: Dongliang Mu &lt;dzm91@hust.edu.cn&gt;
Acked-by: Daniel Mack &lt;daniel@zonque.org&gt;
Link: https://lore.kernel.org/r/20230504065054.3309-1-u202112092@hust.edu.cn
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: caiaq: More constifications</title>
<updated>2020-01-05T15:14:37Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2020-01-05T14:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56d7058e124d5dfaf6579833a2e630ef90b149ca'/>
<id>urn:sha1:56d7058e124d5dfaf6579833a2e630ef90b149ca</id>
<content type='text'>
Apply const prefix to each possible place: the rate table, the
controller tables, and the key tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-13-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156</title>
<updated>2019-05-30T18:26:35Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-27T06:55:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a59d1b8e05ea6ab45f7e18897de1ef0e6bc3da6'/>
<id>urn:sha1:1a59d1b8e05ea6ab45f7e18897de1ef0e6bc3da6</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not write to the free software foundation inc
  59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ALSA: caiaq: Add yet more sanity checks for invalid EPs</title>
<updated>2017-10-11T14:59:28Z</updated>
<author>
<name>Takashi Iwai</name>
</author>
<published>2017-10-10T10:30:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96cd79626fc3fe5d77c243785368679e9b313642'/>
<id>urn:sha1:96cd79626fc3fe5d77c243785368679e9b313642</id>
<content type='text'>
A few other places in caiaq driver have the URB handling with the
fixed endpoints without checking the validity, too.  Add the sanity
check with the new helper function at each appropriate place for
avoiding the spurious kernel warnings due to invalid EPs.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatch</title>
<updated>2013-04-30T07:19:02Z</updated>
<author>
<name>Eldad Zack</name>
</author>
<published>2013-04-29T19:15:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ca231b2e6ed171107c5b21f9e92d1965fd6fd9e'/>
<id>urn:sha1:4ca231b2e6ed171107c5b21f9e92d1965fd6fd9e</id>
<content type='text'>
Current code does this:

  be16_to_cpu(buf[i * 2] &lt;&lt; 8 | buf[(i * 2) + 1])

Which is effectively (neglecting the index):

  be16_to_cpu(be16_to_cpu(*((u16 *) buf)))

This means the int16 in the buffer is not converted at all.

Daniel Mack confirmed that the driver works on little endian
CPUs, leading to the conclusion that the device-side structure
is actually little endian.
This changes the code to use le16_to_cpu().

Caught by sparse.

Acked-by: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: snd-usb-caiaq: fix smatch warnings</title>
<updated>2013-03-07T08:24:12Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2013-03-04T11:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2dad9402192250d4061332b6a9be71ebf8493c49'/>
<id>urn:sha1:2dad9402192250d4061332b6a9be71ebf8493c49</id>
<content type='text'>
Fix three smatch warnings recently introduced:

sound/usb/caiaq/device.c:166 usb_ep1_command_reply_dispatch() warn:
  variable dereferenced before check 'cdev' (see line 163)
sound/usb/caiaq/device.c:517 snd_disconnect() warn: variable
  dereferenced before check 'card' (see line 514)
sound/usb/caiaq/input.c:510 snd_usb_caiaq_ep4_reply_dispatch() warn:
  variable dereferenced before check 'cdev' (see line 506)

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: snd-usb-caiaq: switch to dev_*() logging</title>
<updated>2013-03-04T08:57:26Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2013-03-03T19:46:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1f6b8f65ff08afed4532b88de1a3bbea773787f'/>
<id>urn:sha1:f1f6b8f65ff08afed4532b88de1a3bbea773787f</id>
<content type='text'>
Get rid of the proprietary functions log() and debug() and use the
generic dev_*() approach. A macro is needed to cast a cdev to a struct
device *.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: snd-usb-caiaq: rename 'dev' to 'cdev'</title>
<updated>2013-03-04T08:57:17Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2013-03-03T19:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c8470ce311c6b2b49a71a02961c360d04ed28b2'/>
<id>urn:sha1:1c8470ce311c6b2b49a71a02961c360d04ed28b2</id>
<content type='text'>
This is needed in order to make the device namespace cleaner, and will
help when moving this driver over to dev_*() logging.

Signed-off-by: Daniel Mack &lt;zonque@gmail.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: snd-usb-caiaq: Add support for Maschine</title>
<updated>2011-10-13T06:16:46Z</updated>
<author>
<name>William Light</name>
</author>
<published>2011-10-10T15:54:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e653510a27e63b41a5bae3c46eb093375e17ca2d'/>
<id>urn:sha1:e653510a27e63b41a5bae3c46eb093375e17ca2d</id>
<content type='text'>
This adds partial support for the Maschine controller by Native Instruments.
Supported now are the 1x1 MIDI interface and the 41 buttons, 11 endless
rotary encoders, and 16 pressure-sensitive drum pads. Still to work on are the
dimmable LEDs and the two monochrome screens.

Signed-off-by: William Light &lt;wrl@illest.net&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
