File: mixer.patch

package info (click to toggle)
alsa-driver 1.0.23%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,448 kB
  • ctags: 77,491
  • sloc: ansic: 473,525; sh: 3,307; makefile: 2,661; python: 1,527; perl: 1,316; awk: 66
file content (47 lines) | stat: -rw-r--r-- 1,232 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- ../alsa-kernel/usb/mixer.c	2010-03-12 12:21:47.911524364 +0100
+++ mixer.c	2010-03-12 12:26:11.336022654 +0100
@@ -1,3 +1,5 @@
+#include "mixer.inc"
+
 /*
  *   (Tentative) USB Audio Driver for ALSA
  *
@@ -128,6 +130,14 @@
 	USB_XU_SOFT_LIMIT_SELECTOR = 0x03	/* soft limiter */
 };
 
+#ifndef USB_DT_CS_DEVICE
+#define USB_DT_CS_DEVICE		0x21
+#define USB_DT_CS_CONFIG		0x22
+#define USB_DT_CS_STRING		0x23
+#define USB_DT_CS_INTERFACE		0x24
+#define USB_DT_CS_ENDPOINT		0x25
+#endif
+
 /*
  * manual mapping of mixer names
  * if the mixer topology is too complicated and the parsed names are
@@ -1967,7 +1977,11 @@
 	}
 }
 
+#if !defined(OLD_USB) && !defined(CONFIG_SND_NEW_IRQ_HANDLER)
+static void snd_usb_mixer_status_complete(struct urb *urb, struct pt_regs *regs)
+#else
 static void snd_usb_mixer_status_complete(struct urb *urb)
+#endif
 {
 	struct usb_mixer_interface *mixer = urb->context;
 
@@ -2011,7 +2025,11 @@
 		return 0;
 
 	epnum = usb_endpoint_num(ep);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
 	buffer_length = le16_to_cpu(ep->wMaxPacketSize);
+#else
+	buffer_length = ep->wMaxPacketSize;
+#endif
 	transfer_buffer = kmalloc(buffer_length, GFP_KERNEL);
 	if (!transfer_buffer)
 		return -ENOMEM;