2003-09-20 16:38:38

by Dr. David Alan Gilbert

[permalink] [raw]
Subject: 2.4.2[12] v VIA Rhine and VIA82x audio (working with a fight)

Hi,
I thought I'd report some problems (and solutions) I had getting
2.4.21 and 2.4.22 up on a Shuttle Motherboard using a VIA chipset.

1) Ether

The motherboard has onboard via-rhine ether; this wouldn't work
with the first kernels I tried. With 2.4.22 it needs the 'noapic'
option to work (2.4.22 wouldn't build for me single processor).
The errors are timeouts on transmit; the same happens on 2.4.21

2) Audio

This was much more of a fight. The standard 2.4.21/22 via82xxx drivers
were very problematic. For example random hanging apps, buzzing when
an app had sound open but wasn't actually sending stuff, and a complete
failure to have any sound input.

In the end I gave up and got ALSA 0.9.6; which seems to work fine for
generated audio and audio input.
Except for playing CDs - which don't do anything - I suspect that might
be hardware, but am not sure.

lspci and any other debug available on request.

Dave (linux @ treblig.org)


-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/


2003-09-20 17:47:05

by Alan

[permalink] [raw]
Subject: Re: 2.4.2[12] v VIA Rhine and VIA82x audio (working with a fight)

On Sad, 2003-09-20 at 17:38, Dr. David Alan Gilbert wrote:
> The motherboard has onboard via-rhine ether; this wouldn't work
> with the first kernels I tried. With 2.4.22 it needs the 'noapic'
> option to work (2.4.22 wouldn't build for me single processor).
> The errors are timeouts on transmit; the same happens on 2.4.21

I've done some work on this for -ac. I thought 2.4.22 had enough stuff
to deal with it (at least for the non ACPI case). VIA v-bus cares that
both PCI_INTERRUPT_PIN and PCI_INTERRUPT_LINE are both set.

> 2) Audio
>
> This was much more of a fight. The standard 2.4.21/22 via82xxx drivers
> were very problematic. For example random hanging apps, buzzing when
> an app had sound open but wasn't actually sending stuff, and a complete
> failure to have any sound input.

Do you have VIA 8233 or 8235 hardware ?

> Except for playing CDs - which don't do anything - I suspect that might
> be hardware, but am not sure.

Check there is an analog cable fitted on the CD->Sound. Many new WinXP
boxes are shipped with XP configured to digitally rip the CD data and no
audio link cable. If so you need to pick a different CD player app or
fit the cable.

2003-09-20 19:05:24

by Dave Gilbert (Home)

[permalink] [raw]
Subject: Re: 2.4.2[12] v VIA Rhine and VIA82x audio (working with a fight)

* Alan Cox ([email protected]) wrote:
>
> I've done some work on this for -ac. I thought 2.4.22 had enough stuff
> to deal with it (at least for the non ACPI case). VIA v-bus cares that
> both PCI_INTERRUPT_PIN and PCI_INTERRUPT_LINE are both set.

Well I do wonder whether it is just a very buggy BIOS etc not being helpful.

> > 2) Audio
> >
> > This was much more of a fight. The standard 2.4.21/22 via82xxx drivers
> > were very problematic. For example random hanging apps, buzzing when
> > an app had sound open but wasn't actually sending stuff, and a complete
> > failure to have any sound input.
>
> Do you have VIA 8233 or 8235 hardware ?

It isn't entirely obvious from the PCI dumps; I think its the 8235 from the
first entry for the device:

Bus 0, device 17, function 0:
ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge (rev 0).
Bus 0, device 17, function 1:
IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 6).
Master Capable. Latency=32.
I/O at 0xdc00 [0xdc0f].
Bus 0, device 17, function 5:
Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235 AC97 Audio Controller (rev 80).
IRQ 5.
I/O at 0xe000 [0xe0ff].

ALSA seems to think its an 8235.

> > Except for playing CDs - which don't do anything - I suspect that might
> > be hardware, but am not sure.
>
> Check there is an analog cable fitted on the CD->Sound. Many new WinXP
> boxes are shipped with XP configured to digitally rip the CD data and no
> audio link cable. If so you need to pick a different CD player app or
> fit the cable.

