aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-05-04 08:56:04 -0400
committerJaroslav Kysela <perex@suse.cz>2005-05-29 04:06:07 -0400
commitc3f9329716df9965cbaf74ce313a12fe889c1a62 (patch)
tree8f2200dbe57a0c19e393b5574dc5a49206cb75c1 /sound/usb
parent93446edcd05589201f20cf8843e8c4f990c18ae4 (diff)
[ALSA] usb-audio - set sample rate attribute on Audigy 2 NX endpoints
USB generic driver The SB Audigy 2 NX does not advertise the sample rate attribute in its endpoint descriptors although it supports it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbaudio.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index a5e97d081c3b..da1fe0f0bca0 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -2499,32 +2499,31 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no)
2499 2499
2500 /* some quirks for attributes here */ 2500 /* some quirks for attributes here */
2501 2501
2502 /* workaround for AudioTrak Optoplay */ 2502 switch (chip->usb_id) {
2503 if (chip->usb_id == USB_ID(0x0a92, 0x0053)) { 2503 case USB_ID(0x0a92, 0x0053): /* AudioTrak Optoplay */
2504 /* Optoplay sets the sample rate attribute although 2504 /* Optoplay sets the sample rate attribute although
2505 * it seems not supporting it in fact. 2505 * it seems not supporting it in fact.
2506 */ 2506 */
2507 fp->attributes &= ~EP_CS_ATTR_SAMPLE_RATE; 2507 fp->attributes &= ~EP_CS_ATTR_SAMPLE_RATE;
2508 } 2508 break;
2509 2509 case USB_ID(0x041e, 0x3020): /* Creative SB Audigy 2 NX */
2510 /* workaround for M-Audio Audiophile USB */ 2510 case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */
2511 if (chip->usb_id == USB_ID(0x0763, 0x2003)) {
2512 /* doesn't set the sample rate attribute, but supports it */ 2511 /* doesn't set the sample rate attribute, but supports it */
2513 fp->attributes |= EP_CS_ATTR_SAMPLE_RATE; 2512 fp->attributes |= EP_CS_ATTR_SAMPLE_RATE;
2514 } 2513 break;
2515 2514 case USB_ID(0x047f, 0x0ca1): /* plantronics headset */
2515 case USB_ID(0x077d, 0x07af): /* Griffin iMic (note that there is
2516 an older model 77d:223) */
2516 /* 2517 /*
2517 * plantronics headset and Griffin iMic have set adaptive-in 2518 * plantronics headset and Griffin iMic have set adaptive-in
2518 * although it's really not... 2519 * although it's really not...
2519 */ 2520 */
2520 if (chip->usb_id == USB_ID(0x047f, 0x0ca1) ||
2521 /* Griffin iMic (note that there is an older model 77d:223) */
2522 chip->usb_id == USB_ID(0x077d, 0x07af)) {
2523 fp->ep_attr &= ~EP_ATTR_MASK; 2521 fp->ep_attr &= ~EP_ATTR_MASK;
2524 if (stream == SNDRV_PCM_STREAM_PLAYBACK) 2522 if (stream == SNDRV_PCM_STREAM_PLAYBACK)
2525 fp->ep_attr |= EP_ATTR_ADAPTIVE; 2523 fp->ep_attr |= EP_ATTR_ADAPTIVE;
2526 else 2524 else
2527 fp->ep_attr |= EP_ATTR_SYNC; 2525 fp->ep_attr |= EP_ATTR_SYNC;
2526 break;
2528 } 2527 }
2529 2528
2530 /* ok, let's parse further... */ 2529 /* ok, let's parse further... */