All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: David Parker <david@neongoat.com>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Trident problems.
Date: Wed, 10 Sep 2003 14:34:13 +0200	[thread overview]
Message-ID: <s5hr82ovn3u.wl@alsa2.suse.de> (raw)
In-Reply-To: <20030828005741.162b0565.david@neongoat.com>

[-- Attachment #1: Type: text/plain, Size: 2491 bytes --]

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

[-- Attachment #2: trident-4d-fix.dif --]
[-- Type: application/octet-stream, Size: 1082 bytes --]

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;

  parent reply	other threads:[~2003-09-10 12:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-28  7:57 Trident problems David Parker
2003-08-30 17:47 ` Alex Romosan
2003-09-09 20:35   ` David Parker
2003-09-09 20:51     ` Alex Romosan
2003-09-09 21:32       ` David Parker
2003-09-09 21:47         ` Alex Romosan
2003-09-10  1:57           ` CS46xx, TB Santa Cruz, 4+ channel output? Joe
2003-09-10 12:34 ` Takashi Iwai [this message]
2003-09-16 23:08   ` Trident problems David Parker
2003-09-17  8:50     ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2003-05-12 21:58 trident problems Alex Romosan
2003-02-13 21:00 Trident problems Peter Enderborg
2003-02-14  9:32 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hr82ovn3u.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=david@neongoat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.