From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Trident problems. Date: Wed, 10 Sep 2003 14:34:13 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20030828005741.162b0565.david@neongoat.com> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Wed_Sep_10_14:34:13_2003-1" Return-path: In-Reply-To: <20030828005741.162b0565.david@neongoat.com> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: David Parker Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Wed_Sep_10_14:34:13_2003-1 Content-Type: text/plain; charset=US-ASCII At Thu, 28 Aug 2003 00:57:41 -0700, David Parker wrote: > > Hi, > > A long time ago (many months... sorry I don't know exactly when), my Trident > card stopped working with ALSA on a Debian unstable box. It still works with > the kernel OSS module, but ALSA has problems with the AC'97 codec. Here's what > I tried and the resulting log messages/output: > > hypnotic:/home/dap# modprobe snd-trident > ALSA ../../alsa-kernel/pci/trident/trident_main.c:3394: AC'97 codec ready error > Trident 4DWave PCI soundcard not found or device busy > devfs_register(unknown): could not append to parent, err: -17 > ALSA ../../alsa-kernel/pci/ac97/ac97_codec.c:2096: AC'97 0:0 does not respond - RESET > Trident 4DWave PCI soundcard not found or device busy > > hypnotic:/home/dap# modprobe trident > Trident 4DWave/SiS 7018/ALi 5451,Tvia CyberPro 5050 PCI Audio, version 0.14.10h, 18:35:01 Jul 19 2003 > trident: Trident 4DWave DX found at IO 0x1400, IRQ 19 > ac97_codec: AC97 codec, id: ""D68 (Unknown) > > hypnotic:/home/dap# uname -a > Linux hypnotic 2.4.22-pre7 #1 SMP Sat Jul 19 18:29:55 PDT 2003 i686 GNU/Linux > > hypnotic:/proc/asound# cat version > Advanced Linux Sound Architecture Driver Version 0.9.4. > Compiled on Jul 19 2003 for kernel 2.4.22-pre7 (SMP) with versioned symbols. > > hypnotic:/home/dap# lspci -n -v -s 00:0b.0 > 00:0b.0 Class 0401: 1023:2000 (rev 02) > Subsystem: 1023:2000 > Flags: bus master, medium devsel, latency 64, IRQ 19 > I/O ports at 1400 [size=256] > Memory at e8002000 (32-bit, non-prefetchable) [size=4K] > Capabilities: [48] Power Management version 1 > > I saw someone else had this same problem on the alsa-devel list a while ago > (http://www.mail-archive.com/alsa-devel@lists.sourceforge.net/msg06500.html) > but it doesn't look like it was ever resolved. Is there something I need to > tweak, or is this a valid bug? If it would help to test specific old versions > of ALSA I could do that too. could you please try the attached patch? if it still doesn't solve the problem, try to increase the length of timeout in snd_trident_4d_dx_init(), e.g. end_time = jiffies + HZ * 2; it will wait for 2 seconds. try this with and without the patch. if the same problem happens, try to commend out the line "return -EIO;" in the same function, so that the probing proceeds even if the check fails. let's see whether the further ac97 probing works. if still fails... remove the warm reset part. Takashi --Multipart_Wed_Sep_10_14:34:13_2003-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="trident-4d-fix.dif" Content-Transfer-Encoding: 7bit Index: alsa-kernel/pci/trident/trident_main.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/trident/trident_main.c,v retrieving revision 1.39 diff -u -r1.39 trident_main.c --- alsa-kernel/pci/trident/trident_main.c 2 Sep 2003 18:04:54 -0000 1.39 +++ alsa-kernel/pci/trident/trident_main.c 10 Sep 2003 12:24:46 -0000 @@ -3387,9 +3387,6 @@ outl(0x00000001, TRID_REG(trident, DX_ACR2_AC97_COM_STAT)); udelay(100); outl(0x00000000, TRID_REG(trident, DX_ACR2_AC97_COM_STAT)); - /* DAC on, disable SB IRQ and try to force ADC valid signal */ - trident->ac97_ctrl = 0x0000004a; - outl(trident->ac97_ctrl, TRID_REG(trident, DX_ACR2_AC97_COM_STAT)); /* wait, until the codec is ready */ end_time = (jiffies + (HZ * 3) / 4) + 1; do { @@ -3401,6 +3398,10 @@ return -EIO; __dx_ok: + /* DAC on, disable SB IRQ and try to force ADC valid signal */ + trident->ac97_ctrl = 0x0000004a; + outl(trident->ac97_ctrl, TRID_REG(trident, DX_ACR2_AC97_COM_STAT)); + snd_trident_stop_all_voices(trident); return 0; --Multipart_Wed_Sep_10_14:34:13_2003-1-- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf