aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r--sound/usb/usbaudio.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 4e614ac39f21..627de9525a32 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -2138,7 +2138,7 @@ static void proc_pcm_format_add(struct snd_usb_stream *stream)
2138 2138
2139 sprintf(name, "stream%d", stream->pcm_index); 2139 sprintf(name, "stream%d", stream->pcm_index);
2140 if (! snd_card_proc_new(card, name, &entry)) 2140 if (! snd_card_proc_new(card, name, &entry))
2141 snd_info_set_text_ops(entry, stream, 1024, proc_pcm_format_read); 2141 snd_info_set_text_ops(entry, stream, proc_pcm_format_read);
2142} 2142}
2143 2143
2144#else 2144#else
@@ -2627,9 +2627,10 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
2627 if (!csep && altsd->bNumEndpoints >= 2) 2627 if (!csep && altsd->bNumEndpoints >= 2)
2628 csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT); 2628 csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT);
2629 if (!csep || csep[0] < 7 || csep[2] != EP_GENERAL) { 2629 if (!csep || csep[0] < 7 || csep[2] != EP_GENERAL) {
2630 snd_printk(KERN_ERR "%d:%u:%d : no or invalid class specific endpoint descriptor\n", 2630 snd_printk(KERN_WARNING "%d:%u:%d : no or invalid"
2631 " class specific endpoint descriptor\n",
2631 dev->devnum, iface_no, altno); 2632 dev->devnum, iface_no, altno);
2632 continue; 2633 csep = NULL;
2633 } 2634 }
2634 2635
2635 fp = kmalloc(sizeof(*fp), GFP_KERNEL); 2636 fp = kmalloc(sizeof(*fp), GFP_KERNEL);
@@ -2648,7 +2649,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
2648 if (snd_usb_get_speed(dev) == USB_SPEED_HIGH) 2649 if (snd_usb_get_speed(dev) == USB_SPEED_HIGH)
2649 fp->maxpacksize = (((fp->maxpacksize >> 11) & 3) + 1) 2650 fp->maxpacksize = (((fp->maxpacksize >> 11) & 3) + 1)
2650 * (fp->maxpacksize & 0x7ff); 2651 * (fp->maxpacksize & 0x7ff);
2651 fp->attributes = csep[3]; 2652 fp->attributes = csep ? csep[3] : 0;
2652 2653
2653 /* some quirks for attributes here */ 2654 /* some quirks for attributes here */
2654 2655
@@ -2980,7 +2981,7 @@ static int create_ua1000_quirk(struct snd_usb_audio *chip,
2980 return -ENXIO; 2981 return -ENXIO;
2981 alts = &iface->altsetting[1]; 2982 alts = &iface->altsetting[1];
2982 altsd = get_iface_desc(alts); 2983 altsd = get_iface_desc(alts);
2983 if (alts->extralen != 11 || alts->extra[1] != CS_AUDIO_INTERFACE || 2984 if (alts->extralen != 11 || alts->extra[1] != USB_DT_CS_INTERFACE ||
2984 altsd->bNumEndpoints != 1) 2985 altsd->bNumEndpoints != 1)
2985 return -ENXIO; 2986 return -ENXIO;
2986 2987
@@ -3197,9 +3198,9 @@ static void snd_usb_audio_create_proc(struct snd_usb_audio *chip)
3197{ 3198{
3198 struct snd_info_entry *entry; 3199 struct snd_info_entry *entry;
3199 if (! snd_card_proc_new(chip->card, "usbbus", &entry)) 3200 if (! snd_card_proc_new(chip->card, "usbbus", &entry))
3200 snd_info_set_text_ops(entry, chip, 1024, proc_audio_usbbus_read); 3201 snd_info_set_text_ops(entry, chip, proc_audio_usbbus_read);
3201 if (! snd_card_proc_new(chip->card, "usbid", &entry)) 3202 if (! snd_card_proc_new(chip->card, "usbid", &entry))
3202 snd_info_set_text_ops(entry, chip, 1024, proc_audio_usbid_read); 3203 snd_info_set_text_ops(entry, chip, proc_audio_usbid_read);
3203} 3204}
3204 3205
3205/* 3206/*