diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-08 10:21:07 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-08 12:38:54 +0200 |
commit | 54de6bc8b2437f642844cecb8d183df2368ffceb (patch) | |
tree | 6b984265d3da7ba6d11d7fb53a7e84b8d3485e1d /sound/pci/ctxfi/cthw20k1.c | |
parent | 28cd4aa43de2b6d3b1e3385d450bfb31cbe8d72a (diff) |
ALSA: ctxfi - Optimize the native timer handling using wc counter
Optimize the timer update routine to look up wall clock once instead of
checking the position of each stream at each timer update.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/cthw20k1.c')
-rw-r--r-- | sound/pci/ctxfi/cthw20k1.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c index df565c11fcc..b165466e1a5 100644 --- a/sound/pci/ctxfi/cthw20k1.c +++ b/sound/pci/ctxfi/cthw20k1.c @@ -1186,6 +1186,11 @@ static int set_timer_tick(struct hw *hw, unsigned int ticks) return 0; } +static unsigned int get_wc(struct hw *hw) +{ + return hw_read_20kx(hw, WC); +} + /* Card hardware initialization block */ struct dac_conf { unsigned int msr; /* master sample rate in rsrs */ @@ -2235,6 +2240,7 @@ static struct hw ct20k1_preset __devinitdata = { .set_timer_irq = set_timer_irq, .set_timer_tick = set_timer_tick, + .get_wc = get_wc, }; int __devinit create_20k1_hw_obj(struct hw **rhw) |