Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2006 06:47:00 +0800
From:      Ariff Abdullah <ariff@FreeBSD.org>
To:        hartzell@alerce.com
Cc:        freebsd-multimedia@FreeBSD.org
Subject:   Re: Odd code in sound/pcm/channel.c, help with PR?
Message-ID:  <20060420064700.48c63e27.ariff@FreeBSD.org>
In-Reply-To: <17477.44637.316536.583639@satchel.alerce.com>
References:  <17477.44637.316536.583639@satchel.alerce.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Tue, 18 Apr 2006 20:28:29 -0700
George Hartzell <hartzell@alerce.com> wrote:
> 
> I'm trying to get some traction and get sound to work on my ASUS
> A8V-MX.  I keep ending up with
> 
>   pcm0:play:0::dsp0.0: play interrupt timeout, channel dead
> 
> on my console.
> 
> I've filed a PR with more details:
> 
>   http://www.freebsd.org/cgi/query-pr.cgi?pr=95949
> 
> I've been looking around, trying to understand what might be going
> on. I came across the following piece of code in
> /usr/src/sys/device/sound/pcm/channel.com, around line 320
> 
> timeout = (hz * sndbuf_getblksz(bs)) / (sndbuf_getspd(bs) *
> sndbuf_getbps(bs)); if (timeout < 1)
>         timeout = 1;
> timeout = 1;
> ret = chn_sleep(c, "pcmwr", timeout);
> if (ret == EWOULDBLOCK) {
>         count -= timeout;
>         ret = 0;
> } else if (ret == 0)
>         count = hz;
> 
> It's funny that it goes to the trouble to figure out a timeout value
> then seems to unconditionally set it to 1.
> 
It is indeed, funny :)

> Removing that line doesn't seem to fix my problem, but it still
> seems weird.
> 
> 
> And, while I've got your attention, can anyone suggest where I might
> look to understand why the buffer doesn't seem to be being emptied?
> 
It's because the hardware DMA pointer is being lazy and need a good
spank on its face.

Replace your sys/dev/sound/pci/via8233.c with:

  http://people.freebsd.org/~ariff/test/via8233.c

As usual, recompile your kernel, or just the modules. If this doesn't
work, I still have few more other tricks.

Coincidently, I'm currently investigating DMA incoherency within few
drivers, notably this and few others.


--
Ariff Abdullah
FreeBSD

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFERr3nlr+deMUwTNoRAtCBAJ9CzYMVQc7O/9g7mwgwqyfQWjzdlwCfdGD2
qbLMKeUeqB0fSx/ZRjxiOqo=
=tt29
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060420064700.48c63e27.ariff>