[alsa-devel] [PATCH] ad1848: remove redundant autocalibration
Krzysztof Helt
krzysztof.h1 at gmail.com
Tue Sep 18 11:35:17 CEST 2007
From: Krzysztof Helt <krzysztof.h1 at wp.pl>
This patch removes redundant auto-calibration
(mce up/down sequence) from snd_ad1848_open().
Signed-off-by: Krzysztof Helt <krzysztof.h1 at wp.pl>
---
The docs says that changing the Interface Configuration register
and the Format/Clock register requires the MCE bit set.
However, the docs do not say that additional auto-calibration is
required after setting one register and before setting the other.
Now, both registers are set at once.
Tested on SC-6000.
This should reduce opening latency by one auto-calibration period.
diff -urp linux-2.6.22.old/sound/isa/ad1848/ad1848_lib.c linux-2.6.23/sound/isa/ad1848/ad1848_lib.c
--- linux-2.6.22.old/sound/isa/ad1848/ad1848_lib.c 2007-09-12 13:33:51.000000000 +0200
+++ linux-2.6.23/sound/isa/ad1848/ad1848_lib.c 2007-09-18 00:36:33.000000000 +0200
@@ -408,17 +408,8 @@ static int snd_ad1848_open(struct snd_ad
AD1848_CALIB_MODE);
chip->image[AD1848_IFACE_CTRL] |= AD1848_AUTOCALIB;
snd_ad1848_out(chip, AD1848_IFACE_CTRL, chip->image[AD1848_IFACE_CTRL]);
- spin_unlock_irqrestore(&chip->reg_lock, flags);
- snd_ad1848_mce_down(chip);
-
-#ifdef SNDRV_DEBUG_MCE
- snd_printk("open: (2)\n");
-#endif
snd_ad1848_set_data_format(chip, NULL);
-
- snd_ad1848_mce_up(chip);
- spin_lock_irqsave(&chip->reg_lock, flags);
snd_ad1848_out(chip, AD1848_DATA_FORMAT, chip->image[AD1848_DATA_FORMAT]);
spin_unlock_irqrestore(&chip->reg_lock, flags);
snd_ad1848_mce_down(chip);
More information about the Alsa-devel
mailing list