aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/caiaq/input.c2
-rw-r--r--sound/usb/endpoint.c2
-rw-r--r--sound/usb/mixer.c25
-rw-r--r--sound/usb/mixer.h1
-rw-r--r--sound/usb/quirks-table.h6
-rw-r--r--sound/usb/quirks.c2
6 files changed, 23 insertions, 15 deletions
diff --git a/sound/usb/caiaq/input.c b/sound/usb/caiaq/input.c
index 4432ef7a70a9..a213813487bd 100644
--- a/sound/usb/caiaq/input.c
+++ b/sound/usb/caiaq/input.c
@@ -30,7 +30,7 @@ static unsigned short keycode_ak1[] = { KEY_C, KEY_B, KEY_A };
30static unsigned short keycode_rk2[] = { KEY_1, KEY_2, KEY_3, KEY_4, 30static unsigned short keycode_rk2[] = { KEY_1, KEY_2, KEY_3, KEY_4,
31 KEY_5, KEY_6, KEY_7 }; 31 KEY_5, KEY_6, KEY_7 };
32static unsigned short keycode_rk3[] = { KEY_1, KEY_2, KEY_3, KEY_4, 32static unsigned short keycode_rk3[] = { KEY_1, KEY_2, KEY_3, KEY_4,
33 KEY_5, KEY_6, KEY_7, KEY_5, KEY_6 }; 33 KEY_5, KEY_6, KEY_7, KEY_8, KEY_9 };
34 34
35static unsigned short keycode_kore[] = { 35static unsigned short keycode_kore[] = {
36 KEY_FN_F1, /* "menu" */ 36 KEY_FN_F1, /* "menu" */
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 7c0d21ecd821..7d46e482375d 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -352,7 +352,7 @@ int snd_usb_parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
352 continue; 352 continue;
353 } 353 }
354 if (((protocol == UAC_VERSION_1) && (fmt->bLength < 8)) || 354 if (((protocol == UAC_VERSION_1) && (fmt->bLength < 8)) ||
355 ((protocol == UAC_VERSION_2) && (fmt->bLength != 6))) { 355 ((protocol == UAC_VERSION_2) && (fmt->bLength < 6))) {
356 snd_printk(KERN_ERR "%d:%u:%d : invalid UAC_FORMAT_TYPE desc\n", 356 snd_printk(KERN_ERR "%d:%u:%d : invalid UAC_FORMAT_TYPE desc\n",
357 dev->devnum, iface_no, altno); 357 dev->devnum, iface_no, altno);
358 continue; 358 continue;
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index c22fa76e363a..c04d7c71ac88 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1191,6 +1191,11 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void
1191 1191
1192 if (state->mixer->protocol == UAC_VERSION_1) { 1192 if (state->mixer->protocol == UAC_VERSION_1) {
1193 csize = hdr->bControlSize; 1193 csize = hdr->bControlSize;
1194 if (!csize) {
1195 snd_printdd(KERN_ERR "usbaudio: unit %u: "
1196 "invalid bControlSize == 0\n", unitid);
1197 return -EINVAL;
1198 }
1194 channels = (hdr->bLength - 7) / csize - 1; 1199 channels = (hdr->bLength - 7) / csize - 1;
1195 bmaControls = hdr->bmaControls; 1200 bmaControls = hdr->bmaControls;
1196 } else { 1201 } else {
@@ -1934,15 +1939,13 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
1934 struct mixer_build state; 1939 struct mixer_build state;
1935 int err; 1940 int err;
1936 const struct usbmix_ctl_map *map; 1941 const struct usbmix_ctl_map *map;
1937 struct usb_host_interface *hostif;
1938 void *p; 1942 void *p;
1939 1943
1940 hostif = mixer->chip->ctrl_intf;
1941 memset(&state, 0, sizeof(state)); 1944 memset(&state, 0, sizeof(state));
1942 state.chip = mixer->chip; 1945 state.chip = mixer->chip;
1943 state.mixer = mixer; 1946 state.mixer = mixer;
1944 state.buffer = hostif->extra; 1947 state.buffer = mixer->hostif->extra;
1945 state.buflen = hostif->extralen; 1948 state.buflen = mixer->hostif->extralen;
1946 1949
1947 /* check the mapping table */ 1950 /* check the mapping table */
1948 for (map = usbmix_ctl_maps; map->id; map++) { 1951 for (map = usbmix_ctl_maps; map->id; map++) {
@@ -1955,7 +1958,8 @@ static int snd_usb_mixer_controls(struct usb_mixer_interface *mixer)
1955 } 1958 }
1956 1959
1957 p = NULL; 1960 p = NULL;
1958 while ((p = snd_usb_find_csint_desc(hostif->extra, hostif->extralen, p, UAC_OUTPUT_TERMINAL)) != NULL) { 1961 while ((p = snd_usb_find_csint_desc(mixer->hostif->extra, mixer->hostif->extralen,
1962 p, UAC_OUTPUT_TERMINAL)) != NULL) {
1959 if (mixer->protocol == UAC_VERSION_1) { 1963 if (mixer->protocol == UAC_VERSION_1) {
1960 struct uac1_output_terminal_descriptor *desc = p; 1964 struct uac1_output_terminal_descriptor *desc = p;
1961 1965
@@ -2162,17 +2166,15 @@ int snd_usb_mixer_activate(struct usb_mixer_interface *mixer)
2162/* create the handler for the optional status interrupt endpoint */ 2166/* create the handler for the optional status interrupt endpoint */
2163static int snd_usb_mixer_status_create(struct usb_mixer_interface *mixer) 2167static int snd_usb_mixer_status_create(struct usb_mixer_interface *mixer)
2164{ 2168{
2165 struct usb_host_interface *hostif;
2166 struct usb_endpoint_descriptor *ep; 2169 struct usb_endpoint_descriptor *ep;
2167 void *transfer_buffer; 2170 void *transfer_buffer;
2168 int buffer_length; 2171 int buffer_length;
2169 unsigned int epnum; 2172 unsigned int epnum;
2170 2173
2171 hostif = mixer->chip->ctrl_intf;
2172 /* we need one interrupt input endpoint */ 2174 /* we need one interrupt input endpoint */
2173 if (get_iface_desc(hostif)->bNumEndpoints < 1) 2175 if (get_iface_desc(mixer->hostif)->bNumEndpoints < 1)
2174 return 0; 2176 return 0;
2175 ep = get_endpoint(hostif, 0); 2177 ep = get_endpoint(mixer->hostif, 0);
2176 if (!usb_endpoint_dir_in(ep) || !usb_endpoint_xfer_int(ep)) 2178 if (!usb_endpoint_dir_in(ep) || !usb_endpoint_xfer_int(ep))
2177 return 0; 2179 return 0;
2178 2180
@@ -2202,7 +2204,6 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
2202 }; 2204 };
2203 struct usb_mixer_interface *mixer; 2205 struct usb_mixer_interface *mixer;
2204 struct snd_info_entry *entry; 2206 struct snd_info_entry *entry;
2205 struct usb_host_interface *host_iface;
2206 int err; 2207 int err;
2207 2208
2208 strcpy(chip->card->mixername, "USB Mixer"); 2209 strcpy(chip->card->mixername, "USB Mixer");
@@ -2219,8 +2220,8 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
2219 return -ENOMEM; 2220 return -ENOMEM;
2220 } 2221 }
2221 2222
2222 host_iface = &usb_ifnum_to_if(chip->dev, ctrlif)->altsetting[0]; 2223 mixer->hostif = &usb_ifnum_to_if(chip->dev, ctrlif)->altsetting[0];
2223 switch (get_iface_desc(host_iface)->bInterfaceProtocol) { 2224 switch (get_iface_desc(mixer->hostif)->bInterfaceProtocol) {
2224 case UAC_VERSION_1: 2225 case UAC_VERSION_1:
2225 default: 2226 default:
2226 mixer->protocol = UAC_VERSION_1; 2227 mixer->protocol = UAC_VERSION_1;
diff --git a/sound/usb/mixer.h b/sound/usb/mixer.h
index ae1a14dcfe82..81b2d8a32fb0 100644
--- a/sound/usb/mixer.h
+++ b/sound/usb/mixer.h
@@ -3,6 +3,7 @@
3 3
4struct usb_mixer_interface { 4struct usb_mixer_interface {
5 struct snd_usb_audio *chip; 5 struct snd_usb_audio *chip;
6 struct usb_host_interface *hostif;
6 struct list_head list; 7 struct list_head list;
7 unsigned int ignore_ctl_error; 8 unsigned int ignore_ctl_error;
8 struct urb *urb; 9 struct urb *urb;
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index dba0b7f11c54..4d4f86552a23 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -2417,6 +2417,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2417 .idProduct = 0x1020, 2417 .idProduct = 0x1020,
2418}, 2418},
2419 2419
2420/* KeithMcMillen Stringport */
2421{
2422 USB_DEVICE(0x1f38, 0x0001),
2423 .bInterfaceClass = USB_CLASS_AUDIO,
2424},
2425
2420/* Miditech devices */ 2426/* Miditech devices */
2421{ 2427{
2422 USB_DEVICE(0x4752, 0x0011), 2428 USB_DEVICE(0x4752, 0x0011),
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 77762c99afbe..81e07d842581 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -426,7 +426,7 @@ static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
426 */ 426 */
427static int snd_usb_cm6206_boot_quirk(struct usb_device *dev) 427static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
428{ 428{
429 int err, reg; 429 int err = 0, reg;
430 int val[] = {0x2004, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000}; 430 int val[] = {0x2004, 0x3000, 0xf800, 0x143f, 0x0000, 0x3000};
431 431
432 for (reg = 0; reg < ARRAY_SIZE(val); reg++) { 432 for (reg = 0; reg < ARRAY_SIZE(val); reg++) {