kernel-ark/sound
Karsten Wiese 4f550df58f [ALSA] Reduce interrupt latency in sound/pci/via82xx.c
Modules: VIA82xx driver

The change only affects the via823x kind of chips.
Here the  via8233_pcm_pointer_hw() function
(named snd_via8233_pcm_pointer() before)
needed to loop until a non zero position is red from the chip.

Measurements have shown that more than 200 loops are typically needed on
an Athlon64.
As io-reads cost many cycles, those loops sum up huge.
via8233_pcm_pointer_hw() runs either in interrupt or with interrupts
disabled. So it introduces significant interrupt latency.

The patch introduces a calculated position value hwptr_done,
that is updated by the interrupt routine when a period is completed.
It is only used, if the 823x chip returns a zero position, which can't
be interpreted reliably.

Further optimisation is applied on the 8233 chip's interrupt routine:
Only the SGD_SHADOW is read, as it contains all infos needed.
We ommit ~5 more register reads that way.

Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04 13:19:00 +01:00
..
arm
core [ALSA] timer: formatting changes 2005-11-04 13:18:47 +01:00
drivers [ALSA] Remove vmalloc wrapper, kfree_nocheck() 2005-11-04 13:18:00 +01:00
i2c
isa [ALSA] Remove vmalloc wrapper, kfree_nocheck() 2005-11-04 13:18:00 +01:00
mips [ALSA] Remove obsolete chip_t 2005-11-04 13:18:51 +01:00
oss
parisc
pci [ALSA] Reduce interrupt latency in sound/pci/via82xx.c 2005-11-04 13:19:00 +01:00
pcmcia [ALSA] Remove vmalloc wrapper, kfree_nocheck() 2005-11-04 13:18:00 +01:00
ppc [ALSA] Remove obsolete chip_t 2005-11-04 13:18:51 +01:00
sparc [ALSA] Remove obsolete chip_t 2005-11-04 13:18:51 +01:00
synth
usb [ALSA] usb-audio: don't call usb_reset_configuration() when probing 2005-11-04 13:18:58 +01:00
Kconfig
last.c
Makefile
sound_core.c
sound_firmware.c