2001-11-12 23:50:08

by Sergio Bruder

[permalink] [raw]
Subject: via82cxxx_audio problems

I'm having a little problem with an via82cxxx_audio sound
(on-)board, someone already saw this?

kernel 2.4.14 + 1.1.19 version of via82cxxx_audio driver:

With rapid fast-forward in mplayer, The sound just mutes itself and
mplayer just crawls down to 1-2 frames per second. Looking at
/var/log/messages Ive got:

Nov 12 21:51:36 stratus kernel: via_audio: ignoring drain playback error -11
Nov 12 21:52:08 stratus last message repeated 2 times
Nov 12 21:52:19 stratus kernel: via_audio: ignoring drain playback error -11
Nov 12 21:55:32 stratus kernel: Assertion failed! chan->is_active == sg_active(chan->iobase),via82cxxx_audio.c,via_chan_maybe_start,line=1206
Nov 12 21:55:47 stratus last message repeated 8 times

these "drain playback error" are generally harmless, I get it all
times that artsd 'gets' or 'releases' /dev/dsp (I configured it to
release /dev/dsp before 10s of inactivity).

'Assertion failed' is the culprit (or the simptom of it).

After that all tryes to use sound got no results.

"./via-audio-diag -aps" follows:
via-audio-diag.c:v1.00 05/06/2000 Jeff Garzik ([email protected])
Index #1: Found a via 686a audio adapter at 0xdc00.
AC97 RESET = 0x6D50 (27984)
AC97 MASTER_VOL_STEREO = 0x0303 (771)
AC97 HEADPHONE_VOL = 0x0A0A (2570)
AC97 MASTER_VOL_MONO = 0x000A (10)
AC97 MASTER_TONE = 0x0000 (0)
AC97 PCBEEP_VOL = 0x0002 (2)
AC97 PHONE_VOL = 0x000A (10)
AC97 MIC_VOL = 0x8000 (32768)
AC97 LINEIN_VOL = 0x0A0A (2570)
AC97 CD_VOL = 0x0303 (771)
AC97 VIDEO_VOL = 0x0A0A (2570)
AC97 AUX_VOL = 0x0A0A (2570)
AC97 PCMOUT_VOL = 0x0B0B (2827)
AC97 RECORD_SELECT = 0x0000 (0)
AC97 RECORD_GAIN = 0x0A0A (2570)
AC97 RECORD_GAIN_MIC = 0x0000 (0)
AC97 GENERAL_PURPOSE = 0x0000 (0)
AC97 3D_CONTROL = 0x0000 (0)
AC97 MODEM_RATE = 0x0000 (0)
AC97 POWER_CONTROL = 0x000F (15)
AC97 EXTENDED_ID = 0x0201 (513)
AC97 EXTENDED_STATUS = 0x0001 (1)
AC97 PCM_FRONT_DAC_RATE = 0x2B11 (11025)
AC97 PCM_SURR_DAC_RATE = 0x0000 (0)
AC97 PCM_LFE_DAC_RATE = 0x0000 (0)
AC97 PCM_LR_ADC_RATE = 0xBB80 (48000)
AC97 PCM_MIC_ADC_RATE = 0x0000 (0)
AC97 CENTER_LFE_MASTER = 0x0000 (0)
AC97 SURROUND_MASTER = 0x0000 (0)
AC97 RESERVED_3A = 0x0000 (0)
SGD Playback : 88 00 87 0533D0A8 00000000
SGD Record : 00 00 00 00000000 00000000
SGD FM : 00 00 00 00000000 00000000
SGD Modem Playback : 00 00 00 00000000 00000000
SGD Modem Record : 00 00 00 00000000 00000000
SGD reg 0x80 = 0x00BA0000
SGD reg 0x84 = 0x00001000
SGD reg 0x88 = 0x00000000
SGD reg 0x8C = 0x00000000
PCI reg 0x10 = 0xD0000008
PCI reg 0x3C = 0x00
PCI reg 0x40 = 0x00
PCI reg 0x41 = 0x00
PCI reg 0x42 = 0x00
PCI reg 0x43 = 0x00
PCI reg 0x44 = 0x00
PCI reg 0x48 = 0x00

Sergio Bruder
--
http://pontobr.org, http://sergio.bruder.net, http://bruder.homeip.net:81
-----------------------------------------------------------------------------
pub 1024D/0C7D9F49 2000-05-26 Sergio Devojno Bruder <[email protected]>
Key fingerprint = 983F DBDF FB53 FE55 87DF 71CA 6B01 5E44 0C7D 9F49
sub 1024g/138DF93D 2000-05-26


2001-11-13 11:13:13

by André Dahlqvist

[permalink] [raw]
Subject: Re: via82cxxx_audio problems

[email protected] <[email protected]> wrote:

> With rapid fast-forward in mplayer, The sound just mutes itself and
> mplayer just crawls down to 1-2 frames per second. Looking at
> /var/log/messages Ive got:

