aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbmidi.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-02-22 23:49:13 +0100
committerTakashi Iwai <tiwai@suse.de>2010-02-23 08:51:56 +0100
commitde48c7bc6f93c6c8e0be8612c9d72a2dc92eaa01 (patch)
treef27b2849a4f78959f7c448eaaafd7bca8cb8f8ac /sound/usb/usbmidi.c
parent7b8a043f2686af9f41e313a78ed5e98233e5fded (diff)
downloadkernel_samsung_smdk4412-de48c7bc6f93c6c8e0be8612c9d72a2dc92eaa01.zip
kernel_samsung_smdk4412-de48c7bc6f93c6c8e0be8612c9d72a2dc92eaa01.tar.gz
kernel_samsung_smdk4412-de48c7bc6f93c6c8e0be8612c9d72a2dc92eaa01.tar.bz2
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 b2da478..2c59afd 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -46,6 +46,8 @@
#include <linux/timer.h>
#include <linux/usb.h>
#include <linux/wait.h>
+#include <linux/usb/audio.h>
+
#include <sound/core.h>
#include <sound/control.h>
#include <sound/rawmidi.h>
@@ -1540,7 +1542,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
if (hostif->extralen >= 7 &&
ms_header->bLength >= 7 &&
ms_header->bDescriptorType == USB_DT_CS_INTERFACE &&
- ms_header->bDescriptorSubtype == HEADER)
+ ms_header->bDescriptorSubtype == UAC_HEADER)
snd_printdd(KERN_INFO "MIDIStreaming version %02x.%02x\n",
ms_header->bcdMSC[1], ms_header->bcdMSC[0]);
else
@@ -1556,7 +1558,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
if (hostep->extralen < 4 ||
ms_ep->bLength < 4 ||
ms_ep->bDescriptorType != USB_DT_CS_ENDPOINT ||
- ms_ep->bDescriptorSubtype != MS_GENERAL)
+ ms_ep->bDescriptorSubtype != UAC_MS_GENERAL)
continue;
if (usb_endpoint_dir_out(ep)) {
if (endpoints[epidx].out_ep) {
@@ -1768,9 +1770,9 @@ static int snd_usbmidi_detect_yamaha(struct snd_usb_midi* umidi,
cs_desc < hostif->extra + hostif->extralen && cs_desc[0] >= 2;
cs_desc += cs_desc[0]) {
if (cs_desc[1] == USB_DT_CS_INTERFACE) {
- if (cs_desc[2] == MIDI_IN_JACK)
+ if (cs_desc[2] == UAC_MIDI_IN_JACK)
endpoint->in_cables = (endpoint->in_cables << 1) | 1;
- else if (cs_desc[2] == MIDI_OUT_JACK)
+ else if (cs_desc[2] == UAC_MIDI_OUT_JACK)
endpoint->out_cables = (endpoint->out_cables << 1) | 1;
}
}