WSL2-Linux-Kernel/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 Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
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 [ALSA] Replace with kzalloc() - others 2005-09-12 10:48:22 +02:00
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 [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
parisc [PARISC] Update harmony from parisc tree 2005-10-21 22:42:38 -04:00
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 [ALSA] Replace with kzalloc() - others 2005-09-12 10:48:22 +02:00
usb [ALSA] usb-audio: don't call usb_reset_configuration() when probing 2005-11-04 13:18:58 +01:00
Kconfig [ALSA] sound: align device drivers menus 2005-11-04 13:17:08 +01:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
last.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sound_core.c [PATCH] Driver Core: fix up all callers of class_device_create() 2005-10-28 09:52:52 -07:00
sound_firmware.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00