Try the latest 2.4.15-preX kernel since that has a much newer VIA audio
driver which might fix this.
--

Andr? Dahlqvist <[email protected]>

2001-11-13 12:10:19

by Marcelo Borges Ribeiro

[permalink] [raw]
Subject: Re: via82cxxx_audio problems

The problem with via82xx is that it is locked in 48000Hz (you can see this
in dmesg) and cannot play in any other rate. With mplayer you can see
messages such as requested 16000Hz got (480000) that explains why it sounds
like chip'n'dale ;-). P.s. I don?t know why it works with xmms but with
mpg123 it refuses to play at all becouse these sound rates.
----- Original Message -----
From: "Andr? Dahlqvist" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 13, 2001 9:19 AM
Subject: Re: via82cxxx_audio problems


> [email protected] <[email protected]> wrote:
>
> > With rapid fast-forward in mplayer, The sound just mutes itself and
> > mplayer just crawls down to 1-2 frames per second. Looking at
> > /var/log/messages Ive got:
>
> Try the latest 2.4.15-preX kernel since that has a much newer VIA audio
> driver which might fix this.
> --
>
> Andr? Dahlqvist <[email protected]>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2001-11-13 12:17:59

by Jeff Garzik

[permalink] [raw]
Subject: Re: via82cxxx_audio problems

Marcelo Borges Ribeiro wrote:
>
> The problem with via82xx is that it is locked in 48000Hz (you can see this
> in dmesg) and cannot play in any other rate. With mplayer you can see
> messages such as requested 16000Hz got (480000) that explains why it sounds
> like chip'n'dale ;-). P.s. I don?t know why it works with xmms but with
> mpg123 it refuses to play at all becouse these sound rates.

This is not a problem but a limitation of the hardware... some software
(including ALSA kernel drivers and xmms) will perform software rate
conversion.

If your audio sounds like chip-n-dales, your audio software does not
support hardware with locked codec rates, or you did not set it up to do
so.

Jeff



--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno

2001-11-13 12:32:19

by Alan

[permalink] [raw]
Subject: Re: via82cxxx_audio problems

> in dmesg) and cannot play in any other rate. With mplayer you can see
> messages such as requested 16000Hz got (480000) that explains why it so=
> unds
> like chip'n'dale ;-). P.s. I don=B4t know why it works with xmms but w=
> ith
> mpg123 it refuses to play at all becouse these sound rates.

XMMS does the right thing. It understands how to do rate adaption.

2001-11-13 13:51:09

by Tobias Ringstrom

[permalink] [raw]
Subject: Re: via82cxxx_audio problems

On Tue, 13 Nov 2001, Alan Cox wrote:

> > in dmesg) and cannot play in any other rate. With mplayer you can see
> > messages such as requested 16000Hz got (480000) that explains why it so=
> > unds
> > like chip'n'dale ;-). P.s. I don=B4t know why it works with xmms but w=
> > ith
> > mpg123 it refuses to play at all becouse these sound rates.
>
> XMMS does the right thing. It understands how to do rate adaption.

Only if you use the OSS module for output. Using esound (which is the
default in RH 7.2) it sounds terrible. That might be esound's fault
though.

/Tobias

2001-11-13 16:46:13

by Alan

[permalink] [raw]
Subject: Re: via82cxxx_audio problems

> Only if you use the OSS module for output. Using esound (which is the
> default in RH 7.2) it sounds terrible. That might be esound's fault
> though.

Thats a problem with esound - its rate adaption code is not very bright and
it doesnt let the caller know the preferred data rate. Arts is somewhat
better

2001-11-14 02:10:50

by Sergio Bruder

[permalink] [raw]
Subject: Re: via82cxxx_audio problems

On Tue, Nov 13, 2001 at 10:08:29AM -0200, Marcelo Borges Ribeiro wrote:
> The problem with via82xx is that it is locked in 48000Hz (you can see this
> in dmesg) and cannot play in any other rate. With mplayer you can see
> messages such as requested 16000Hz got (480000) that explains why it sounds
> like chip'n'dale ;-). P.s. I don?t know why it works with xmms but with
> mpg123 it refuses to play at all becouse these sound rates.

That seems not to be my case. From a mplayer call (TNG episode, BTW :)):

audio_setup: using 11025 Hz samplerate (requested: 11025)

In my case the sound was ok until that assertion failed.


Sergio Bruder
--
http://pontobr.org, http://sergio.bruder.net, http://bruder.homeip.net:81
-----------------------------------------------------------------------------
pub 1024D/0C7D9F49 2000-05-26 Sergio Devojno Bruder <[email protected]>
Key fingerprint = 983F DBDF FB53 FE55 87DF 71CA 6B01 5E44 0C7D 9F49
sub 1024g/138DF93D 2000-05-26