From 54de6bc8b2437f642844cecb8d183df2368ffceb Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 8 Jun 2009 10:21:07 +0200 Subject: 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 --- sound/pci/ctxfi/cthw20k1.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sound/pci/ctxfi/cthw20k1.c') 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) -- cgit v1.2.3-18-g5258