aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorMathew Kanner <matk@FreeBSD.org>2003-12-05 02:08:13 +0000
committerMathew Kanner <matk@FreeBSD.org>2003-12-05 02:08:13 +0000
commitbc38932a58759ef52cc6fa516d9fa52259dbeef1 (patch)
tree5405ea4e8df631188026a91770ddfec8e3dbddd2 /sys/dev/sound
parent30a62d30f4abee3b3052b55ba8db30065ac5d5f6 (diff)
Notes
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pcm/channel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index fba716e8ace0..e5b0c3037fb2 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -67,9 +67,12 @@ SYSCTL_INT(_hw_snd, OID_AUTO, report_soft_formats, CTLFLAG_RW,
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 @@ chn_init(struct pcm_channel *c, void *devinfo, int dir)
struct snd_dbuf *b, *bs;
int ret;
- chn_lockinit(c);
+ chn_lockinit(c, dir);
b = NULL;
bs = NULL;