2002-01-11 09:35:50

by Jeremy Lumbroso

[permalink] [raw]
Subject: Driver via ac97 sound problem (VT82C686B)

hi

i have a laptop presario 700 with ac97 audio an board ( VT82C686B chip).
When i load the via686xxx sound module ,everything is fine
but i have very very low sound with all volume at 100%.

could someone have a solution or an idea on what going on ?

thx


2002-01-11 19:24:08

by Paul Lorenz

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

Hi all,

I have the same laptop( Presario 700 with ac97 audio
(VT82C686B chip) and the same problem. Here is the
info I have gathered so far. I'm not a kernel hacker
so the info may not be as useful as it could be but
maybe it will be enough for someone in the know to go
on.

selected dmesg output
------------------------------------------------------
PCI: PCI BIOS revision 2.10 entry at 0xfd7ae, last
bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
Unknown bridge resource 0: assuming transparent
PCI: Using IRQ router VIA [1106/0686] at 00:07.0
Applying VIA southbridge workaround.
PCI: Disabling Via external APIC routing
.
.8139too Fast Ethernet driver 0.9.22
PCI: Assigned IRQ 11 for device 00:0b.0
IRQ routing conflict for 00:07.5, have irq 5, want irq
11
PCI: Sharing IRQ 11 with 00:0a.0
eth0: RealTek RTL8139 Fast Ethernet at 0xcf81e000,
00:08:02:03:2a:ef, IRQ 11
eth0: Identified 8139 chip type 'RTL-8139C'
----------------------------------------------------
output from modprobe via82cxxx_audio

Jan 11 08:56:34 debian kernel: via82cxxx: board #1 at
0x1000, IRQ 5
Jan 11 08:56:48 debian kernel: Via 686a audio driver
1.9.1
Jan 11 08:56:48 debian kernel: PCI: Found IRQ 11 for
device 00:07.5
Jan 11 08:56:48 debian kernel: IRQ routing conflict
for 00:07.5, have irq 5, want irq 11
Jan 11 08:56:48 debian kernel: PCI: Sharing IRQ 11
with 00:0a.0
Jan 11 08:56:48 debian kernel: PCI: Sharing IRQ 11
with 00:0b.0
Jan 11 08:56:48 debian kernel: ac97_codec: AC97 Audio
codec, id: 0x4144:0x5361 (Unknown)
Jan 11 08:56:48 debian kernel: via82cxxx: board #1 at
0x1000, IRQ 5

-----------------------------------------

What I found from poking around in
arch/i386/kernel/pci-irq.c
mostly in pnpbios_lookup_irq( ... )

The dev->irq is 5, which is correct, I think that is
the same as what windows assigns to it. However the
problem is that it shares a pirq with the ethernet
adapter. I checked and the sound card and the ethernet
adapter have diferrent pins, I think one was 0 and
one was 2, but they return the same pirq from

info=pirq_get_dev(dev)
pirq=info->irq[pin].link;

So, as I understand, the sound card has irq 5,
the ethernet card has irq 11 and since they
, possibly erroneously, share a routing table
entry, this is causing some confusion. I put
some debug statements in the driver itself and
it is receiving interrupts.

I have the same symptoms, if you crank the volume
all the way up, you can very faintly here something.
I have also tried the ALSA drivers, but they
weren't any better. I also tried all with and
without ACPI/APM and various via quirks. Nothing
helped.

I'm willing to supply further information, test
patches or try to debug further but with my limited
knowledge of how the pci subsystem works I'm stuck for
now.

I've made sure that I have the latest BIOS from
compaq. The BIOS is completely useless. There are
about 5 options you can set, none of them usefull.

I appreciate any and all assistance.
Paul Lorenz

-------------------------------
>hi
>
>i have a laptop presario 700 with ac97 audio an board
( >VT82C686B
>chip).
>When i load the via686xxx sound module ,everything is
>fine
>but i have very very low sound with all volume at
100%.

>could someone have a solution or an idea on what
going >on ?

>thx



__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

2002-01-11 19:50:40

by Salvador Eduardo Tropea

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

Paul Lorenz wrote:

> Jan 11 08:56:48 debian kernel: ac97_codec: AC97 Audio
> codec, id: 0x4144:0x5361 (Unknown)

Just a note: That's an Analog Devices codec and the model seems to be
posterior to AD1885.
My patch to ac97_codec will at least detect the manufacturer ;-)

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: [email protected] [email protected]
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013



