Skip to contentSkip to conversation

ad1848: remove redundant autocalibration

PATCH New Krzysztof Helt 1 participant 1 message Sep 18, 2007 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ad1848: remove redundant autocalibration

From: Krzysztof Helt <[email protected]>

This patch removes redundant auto-calibration
(mce up/down sequence) from snd_ad1848_open().

---

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.

sound/isa/ad1848/ad1848_lib.c +0 -9
diff -urp linux-2.6.22.old/sound/isa/ad1848/ad1848_lib.c linux-2.6.23/sound/isa/ad1848/ad1848_lib.c
@@ -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);