aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbmidi.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-02-22 17:49:13 -0500
committerTakashi Iwai <tiwai@suse.de>2010-02-23 02:51:56 -0500
commitde48c7bc6f93c6c8e0be8612c9d72a2dc92eaa01 (patch)
treef27b2849a4f78959f7c448eaaafd7bca8cb8f8ac /sound/usb/usbmidi.c
parent7b8a043f2686af9f41e313a78ed5e98233e5fded (diff)
ALSA: usbaudio: consolidate header files
Use the definitions from linux/usb/audio.h all over the ALSA USB audio driver and add some missing definitions there as well. Use the endpoint attribute macros from linux/usb/ch9 and remove the own things from sound/usb/usbaudio.h. Now things are also nicely prefixed which makes understanding the code easier. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbmidi.c')
-rw-r--r--sound/usb/usbmidi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index b2da478a0fae..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>
@@ -1540,7 +1542,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
1540 if (hostif->extralen >= 7 && 1542 if (hostif->extralen >= 7 &&
1541 ms_header->bLength >= 7 && 1543 ms_header->bLength >= 7 &&
1542 ms_header->bDescriptorType == USB_DT_CS_INTERFACE && 1544 ms_header->bDescriptorType == USB_DT_CS_INTERFACE &&
1543 ms_header->bDescriptorSubtype == HEADER) 1545 ms_header->bDescriptorSubtype == UAC_HEADER)
1544 snd_printdd(KERN_INFO "MIDIStreaming version %02x.%02x\n", 1546 snd_printdd(KERN_INFO "MIDIStreaming version %02x.%02x\n",
1545 ms_header->bcdMSC[1], ms_header->bcdMSC[0]); 1547 ms_header->bcdMSC[1], ms_header->bcdMSC[0]);
1546 else 1548 else
@@ -1556,7 +1558,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
1556 if (hostep->extralen < 4 || 1558 if (hostep->extralen < 4 ||
1557 ms_ep->bLength < 4 || 1559 ms_ep->bLength < 4 ||
1558 ms_ep->bDescriptorType != USB_DT_CS_ENDPOINT || 1560 ms_ep->bDescriptorType != USB_DT_CS_ENDPOINT ||
1559 ms_ep->bDescriptorSubtype != MS_GENERAL) 1561 ms_ep->bDescriptorSubtype != UAC_MS_GENERAL)
1560 continue; 1562 continue;
1561 if (usb_endpoint_dir_out(ep)) { 1563 if (usb_endpoint_dir_out(ep)) {
1562 if (endpoints[epidx].out_ep) { 1564 if (endpoints[epidx].out_ep) {
@@ -1768,9 +1770,9 @@ static int snd_usbmidi_detect_yamaha(struct snd_usb_midi* umidi,
1768 cs_desc < hostif->extra + hostif->extralen && cs_desc[0] >= 2; 1770 cs_desc < hostif->extra + hostif->extralen && cs_desc[0] >= 2;
1769 cs_desc += cs_desc[0]) { 1771 cs_desc += cs_desc[0]) {
1770 if (cs_desc[1] == USB_DT_CS_INTERFACE) { 1772 if (cs_desc[1] == USB_DT_CS_INTERFACE) {
1771 if (cs_desc[2] == MIDI_IN_JACK) 1773 if (cs_desc[2] == UAC_MIDI_IN_JACK)
1772 endpoint->in_cables = (endpoint->in_cables << 1) | 1; 1774 endpoint->in_cables = (endpoint->in_cables << 1) | 1;
1773 else if (cs_desc[2] == MIDI_OUT_JACK) 1775 else if (cs_desc[2] == UAC_MIDI_OUT_JACK)
1774 endpoint->out_cables = (endpoint->out_cables << 1) | 1; 1776 endpoint->out_cables = (endpoint->out_cables << 1) | 1;
1775 } 1777 }
1776 } 1778 }