2002-01-12 20:59:42

by Paul Lorenz

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

Hi Salvador,
I appreciate your help. I added the following line
to drivers/sound/ac97_codec.c

{0x41445361, "Analog Devices AD1886", &default_ops},

I then recompiled. Now when I load the module I get
the following...


Jan 12 10:24:57 debian kernel: Via 686a audio driver
1.9.1
Jan 12 10:24:57 debian kernel: PCI: Found IRQ 11 for
device 00:07.5
Jan 12 10:24:57 debian kernel: IRQ routing conflict
for 00:07.5, have irq 5, want irq 11
Jan 12 10:24:57 debian kernel: PCI: Sharing IRQ 11
with 00:0a.0
Jan 12 10:24:57 debian kernel: PCI: Sharing IRQ 11
with 00:0b.0
Jan 12 10:24:57 debian kernel: ac97_codec: AC97 Audio
codec, id: 0x4144:0x5361 (Analog Devices AD1886)
Jan 12 10:24:57 debian kernel: via82cxxx: board #1 at
0x1000, IRQ 5

So now it recognizes the card. However, still no sound
:(

Any further suggestions? I'm going to try and play
around w/alsa a bit more and see if that leads to
anythings.

thanks again,
Paul

--- salvador <[email protected]> wrote:
> Hi Paul
>
> Alan is right this problem seems to be that the EAPD
> control is turning off
> the external amplifier, try modifying the
> ac97_codec module to detect your
> codec and use default_ops.
>
> SET
>
>
> --
> Salvador Eduardo Tropea (SET). (Electronics
> Engineer)
> Visit my home page: http://welcome.to/SetSoft or
> http://www.geocities.com/SiliconValley/Vista/6552/
> Alternative e-mail: [email protected] [email protected]
> Address: Curapaligue 2124, Caseros, 3 de Febrero
> Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759
> 0013
>
>
>


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

2002-01-13 01:13:49

by Alan

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

> I appreciate your help. I added the following line
> to drivers/sound/ac97_codec.c
>
> {0x41445361, "Analog Devices AD1886", &default_ops},
>
> I then recompiled. Now when I load the module I get
> the following...

The VIA driver doesnt appear to support the ac97 ops.

2002-01-13 21:28:08

by Raul Sanchez Sanchez

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

Hi:

I have write the lines referenced to ad1886 in the patch that Salvador
Eduardo Tropea indicate me in next direction:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0107.0/0389.html

ad1886 is recognized and the code of setup_ad1886 is executed, i have
put a printk in the function and i can see it.

The problem is that i can't hear any sound :( It's seem to be mute on

thanks



--
-----------------------------------------------
Raul Sanchez Sanchez [email protected]
Centro de Calculo
Facultad de Informatica Tlf: +34 968 36 4827
Universidad de Murcia Fax: +34 968 36 4151
-----------------------------------------------

2002-01-14 17:12:32

by Salvador Eduardo Tropea

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

--- ac97_codec.c Mon Nov 12 15:02:54 2001
+++ ac97_codec-1886.c Mon Jan 14 14:05:06 2002
@@ -87,6 +87,8 @@

static struct ac97_ops null_ops = { NULL, NULL, NULL };
static struct ac97_ops default_ops = { NULL, eapd_control, NULL };
+static struct ac97_ops eapd_init_ops = { eapd_on_control, NULL, NULL };
+static struct ac97_ops eapd_init2_ops = { eapd_off_control, NULL, NULL };
static struct ac97_ops wolfson_ops = { wolfson_init, NULL, NULL };
static struct ac97_ops tritech_ops = { tritech_init, NULL, NULL };
static struct ac97_ops tritech_m_ops = { tritech_maestro_init, NULL, NULL };
@@ -106,6 +108,8 @@
{0x41445348, "Analog Devices AD1881A", &null_ops},
{0x41445360, "Analog Devices AD1885", &default_ops},
{0x41445460, "Analog Devices AD1885", &default_ops},
+ {0x41445461, "Analog Devices AD1886", &eapd_init_ops},
+// {0x41445461, "Analog Devices AD1886", &eapd_init2_ops},
{0x414B4D00, "Asahi Kasei AK4540", &null_ops},
{0x414B4D01, "Asahi Kasei AK4542", &null_ops},
{0x414B4D02, "Asahi Kasei AK4543", &null_ops},
@@ -870,7 +874,6 @@
return 0;
}

