aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi/cthw20k1.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-08 04:21:07 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-08 06:38:54 -0400
commit54de6bc8b2437f642844cecb8d183df2368ffceb (patch)
tree6b984265d3da7ba6d11d7fb53a7e84b8d3485e1d /sound/pci/ctxfi/cthw20k1.c
parent28cd4aa43de2b6d3b1e3385d450bfb31cbe8d72a (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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c
index df565c11fcca..b165466e1a54 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)
1186 return 0; 1186 return 0;
1187} 1187}
1188 1188
1189static unsigned int get_wc(struct hw *hw)
1190{
1191 return hw_read_20kx(hw, WC);
1192}
1193
1189/* Card hardware initialization block */ 1194/* Card hardware initialization block */
1190struct dac_conf { 1195struct dac_conf {
1191 unsigned int msr; /* master sample rate in rsrs */ 1196 unsigned int msr; /* master sample rate in rsrs */
@@ -2235,6 +2240,7 @@ static struct hw ct20k1_preset __devinitdata = {
2235 2240
2236 .set_timer_irq = set_timer_irq, 2241 .set_timer_irq = set_timer_irq,
2237 .set_timer_tick = set_timer_tick, 2242 .set_timer_tick = set_timer_tick,
2243 .get_wc = get_wc,
2238}; 2244};
2239 2245
2240int __devinit create_20k1_hw_obj(struct hw **rhw) 2246int __devinit create_20k1_hw_obj(struct hw **rhw)