diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-05-17 09:15:27 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 10:11:03 +0200 |
commit | 604cf499256af85703bd4858da56e777ec71714d (patch) | |
tree | bf7965d3be2186421121aba8cfaad3cc9d335aff /sound/usb | |
parent | d3ff42fd2b4fddb5d779e9e03a2ea44147aa8048 (diff) | |
download | linux-next-604cf499256af85703bd4858da56e777ec71714d.tar.gz |
[ALSA] usb-audio - fix synchronization packet interval with Audigy 2 NX
USB generic driver
When a device does not provide the bRefresh field in its audio endpoint
descriptors, use the bInterval field instead.
Furthermore, increase the number of sync URBs for better queueing.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/usbaudio.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 076da19a9e28..a82412b8790d 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -98,7 +98,7 @@ MODULE_PARM_DESC(async_unlink, "Use async unlink mode."); #define MAX_PACKS 10 #define MAX_PACKS_HS (MAX_PACKS * 8) /* in high speed mode */ #define MAX_URBS 5 /* max. 20ms long packets */ -#define SYNC_URBS 2 /* always two urbs for sync */ +#define SYNC_URBS 4 /* always four urbs for sync */ #define MIN_PACKS_URB 1 /* minimum 1 packet per urb */ typedef struct snd_usb_substream snd_usb_substream_t; @@ -1240,8 +1240,13 @@ static int set_format(snd_usb_substream_t *subs, struct audioformat *fmt) get_endpoint(alts, 1)->bRefresh >= 1 && get_endpoint(alts, 1)->bRefresh <= 9) subs->syncinterval = get_endpoint(alts, 1)->bRefresh; - else + else if (snd_usb_get_speed(subs->dev) == USB_SPEED_FULL) subs->syncinterval = 1; + else if (get_endpoint(alts, 1)->bInterval >= 1 && + get_endpoint(alts, 1)->bInterval <= 16) + subs->syncinterval = get_endpoint(alts, 1)->bInterval - 1; + else + subs->syncinterval = 3; } /* always fill max packet size */ |