-
/*
* This is basically standard AC97. It should work as a default for
* almost all modern codecs. Note that some cards wire EAPD *backwards*
@@ -886,6 +889,18 @@
else
codec->codec_write(codec, AC97_POWER_CONTROL,
codec->codec_read(codec, AC97_POWER_CONTROL)&~0x8000);
+ return 0;
+}
+
+static int eapd_on_control(struct ac97_codec * codec)
+{
+ eapd_control(codec,0);
+ return 0;
+}
+
+static int eapd_off_control(struct ac97_codec * codec)
+{
+ eapd_control(codec,1);
return 0;
}


Attachments:
ac97_codec.c (33.19 kB)
ac97_codec.diff (1.55 kB)
Download all attachments

2002-01-14 19:00:05

by Jeremy Lumbroso

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

hi
i apply the patch and compile with the two values but i still heard no sound .
Did someone got this driver works ?
thx


Le Lundi 14 Janvier 2002 18:13, salvador a ?crit :
> As Alan says: "The VIA driver doesnt appear to support the ac97 ops."
> Here I'm attaching a brut force test, I created a small function that turns
> ON the EAPD and another to turn it OFF. Note that according to dataseets a
> 1 will disable the external amplifier, but you should try with the two
> values. I attached the modified code. It have a 1886 entry that will
> initialize the codec setting EAPD output to 0. The code have a commented
> entry that does the reverse, try both.
> I also attached the diffs so Alan can check if that could work.
> Note: I didn't compile it so watch for typos ;-)
>
> SET

--
__________________________
Lumbroso Jeremy
188 bd malesherbes
75017 PARIS
01,47,64,07,94
06,19,77,01,25
__________________________

2002-01-14 19:13:54

by Paul Lorenz

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

I also tried and neither worked for me, though I
appreciate the effort :)

I did get a couple of other messages, if this helps:

Assertion failed! chan->is_active ==
sg(chan->iobase),via82cxxx_audio.c,via_chan_maybe_start,line=1198

(typed by hand as I'm on another computer)

I got that using the eapd_init2_ops.

Note: the patch was missing prototypes for
eapd_on_control and eapd_off_control. Also my
sound chip is 0x41445361 not 0x41445461, so
I added that entry.

Paul

--- Jeremy Lumbroso <[email protected]> wrote:
> hi
> i apply the patch and compile with the two values
> but i still heard no sound .
> Did someone got this driver works ?
> thx
>
>
> Le Lundi 14 Janvier 2002 18:13, salvador a ?crit :
> > As Alan says: "The VIA driver doesnt appear to
> support the ac97 ops."
> > Here I'm attaching a brut force test, I created a
> small function that turns
> > ON the EAPD and another to turn it OFF. Note that
> according to dataseets a
> > 1 will disable the external amplifier, but you
> should try with the two
> > values. I attached the modified code. It have a
> 1886 entry that will
> > initialize the codec setting EAPD output to 0. The
> code have a commented
> > entry that does the reverse, try both.
> > I also attached the diffs so Alan can check if
> that could work.
> > Note: I didn't compile it so watch for typos ;-)
> >
> > SET
>
> --
> __________________________
> Lumbroso Jeremy
> 188 bd malesherbes
> 75017 PARIS
> 01,47,64,07,94
> 06,19,77,01,25
> __________________________


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

2002-01-14 19:22:04

by Salvador Eduardo Tropea

[permalink] [raw]
Subject: Re: Driver via ac97 sound problem (VT82C686B)

Jeremy Lumbroso wrote:

> i apply the patch and compile with the two values but i still heard no sound .

:-(
Check the routines are really called, but then we should look in other place
because it discards the EAPD theory.

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: [email protected] [email protected]
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013