aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-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;