summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-11-20 08:53:16 +0100
committerTakashi Iwai <tiwai@suse.de>2009-11-20 08:53:16 +0100
commitb6405d4c18b463031f218603b94797a00bab82f3 (patch)
tree0ba725ceb91f5b843b9afbee30c948015f07e89b /sound
parent8fd17e6a727505e33d48584b29e97ce7e1ae9a32 (diff)
parentfbc543915ffb8ec5c35403f294ab799f1936f42a (diff)
Merge branch 'topic/misc' into for-next
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/usbmidi.c13
-rw-r--r--sound/usb/usbquirks.h23
2 files changed, 25 insertions, 11 deletions
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 47d68a3b1fa3..80b2845bc486 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -1115,15 +1115,6 @@ static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi* umidi,
return 0;
}
-static unsigned int snd_usbmidi_count_bits(unsigned int x)
-{
- unsigned int bits;
-
- for (bits = 0; x; ++bits)
- x &= x - 1;
- return bits;
-}
-
/*
* Frees an output endpoint.
* May be called when ep hasn't been initialized completely.
@@ -2019,8 +2010,8 @@ int snd_usb_create_midi_interface(struct snd_usb_audio* chip,
out_ports = 0;
in_ports = 0;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
- out_ports += snd_usbmidi_count_bits(endpoints[i].out_cables);
- in_ports += snd_usbmidi_count_bits(endpoints[i].in_cables);
+ out_ports += hweight16(endpoints[i].out_cables);
+ in_ports += hweight16(endpoints[i].in_cables);
}
err = snd_usbmidi_create_rawmidi(umidi, out_ports, in_ports);
if (err < 0) {
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h
index f6f201eb24ce..a892bda03df9 100644
--- a/sound/usb/usbquirks.h
+++ b/sound/usb/usbquirks.h
@@ -1563,6 +1563,29 @@ YAMAHA_DEVICE(0x7010, "UB99"),
}
}
},
+{
+ /* has ID 0x00ea when not in Advanced Driver mode */
+ USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e9),
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+ /* .vendor_name = "Roland", */
+ /* .product_name = "UA-1G", */
+ .ifnum = QUIRK_ANY_INTERFACE,
+ .type = QUIRK_COMPOSITE,
+ .data = (const struct snd_usb_audio_quirk[]) {
+ {
+ .ifnum = 0,
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
+ },
+ {
+ .ifnum = 1,
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
+ },
+ {
+ .ifnum = -1
+ }
+ }
+ }
+},
/* Guillemot devices */
{