From owner-freebsd-multimedia@FreeBSD.ORG Tue Dec 19 17:12:38 2006 Return-Path: X-Original-To: multimedia@freebsd.org Delivered-To: freebsd-multimedia@FreeBSD.ORG Received: from misaki (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with SMTP id ECBB516A412; Tue, 19 Dec 2006 17:12:36 +0000 (UTC) (envelope-from ariff@FreeBSD.org) Date: Wed, 20 Dec 2006 01:12:31 +0800 From: Ariff Abdullah To: "Andrew Pantyukhin" Message-Id: <20061220011231.4ae3ca6b.ariff@FreeBSD.org> In-Reply-To: References: <20061207010750.4f73bc15.ariff@FreeBSD.org> <20061212010805.3b1b3dff.ariff@FreeBSD.org> <20061212033104.051a7d0f.ariff@FreeBSD.org> Organization: FreeBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Wed__20_Dec_2006_01_12_31_+0800_/s_Ibq=p+bMwsfzd" Cc: multimedia@freebsd.org Subject: Re: snd_hda: loud distorted sound with NVidia MCP51 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2006 17:12:38 -0000 --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" wrote: > On 12/18/06, Hiroharu Tamaru 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--