Nod - I've heard it play a few times; so I'm wondering about a loose cable; although
my normal solution of these problems (buy a Soundblaster) has failed when I got the
machine home to find it had a sticker over the back of the case saying if I opened
it I'd break the warranty.

Dave
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/

2003-09-20 20:09:29

by Jamie Lokier

[permalink] [raw]
Subject: Re: 2.4.2[12] v VIA Rhine and VIA82x audio (working with a fight)

Alan Cox wrote:
> > Except for playing CDs - which don't do anything - I suspect that might
> > be hardware, but am not sure.
>
> Check there is an analog cable fitted on the CD->Sound. Many new WinXP
> boxes are shipped with XP configured to digitally rip the CD data and no
> audio link cable. If so you need to pick a different CD player app or
> fit the cable.

Different hardware, possibly similar problem.

I'm using the cmipci driver for sound. On a 2.4.18 kernel, CD audio
is mixed fine from the analogue cable.

On a 2.5.75 kernel, I don't hear anything from the analogue input.
There is a CD audio mixer setting, but adjusting it doesn't produce any sound.

Therefore I have digitally rip CDs to play them on 2.5.75, but not on 2.4.18.

Cheers,
-- Jamie

2003-09-20 22:16:28

by Alan

[permalink] [raw]
Subject: Re: 2.4.2[12] v VIA Rhine and VIA82x audio (working with a fight)

On Sad, 2003-09-20 at 21:09, Jamie Lokier wrote:
> On a 2.5.75 kernel, I don't hear anything from the analogue input.

CMPCI in everything pre 2.4.22pre10-ac or so is obsolete and has all
sorts of problems with the later chips. C Tien of Cmedia sent a lot of
updates to the driver that were merged at that point. I'd be interested
to know if you still have problems wiht that

2003-09-21 13:10:10

by Stephan Maciej

[permalink] [raw]
Subject: Re: 2.4.2[12] v VIA Rhine and VIA82x audio (working with a fight)

On Sunday 21 September 2003 00:14, Alan Cox wrote:
> On Sad, 2003-09-20 at 21:09, Jamie Lokier wrote:
> > On a 2.5.75 kernel, I don't hear anything from the analogue input.
>
> CMPCI in everything pre 2.4.22pre10-ac or so is obsolete and has all
> sorts of problems with the later chips. C Tien of Cmedia sent a lot of
> updates to the driver that were merged at that point.

Are these in 2.4.23-pre4?

> I'd be interested
> to know if you still have problems wiht that

If yes, there are problems with the updates. Sound randomly locks my machine
up, without any oops message and not even blinking keyboard lights. Only a
hard reset helps.

I have suspected this as being the reason for the lockups:

static ssize_t cm_read(struct file *file, char *buffer, size_t count, loff_t
*ppos)
{
[...]
DECLARE_WAITQUEUE(wait, current);
[...]

add_wait_queue(&s->dma_adc.wait, &wait);
while (count > 0) {
[...]
if (cnt <= 0) {
start_adc(s);
if (file->f_flags & O_NONBLOCK)
return ret ? ret : -EAGAIN;

Shouldn't we do a remove_wait_queue before the return()?

There are many more places to fix if that's a bug. I am willing to provide a
patch if anyone tells me if I am right with the assumption above.

Stephan

2003-09-21 13:18:31

by Alan

[permalink] [raw]
Subject: Re: 2.4.2[12] v VIA Rhine and VIA82x audio (working with a fight)

On Sul, 2003-09-21 at 14:05, Stephan Maciej wrote:
> > CMPCI in everything pre 2.4.22pre10-ac or so is obsolete and has all
> > sorts of problems with the later chips. C Tien of Cmedia sent a lot of
> > updates to the driver that were merged at that point.
>
> Are these in 2.4.23-pre4?

Unsure

> I have suspected this as being the reason for the lockups:

Already fixed in the newer cmpci driver