Date: Wed, 3 Dec 2003 11:57:19 -0500 From: Mathew Kanner <mat@cnd.mcgill.ca> To: Sean Chittenden <sean@chittenden.org> Cc: freebsd-current@FreeBSD.org Subject: Re: please test pcm channel patch Message-ID: <20031203165719.GL54011@cnd.mcgill.ca> In-Reply-To: <20031203091401.GA688@perrin.nxad.com> References: <20031203060710.GJ54011@cnd.mcgill.ca> <20031203090426.GH16547@perrin.nxad.com> <20031203091401.GA688@perrin.nxad.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Dec 03, Sean Chittenden wrote: > > > Hello All, > > > Please test this PCM patch. It creates seperate locking > > > classes for PCM channels and should prevent the warning where > > > multiple mutexes from the same class are held (as reported > > > recently). I believe this to be a good strategy as it masks fewer > > > errors. > > > > I can confirm that this patch fixes my LOR for pcm(4). -sc > > Bah! I got 30min into playing tunes and picked the same LOR up not > more than 5min after sending this. :( Sorry for the false alarm. > > acquiring duplicate lock of same type: "pcm record channel" > 1st pcm0:record:0 @ /usr/src/sys/dev/sound/pcm/dsp.c:144 > 2nd pcm0:play:0 @ /usr/src/sys/dev/sound/pcm/dsp.c:146 > Stack backtrace: Sean, I found the mistake, I assumed that a variable was initialized when it wasn't. Sorry for asking you to test a stupid patch before. Please try this one. Thanks again, --Mat -- Having your book made into a movie is like having your ox made into a bouillon cube. - Bill Neely --b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="channel_lor2.patch" Index: channel.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/pcm/channel.c,v retrieving revision 1.92 diff -u -r1.92 channel.c --- channel.c 27 Nov 2003 19:51:44 -0000 1.92 +++ channel.c 3 Dec 2003 16:55:41 -0000 @@ -67,9 +67,12 @@ static int chn_buildfeeder(struct pcm_channel *c); static void -chn_lockinit(struct pcm_channel *c) +chn_lockinit(struct pcm_channel *c, int dir) { - c->lock = snd_mtxcreate(c->name, "pcm channel"); + if (dir == PCMDIR_PLAY) + c->lock = snd_mtxcreate(c->name, "pcm play channel"); + else + c->lock = snd_mtxcreate(c->name, "pcm record channel"); } static void @@ -736,7 +739,7 @@ struct snd_dbuf *b, *bs; int ret; - chn_lockinit(c); + chn_lockinit(c, dir); b = NULL; bs = NULL; --b5gNqxB1S1yM7hjW--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031203165719.GL54011>