5 Sep
2007
5 Sep
'07
12:37 a.m.
On 09/04/2007 06:49 PM, Krzysztof Helt wrote:
+static void snd_cs4231_ready(struct snd_cs4231 *chip) { int timeout;
unsigned char tmp;
for (timeout = 250; timeout > 0 && (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT); timeout--) udelay(100);
+}
Would you terribly mind calling this snd_cs4231_wait() or something close?
+static void snd_cs4231_outm(struct snd_cs4231 *chip, unsigned char reg,
unsigned char mask, unsigned char value)
+{
- unsigned char tmp = (chip->image[reg] & mask) | value;
- snd_cs4231_ready(chip);
#ifdef CONFIG_SND_DEBUG if (cs4231_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) snd_printk("outm: auto calibration time out - reg = 0x%x, value = 0x%x\n", reg, value); #endif
- if (chip->calibrate_mute) {
chip->image[reg] &= mask;
chip->image[reg] |= value;
- } else {
- if (!chip->calibrate_mute) { cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | reg);
mb();
tmp = (chip->image[reg] & mask) | value;
cs4231_outb(chip, CS4231P(REG), tmp);wmb();
mb(); }chip->image[reg] = tmp;
- chip->image[reg] = tmp;
}
Mmm, for the ! case, the chip->image[reg] = tmp is now after the mb() -- but that's okay right?
Rene