Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Dec 2006 01:12:31 +0800
From:      Ariff Abdullah <ariff@FreeBSD.org>
To:        "Andrew Pantyukhin" <infofarmer@FreeBSD.org>
Cc:        multimedia@freebsd.org
Subject:   Re: snd_hda: loud distorted sound with NVidia MCP51
Message-ID:  <20061220011231.4ae3ca6b.ariff@FreeBSD.org>
In-Reply-To: <cb5206420612181257q60e22da0w922b22bf2d8a074a@mail.gmail.com>
References:  <sa6mz612cxq.wl%tamaru@myn.rcast.u-tokyo.ac.jp> <20061207010750.4f73bc15.ariff@FreeBSD.org> <sa6psawadmy.wl%tamaru@myn.rcast.u-tokyo.ac.jp> <sa6zm9umnrh.wl%tamaru@myn.rcast.u-tokyo.ac.jp> <20061212010805.3b1b3dff.ariff@FreeBSD.org> <sa6d56qjp8n.wl%tamaru@myn.rcast.u-tokyo.ac.jp> <20061212033104.051a7d0f.ariff@FreeBSD.org> <cb5206420612181050s71681a59tfc9d7a8b66d7d74a@mail.gmail.com> <sa6vek9uhvx.wl%tamaru@myn.rcast.u-tokyo.ac.jp> <cb5206420612181257q60e22da0w922b22bf2d8a074a@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Wed__20_Dec_2006_01_12_31_+0800_/s_Ibq=p+bMwsfzd
Content-Type: multipart/mixed;
	boundary="Multipart=_Wed__20_Dec_2006_01_12_31_+0800_lMa=Ibt3BKQe=i85"


--Multipart=_Wed__20_Dec_2006_01_12_31_+0800_lMa=Ibt3BKQe=i85
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, 18 Dec 2006 23:57:00 +0300
"Andrew Pantyukhin" <infofarmer@FreeBSD.org> wrote:
> On 12/18/06, Hiroharu Tamaru <tamaru@myn.rcast.u-tokyo.ac.jp> wrote:
> > This is already commited. So look for this line
> >               if (subvendor =3D=3D 0x81cb1043) {
> > and replace it with
> >               if (subvendor =3D=3D 0x81cb1043 || subvendor =3D=3D
> >               0x10b81734) {
> > and have a try.
>=20
> This actually works very well! Thank you very much!
>=20
Fix committed

> Ariff, I'll provide additional testing as needed.
>=20
> Also there's another problem, independent of the
> patch. Sometimes the card starts playing, but
> just as about half a second passes the output
> stops (mpg123 exits) and kernel says this:
>=20
> pcm0:virtual:0:dsp0.v0: play interrupt timeout, channel dead
>=20
Could you try this patch (attached). snd_hda supports polling mode
instead of interrupt, so you might give it a try as well, _after_
the given patch failed to address this issue. sysctl
dev.pcm.0.polling.

> It is hard to reproduce and might be related to
> other Turion quirks.
>=20

Welcome to the Turion64 X2 club :) I'm not sure which quirk are you
applying there. Hopefully somebody else will provide us the definitive
fix.



--
Ariff Abdullah
FreeBSD

... Recording in stereo is obviously too advanced
    and confusing for us idiot ***** users :P ........

--Multipart=_Wed__20_Dec_2006_01_12_31_+0800_lMa=Ibt3BKQe=i85
Content-Type: text/x-diff;
 name="channel.c.diff"
Content-Disposition: attachment;
 filename="channel.c.diff"
Content-Transfer-Encoding: quoted-printable

Index: src/sys/dev/sound/pcm/channel.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/sys/dev/sound/pcm/channel.c,v
retrieving revision 1.113
diff -u -r1.113 channel.c
--- src/sys/dev/sound/pcm/channel.c	7 Dec 2006 07:48:58 -0000	1.113
+++ src/sys/dev/sound/pcm/channel.c	19 Dec 2006 16:32:19 -0000
@@ -381,14 +381,14 @@
 				 */
 				ret =3D EAGAIN;
 			} else {
-	   			ret =3D chn_sleep(c, "pcmwr", c->timeout);
+	   			ret =3D chn_sleep(c, "pcmwr", hz);
 				if (ret =3D=3D EWOULDBLOCK) {
-					count -=3D c->timeout;
+					count -=3D min(hz, c->timeout);
 					ret =3D 0;
 				} else if (ret =3D=3D ERESTART || ret =3D=3D EINTR) {
 					c->flags |=3D CHN_F_ABORTING;
 					return ret;
-				} else if (ret =3D=3D 0)
+				} else
 					count =3D hz;
 			}
 		} else {
@@ -561,9 +561,9 @@
 			if (c->flags & CHN_F_NBIO)
 				ret =3D EWOULDBLOCK;
 			else {
-	   			ret =3D chn_sleep(c, "pcmrd", c->timeout);
+	   			ret =3D chn_sleep(c, "pcmrd", hz);
 				if (ret =3D=3D EWOULDBLOCK) {
-					count -=3D c->timeout;
+					count -=3D min(hz, c->timeout);
 					ret =3D 0;
 				} else if (ret =3D=3D ERESTART || ret =3D=3D EINTR) {
 					c->flags |=3D CHN_F_ABORTING;

--Multipart=_Wed__20_Dec_2006_01_12_31_+0800_lMa=Ibt3BKQe=i85--

--Signature=_Wed__20_Dec_2006_01_12_31_+0800_/s_Ibq=p+bMwsfzd
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFFiB2Clr+deMUwTNoRAj5nAKDgE2mz6gDQJ09dHEgao7kzZbMWkwCfcp8q
wOaWh/Ab+h1DdoyJozYwuaI=
=8Ri3
-----END PGP SIGNATURE-----

--Signature=_Wed__20_Dec_2006_01_12_31_+0800_/s_Ibq=p+bMwsfzd--



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