[alsa-devel] another device for opl3sa2
Takashi Iwai
tiwai at suse.de
Fri Jul 27 12:22:15 CEST 2007
At Fri, 27 Jul 2007 00:55:14 -0700,
Paul Vojta wrote:
>
> On Fri, Jul 06, 2007 at 11:45:00AM +0200, Takashi Iwai wrote:
> >
> > 0x0b = CS4231_TEST_INIT, and 0x20 = CS4231_CALIB_IN_PROGRESS.
> > At least, mce_down() should show messages if the calibration gets
> > timeout. Did you see any related messages? Or didn't you build with
> > --with-debug=full?
>
> I have now recompiled the alsa drivers from alsa-driver-hg20070718
> and with --debug=full.
>
> I found that the bug would also occur the first time playing a .wav file
> after "aplay -t au file.au".
>
> The difference between opl3sa2 and 4232 occurred because of the lines
>
> if ((timeout & CS4231_MCE) == 0 ||
> !(chip->hardware & (CS4231_HW_CS4231_MASK | CS4231_HW_CS4232_MASK))) {
> return;
> }
>
> in mce_down() in cs4231_lib.c. With opl3sa2 it was always returning at this
> step, hence it didn't finish recalibrating before trying to play the sound.
>
> If I changed it so that the second test is always false for opl3sa2, then
> sound would mostly work, but intermittently I would get messages about
> "auto calibration time out" or "serious init problem - codec still busy".
> If I put a printk() statement in the beginning of mce_down to help debug
> this, then the problem would go away, so I put in udelay(100) and that
> also made the problems go away.
>
> Therefore, I submit the following patch.
>
> Synopsis: Fix bugs in mode change/recalibration for opl3sa2 driver.
>
> Signed-off by: Paul Vojta <vojta at math.berkeley.edu>
Great, finally you spotted out.
I applied it to ALSA HG tree now.
thanks,
Takashi
More information about the Alsa-devel
mailing list