aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/6fire/firmware.c2
-rw-r--r--sound/usb/card.h1
-rw-r--r--sound/usb/mixer_maps.c8
-rw-r--r--sound/usb/pcm.c21
-rw-r--r--sound/usb/quirks-table.h30
-rw-r--r--sound/usb/stream.c7
6 files changed, 56 insertions, 13 deletions
diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c
index 6f9715ab32fe..56ad923bf6b5 100644
--- a/sound/usb/6fire/firmware.c
+++ b/sound/usb/6fire/firmware.c
@@ -209,7 +209,7 @@ static int usb6fire_fw_ezusb_upload(
209 int ret; 209 int ret;
210 u8 data; 210 u8 data;
211 struct usb_device *device = interface_to_usbdev(intf); 211 struct usb_device *device = interface_to_usbdev(intf);
212 const struct firmware *fw = 0; 212 const struct firmware *fw = NULL;
213 struct ihex_record *rec = kmalloc(sizeof(struct ihex_record), 213 struct ihex_record *rec = kmalloc(sizeof(struct ihex_record),
214 GFP_KERNEL); 214 GFP_KERNEL);
215 215
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 0d37238b8457..2b9fffff23b6 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -119,6 +119,7 @@ struct snd_usb_substream {
119 unsigned long unlink_mask; /* bitmask of unlinked urbs */ 119 unsigned long unlink_mask; /* bitmask of unlinked urbs */
120 120
121 /* data and sync endpoints for this stream */ 121 /* data and sync endpoints for this stream */
122 unsigned int ep_num; /* the endpoint number */
122 struct snd_usb_endpoint *data_endpoint; 123 struct snd_usb_endpoint *data_endpoint;
123 struct snd_usb_endpoint *sync_endpoint; 124 struct snd_usb_endpoint *sync_endpoint;
124 unsigned long flags; 125 unsigned long flags;
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index 41daaa24c25f..e71fe55cebef 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -341,6 +341,14 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
341 .map = audigy2nx_map, 341 .map = audigy2nx_map,
342 .selector_map = audigy2nx_selectors, 342 .selector_map = audigy2nx_selectors,
343 }, 343 },
344 { /* Logitech, Inc. QuickCam Pro for Notebooks */
345 .id = USB_ID(0x046d, 0x0991),
346 .ignore_ctl_error = 1,
347 },
348 { /* Logitech, Inc. QuickCam E 3500 */
349 .id = USB_ID(0x046d, 0x09a4),
350 .ignore_ctl_error = 1,
351 },
344 { 352 {
345 /* Hercules DJ Console (Windows Edition) */ 353 /* Hercules DJ Console (Windows Edition) */
346 .id = USB_ID(0x06f8, 0xb000), 354 .id = USB_ID(0x06f8, 0xb000),
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index cdf8b7601973..54607f8c4f66 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -354,17 +354,21 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
354 (get_endpoint(alts, 1)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE && 354 (get_endpoint(alts, 1)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE &&
355 get_endpoint(alts, 1)->bSynchAddress != 0 && 355 get_endpoint(alts, 1)->bSynchAddress != 0 &&
356 !implicit_fb)) { 356 !implicit_fb)) {
357 snd_printk(KERN_ERR "%d:%d:%d : invalid synch pipe\n", 357 snd_printk(KERN_ERR "%d:%d:%d : invalid sync pipe. bmAttributes %02x, bLength %d, bSynchAddress %02x\n",
358 dev->devnum, fmt->iface, fmt->altsetting); 358 dev->devnum, fmt->iface, fmt->altsetting,
359 get_endpoint(alts, 1)->bmAttributes,
360 get_endpoint(alts, 1)->bLength,
361 get_endpoint(alts, 1)->bSynchAddress);
359 return -EINVAL; 362 return -EINVAL;
360 } 363 }
361 ep = get_endpoint(alts, 1)->bEndpointAddress; 364 ep = get_endpoint(alts, 1)->bEndpointAddress;
362 if (get_endpoint(alts, 0)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE && 365 if (!implicit_fb &&
366 get_endpoint(alts, 0)->bLength >= USB_DT_ENDPOINT_AUDIO_SIZE &&
363 (( is_playback && ep != (unsigned int)(get_endpoint(alts, 0)->bSynchAddress | USB_DIR_IN)) || 367 (( is_playback && ep != (unsigned int)(get_endpoint(alts, 0)->bSynchAddress | USB_DIR_IN)) ||
364 (!is_playback && ep != (unsigned int)(get_endpoint(alts, 0)->bSynchAddress & ~USB_DIR_IN)) || 368 (!is_playback && ep != (unsigned int)(get_endpoint(alts, 0)->bSynchAddress & ~USB_DIR_IN)))) {
365 ( is_playback && !implicit_fb))) { 369 snd_printk(KERN_ERR "%d:%d:%d : invalid sync pipe. is_playback %d, ep %02x, bSynchAddress %02x\n",
366 snd_printk(KERN_ERR "%d:%d:%d : invalid synch pipe\n", 370 dev->devnum, fmt->iface, fmt->altsetting,
367 dev->devnum, fmt->iface, fmt->altsetting); 371 is_playback, ep, get_endpoint(alts, 0)->bSynchAddress);
368 return -EINVAL; 372 return -EINVAL;
369 } 373 }
370 374
@@ -1147,7 +1151,8 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea
1147 return -EINVAL; 1151 return -EINVAL;
1148} 1152}
1149 1153
1150int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd) 1154static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream,
1155 int cmd)
1151{ 1156{
1152 int err; 1157 int err;
1153 struct snd_usb_substream *subs = substream->runtime->private_data; 1158 struct snd_usb_substream *subs = substream->runtime->private_data;
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index d89ab4c7d44b..79780fa57a43 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -1831,6 +1831,36 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1831 } 1831 }
1832 } 1832 }
1833}, 1833},
1834{
1835 USB_DEVICE(0x0582, 0x014d),
1836 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1837 /* .vendor_name = "BOSS", */
1838 /* .product_name = "GT-100", */
1839 .ifnum = QUIRK_ANY_INTERFACE,
1840 .type = QUIRK_COMPOSITE,
1841 .data = (const struct snd_usb_audio_quirk[]) {
1842 {
1843 .ifnum = 1,
1844 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1845 },
1846 {
1847 .ifnum = 2,
1848 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1849 },
1850 {
1851 .ifnum = 3,
1852 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1853 .data = & (const struct snd_usb_midi_endpoint_info) {
1854 .out_cables = 0x0001,
1855 .in_cables = 0x0001
1856 }
1857 },
1858 {
1859 .ifnum = -1
1860 }
1861 }
1862 }
1863},
1834 1864
1835/* Guillemot devices */ 1865/* Guillemot devices */
1836{ 1866{
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index 6b7d7a2b7baa..083ed81160e5 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -97,6 +97,7 @@ static void snd_usb_init_substream(struct snd_usb_stream *as,
97 subs->formats |= fp->formats; 97 subs->formats |= fp->formats;
98 subs->num_formats++; 98 subs->num_formats++;
99 subs->fmt_type = fp->fmt_type; 99 subs->fmt_type = fp->fmt_type;
100 subs->ep_num = fp->endpoint;
100} 101}
101 102
102/* 103/*
@@ -119,9 +120,7 @@ int snd_usb_add_audio_stream(struct snd_usb_audio *chip,
119 if (as->fmt_type != fp->fmt_type) 120 if (as->fmt_type != fp->fmt_type)
120 continue; 121 continue;
121 subs = &as->substream[stream]; 122 subs = &as->substream[stream];
122 if (!subs->data_endpoint) 123 if (subs->ep_num == fp->endpoint) {
123 continue;
124 if (subs->data_endpoint->ep_num == fp->endpoint) {
125 list_add_tail(&fp->list, &subs->fmt_list); 124 list_add_tail(&fp->list, &subs->fmt_list);
126 subs->num_formats++; 125 subs->num_formats++;
127 subs->formats |= fp->formats; 126 subs->formats |= fp->formats;
@@ -134,7 +133,7 @@ int snd_usb_add_audio_stream(struct snd_usb_audio *chip,
134 if (as->fmt_type != fp->fmt_type) 133 if (as->fmt_type != fp->fmt_type)
135 continue; 134 continue;
136 subs = &as->substream[stream]; 135 subs = &as->substream[stream];
137 if (subs->data_endpoint) 136 if (subs->ep_num)
138 continue; 137 continue;
139 err = snd_pcm_new_stream(as->pcm, stream, 1); 138 err = snd_pcm_new_stream(as->pcm, stream, 1);
140 if (err < 0) 139 if (err < 0)