diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 11:58:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 11:58:44 -0500 |
commit | 524df55725217b13d5a232fb5badb5846418ea0e (patch) | |
tree | c041613577ac7e68737cfd8af16a37d1ed37e6af /sound/usb/usbmidi.c | |
parent | 0f4533979473a456a8adb3869365e12c7a99cf65 (diff) | |
parent | 6679ee1870f7ccdd48e2e5c57919240b8f19a6dc (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (252 commits)
ASoC: Check progress when reporting periods from i.MX FIQ handler
ASoC: Remove a unused variables from i.MX FIQ runtime data
ALSA: hda - Add/fix ALC269 FSC and Quanta models
ALSA: hda - Add ALC670 codec support
OMAP4: PMIC: Add support for twl6030 codec
ALSA: hda - remove unnecessary msleep on power state transitions
usb/gadget/{f_audio,gmidi}.c: follow recent changes in audio.h
ASoC: fsi: Modify over/under run error settlement
ASoC: OMAP4: Add McPDM platform driver
ASoC: OMAP4: Add support for McPDM
ASoC: OMAP: data_type and sync_mode configurable in audio dma
ALSA: hda - Add missing description in HD-Audio-Models.txt
ALSA: add support for Macbook Air 2,1 internal speaker
ALSA: usbaudio: consolidate header files
ALSA: usbmixer: bail out early when parsing audio class v2 descriptors
ALSA: usbaudio: implement basic set of class v2.0 parser
ALSA: usbaudio: introduce new types for audio class v2
ALSA: usbaudio: parse USB descriptors with structs
ALSA: hda - enable snoop for Intel Cougar Point
ALSA: hda - Remove identical definitions for macmini3 model
...
Diffstat (limited to 'sound/usb/usbmidi.c')
-rw-r--r-- | sound/usb/usbmidi.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 6e89b8368d9a..2c59afd99611 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #include <linux/timer.h> | 46 | #include <linux/timer.h> |
47 | #include <linux/usb.h> | 47 | #include <linux/usb.h> |
48 | #include <linux/wait.h> | 48 | #include <linux/wait.h> |
49 | #include <linux/usb/audio.h> | ||
50 | |||
49 | #include <sound/core.h> | 51 | #include <sound/core.h> |
50 | #include <sound/control.h> | 52 | #include <sound/control.h> |
51 | #include <sound/rawmidi.h> | 53 | #include <sound/rawmidi.h> |
@@ -1162,10 +1164,22 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi, | |||
1162 | pipe = usb_sndintpipe(umidi->dev, ep_info->out_ep); | 1164 | pipe = usb_sndintpipe(umidi->dev, ep_info->out_ep); |
1163 | else | 1165 | else |
1164 | pipe = usb_sndbulkpipe(umidi->dev, ep_info->out_ep); | 1166 | pipe = usb_sndbulkpipe(umidi->dev, ep_info->out_ep); |
1165 | if (umidi->usb_id == USB_ID(0x0a92, 0x1020)) /* ESI M4U */ | 1167 | switch (umidi->usb_id) { |
1166 | ep->max_transfer = 4; | 1168 | default: |
1167 | else | ||
1168 | ep->max_transfer = usb_maxpacket(umidi->dev, pipe, 1); | 1169 | ep->max_transfer = usb_maxpacket(umidi->dev, pipe, 1); |
1170 | break; | ||
1171 | /* | ||
1172 | * Various chips declare a packet size larger than 4 bytes, but | ||
1173 | * do not actually work with larger packets: | ||
1174 | */ | ||
1175 | case USB_ID(0x0a92, 0x1020): /* ESI M4U */ | ||
1176 | case USB_ID(0x1430, 0x474b): /* RedOctane GH MIDI INTERFACE */ | ||
1177 | case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */ | ||
1178 | case USB_ID(0x15ca, 0x1806): /* Textech USB Midi Cable */ | ||
1179 | case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */ | ||
1180 | ep->max_transfer = 4; | ||
1181 | break; | ||
1182 | } | ||
1169 | for (i = 0; i < OUTPUT_URBS; ++i) { | 1183 | for (i = 0; i < OUTPUT_URBS; ++i) { |
1170 | buffer = usb_buffer_alloc(umidi->dev, | 1184 | buffer = usb_buffer_alloc(umidi->dev, |
1171 | ep->max_transfer, GFP_KERNEL, | 1185 | ep->max_transfer, GFP_KERNEL, |
@@ -1407,6 +1421,12 @@ static struct port_info { | |||
1407 | EXTERNAL_PORT(0x086a, 0x0001, 8, "%s Broadcast"), | 1421 | EXTERNAL_PORT(0x086a, 0x0001, 8, "%s Broadcast"), |
1408 | EXTERNAL_PORT(0x086a, 0x0002, 8, "%s Broadcast"), | 1422 | EXTERNAL_PORT(0x086a, 0x0002, 8, "%s Broadcast"), |
1409 | EXTERNAL_PORT(0x086a, 0x0003, 4, "%s Broadcast"), | 1423 | EXTERNAL_PORT(0x086a, 0x0003, 4, "%s Broadcast"), |
1424 | /* Access Music Virus TI */ | ||
1425 | EXTERNAL_PORT(0x133e, 0x0815, 0, "%s MIDI"), | ||
1426 | PORT_INFO(0x133e, 0x0815, 1, "%s Synth", 0, | ||
1427 | SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | | ||
1428 | SNDRV_SEQ_PORT_TYPE_HARDWARE | | ||
1429 | SNDRV_SEQ_PORT_TYPE_SYNTHESIZER), | ||
1410 | }; | 1430 | }; |
1411 | 1431 | ||
1412 | static struct port_info *find_port_info(struct snd_usb_midi* umidi, int number) | 1432 | static struct port_info *find_port_info(struct snd_usb_midi* umidi, int number) |
@@ -1522,7 +1542,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi, | |||
1522 | if (hostif->extralen >= 7 && | 1542 | if (hostif->extralen >= 7 && |
1523 | ms_header->bLength >= 7 && | 1543 | ms_header->bLength >= 7 && |
1524 | ms_header->bDescriptorType == USB_DT_CS_INTERFACE && | 1544 | ms_header->bDescriptorType == USB_DT_CS_INTERFACE && |
1525 | ms_header->bDescriptorSubtype == HEADER) | 1545 | ms_header->bDescriptorSubtype == UAC_HEADER) |
1526 | snd_printdd(KERN_INFO "MIDIStreaming version %02x.%02x\n", | 1546 | snd_printdd(KERN_INFO "MIDIStreaming version %02x.%02x\n", |
1527 | ms_header->bcdMSC[1], ms_header->bcdMSC[0]); | 1547 | ms_header->bcdMSC[1], ms_header->bcdMSC[0]); |
1528 | else | 1548 | else |
@@ -1538,7 +1558,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi, | |||
1538 | if (hostep->extralen < 4 || | 1558 | if (hostep->extralen < 4 || |
1539 | ms_ep->bLength < 4 || | 1559 | ms_ep->bLength < 4 || |
1540 | ms_ep->bDescriptorType != USB_DT_CS_ENDPOINT || | 1560 | ms_ep->bDescriptorType != USB_DT_CS_ENDPOINT || |
1541 | ms_ep->bDescriptorSubtype != MS_GENERAL) | 1561 | ms_ep->bDescriptorSubtype != UAC_MS_GENERAL) |
1542 | continue; | 1562 | continue; |
1543 | if (usb_endpoint_dir_out(ep)) { | 1563 | if (usb_endpoint_dir_out(ep)) { |
1544 | if (endpoints[epidx].out_ep) { | 1564 | if (endpoints[epidx].out_ep) { |
@@ -1750,9 +1770,9 @@ static int snd_usbmidi_detect_yamaha(struct snd_usb_midi* umidi, | |||
1750 | cs_desc < hostif->extra + hostif->extralen && cs_desc[0] >= 2; | 1770 | cs_desc < hostif->extra + hostif->extralen && cs_desc[0] >= 2; |
1751 | cs_desc += cs_desc[0]) { | 1771 | cs_desc += cs_desc[0]) { |
1752 | if (cs_desc[1] == USB_DT_CS_INTERFACE) { | 1772 | if (cs_desc[1] == USB_DT_CS_INTERFACE) { |
1753 | if (cs_desc[2] == MIDI_IN_JACK) | 1773 | if (cs_desc[2] == UAC_MIDI_IN_JACK) |
1754 | endpoint->in_cables = (endpoint->in_cables << 1) | 1; | 1774 | endpoint->in_cables = (endpoint->in_cables << 1) | 1; |
1755 | else if (cs_desc[2] == MIDI_OUT_JACK) | 1775 | else if (cs_desc[2] == UAC_MIDI_OUT_JACK) |
1756 | endpoint->out_cables = (endpoint->out_cables << 1) | 1; | 1776 | endpoint->out_cables = (endpoint->out_cables << 1) | 1; |
1757 | } | 1777 | } |
1758 | } | 1778 | } |