kernel-hacking-2024-linux-s.../sound/usb
Pierre-Louis Bossart 294c4fb8ab ALSA: usb: refine delay information with USB frame counter
Existing code only updates the audio delay when URBs were
submitted/retired. This can introduce an uncertainty of 8ms
on the number of samples played out with the default settings,
and a lot more when URBs convey more packets to reduce the
interrupt rate and power consumption.

This patch relies on the USB frame counter to reduce the
uncertainty to less than 2ms worst-case. The delay information
essentially becomes independent of the URB size and number of
packets. This should help applications like PulseAudio which
require accurate audio timing. Clemens Ladisch reported
a decrease of mplayer's A-V difference from nrpacks down to at
most 1ms.

Thanks to Clemens for also pointing out that the implementation
of frame counters varies between different HCDs. Only the
8 lowest-bits are used to estimate the delay.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[clemens: changed debug code]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12 10:30:20 +02:00
..
6fire ALSA: 6fire - Fix signedness bug 2011-06-16 21:31:33 +02:00
caiaq ALSA: snd_usb_caiaq: track submitted output urbs 2011-08-14 18:10:43 +02:00
misc ALSA: firewire-speakers, oxygen, ua101: allow > 10 s periods 2011-06-17 11:36:30 +02:00
usx2y Fix common misspellings 2011-03-31 11:26:23 -03:00
card.c ALSA: usb-audio: replace "void *" with more specific pointers 2011-07-08 10:10:25 +02:00
card.h ALSA: usb: refine delay information with USB frame counter 2011-09-12 10:30:20 +02:00
clock.c ALSA: usb-audio: assume valid clock 2011-05-18 11:44:44 +02:00
clock.h ALSA: usb-audio: simplify control interface access 2010-06-23 16:10:23 +02:00
debug.h ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set 2011-05-18 11:44:35 +02:00
endpoint.c ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6 2011-08-04 16:23:47 +02:00
endpoint.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
format.c Merge branch 'topic/misc' into for-linus 2011-05-22 10:01:29 +02:00
format.h ALSA: usb-audio: parse more format descriptors with structs 2010-05-27 09:48:31 +02:00
helper.c ALSA: usb: USB3 SuperSpeed sound support 2010-08-14 10:30:08 +02:00
helper.h ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE 2010-06-11 18:05:38 +02:00
Kconfig ALSA: 6fire: use the kernel's built-in bit reverse table 2011-04-26 12:26:12 +02:00
Makefile ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USB 2011-01-24 18:45:30 +01:00
midi.c ALSA: usb-audio: add Starr Labs USB MIDI support 2011-08-26 14:12:34 +02:00
midi.h ALSA: usb-audio: add support for Akai MPD16 2010-05-21 17:12:30 +02:00
mixer.c ALSA: usb-audio - Check the dB-range validity in the later read, too 2011-08-19 08:30:53 +02:00
mixer.h ALSA: snd-usb: operate on given mixer interface only 2011-08-04 16:24:10 +02:00
mixer_maps.c ALSA: usb-audio: unify constants from specification 2010-05-31 18:17:22 +02:00
mixer_quirks.c ALSA: usb-audio: more control quirks for M-Audio FastTrack devices 2011-05-25 09:37:08 +02:00
mixer_quirks.h ALSA: usb-mixer: factor out quirks 2010-03-12 12:20:26 +01:00
pcm.c ALSA: usb: refine delay information with USB frame counter 2011-09-12 10:30:20 +02:00
pcm.h ALSA: usb: refine delay information with USB frame counter 2011-09-12 10:30:20 +02:00
power.h ALSA: usbaudio: implement USB autosuspend 2011-03-11 14:59:29 +01:00
proc.c ALSA: usb-audio: automatically detect feedback format 2010-10-27 09:17:41 +02:00
proc.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
quirks-table.h ALSA: usb-audio: add Starr Labs USB MIDI support 2011-08-26 14:12:34 +02:00
quirks.c ALSA: usb-audio: add Starr Labs USB MIDI support 2011-08-26 14:12:34 +02:00
quirks.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
urb.c ALSA: usb: refine delay information with USB frame counter 2011-09-12 10:30:20 +02:00
urb.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
usbaudio.h ALSA: usb-audio: add Starr Labs USB MIDI support 2011-08-26 14:12:34 +02:00