From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: another device for opl3sa2 Date: Fri, 06 Jul 2007 11:45:00 +0200 Message-ID: References: <20070703002739.GA27389@math.berkeley.edu> <20070704022423.GA2012@math.berkeley.edu> <20070705080302.GA6818@math.berkeley.edu> <20070706074136.GA4460@math.berkeley.edu> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 7966F24595 for ; Fri, 6 Jul 2007 11:45:00 +0200 (CEST) In-Reply-To: <20070706074136.GA4460@math.berkeley.edu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Paul Vojta Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 6 Jul 2007 00:41:36 -0700, Paul Vojta wrote: > > On Thu, Jul 05, 2007 at 04:38:57PM +0200, Takashi Iwai wrote: > > A good finding. So the possible causes are > > > > - opl3sa specific initialization, such as snd_opl3sa2_detect() > > - opl3sa specific mixer element, like Master Volume. > > > > Can your machine suspend/resume? It's interesting whether the sound > > is resumed well with snd-opl3sa2 driver. I remember it worked quite > > ago, but not tested with the recent versions. > > My machine can sleep but not hibernate. After sleep the sound is > resumed well. > > I also edited cs4231_lib.c and changed lines 242 and 861 from "#if 0" > to "#if 1" (thus enabling the call to snd_cs4231_debug(chip) at the > end of snd_cs4231_playback_prepare() ). Here is the output I got: > > 1. module opl3sa2 > > a. First time running aplay: > > CS4231 REGS: INDEX = 0x0e STATUS = 0xc4 > 0x00: left input = 0x00 0x10: alt 1 (CFIG 2) = 0x80 > 0x01: right input = 0x00 0x11: alt 2 (CFIG 3) = 0x01 > 0x02: GF1 left input = 0x06 0x12: left line in = 0x9f > 0x03: GF1 right input = 0x06 0x13: right line in = 0x9f > 0x04: CD left input = 0x9f 0x14: timer low = 0x00 > 0x05: CD right input = 0x9f 0x15: timer high = 0x00 > 0x06: left output = 0x0c 0x16: left MIC (PnP) = 0x80 > 0x07: right output = 0x0c 0x17: right MIC (PnP) = 0x80 > 0x08: playback format = 0x57 0x18: IRQ status = 0x00 > 0x09: iface (CFIG 1) = 0x08 0x19: left line out = 0x80 > 0x0a: pin control = 0x02 0x1a: mono control = 0x0f > 0x0b: init & status = 0x20 0x1b: right line out = 0x80 > 0x0c: revision & mode = 0xca 0x1c: record format = 0x20 > 0x0d: loopback = 0xfc 0x1d: var freq (PnP) = 0x80 > 0x0e: ply upr count = 0x0a 0x1e: ply lwr count = 0x00 > 0x0f: rec upr count = 0xc3 0x1f: rec lwr count = 0x00 > > b. Second time running aplay: > > CS4231 REGS: INDEX = 0x0e STATUS = 0xc4 > 0x00: left input = 0x00 0x10: alt 1 (CFIG 2) = 0x80 > 0x01: right input = 0x00 0x11: alt 2 (CFIG 3) = 0x01 > 0x02: GF1 left input = 0x06 0x12: left line in = 0x9f > 0x03: GF1 right input = 0x06 0x13: right line in = 0x9f > 0x04: CD left input = 0x9f 0x14: timer low = 0x00 > 0x05: CD right input = 0x9f 0x15: timer high = 0x00 > 0x06: left output = 0x0c 0x16: left MIC (PnP) = 0x80 > 0x07: right output = 0x0c 0x17: right MIC (PnP) = 0x80 > 0x08: playback format = 0x57 0x18: IRQ status = 0x00 > 0x09: iface (CFIG 1) = 0x08 0x19: left line out = 0x80 > 0x0a: pin control = 0x02 0x1a: mono control = 0x0f > 0x0b: init & status = 0x00 0x1b: right line out = 0x80 > 0x0c: revision & mode = 0xca 0x1c: record format = 0x20 > 0x0d: loopback = 0xfc 0x1d: var freq (PnP) = 0x80 > 0x0e: ply upr count = 0x0a 0x1e: ply lwr count = 0x00 > 0x0f: rec upr count = 0xc3 0x1f: rec lwr count = 0x00 > > 2. Module cs4232, both times running aplay: > > CS4231 REGS: INDEX = 0x0e STATUS = 0xc4 > 0x00: left input = 0x00 0x10: alt 1 (CFIG 2) = 0x80 > 0x01: right input = 0x00 0x11: alt 2 (CFIG 3) = 0x01 > 0x02: GF1 left input = 0x9f 0x12: left line in = 0x9f > 0x03: GF1 right input = 0x9f 0x13: right line in = 0x9f > 0x04: CD left input = 0x9f 0x14: timer low = 0x00 > 0x05: CD right input = 0x9f 0x15: timer high = 0x00 > 0x06: left output = 0x0c 0x16: left MIC (PnP) = 0x80 > 0x07: right output = 0x0c 0x17: right MIC (PnP) = 0x80 > 0x08: playback format = 0x57 0x18: IRQ status = 0x00 > 0x09: iface (CFIG 1) = 0x08 0x19: left line out = 0x80 > 0x0a: pin control = 0x02 0x1a: mono control = 0xcf > 0x0b: init & status = 0x00 0x1b: right line out = 0x80 > 0x0c: revision & mode = 0xca 0x1c: record format = 0x20 > 0x0d: loopback = 0xfc 0x1d: var freq (PnP) = 0x80 > 0x0e: ply upr count = 0x0a 0x1e: ply lwr count = 0x00 > 0x0f: rec upr count = 0xc3 0x1f: rec lwr count = 0x00 > > > The value of 0x0b in the first group is different from the other two groups. 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? Takashi