diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -1540,10 +1540,6 @@ PCM_RELEASE_QUICK(d); return (ENODEV); } - if (mixer_busy(m) != 0) { - PCM_RELEASE_QUICK(d); - return (EBUSY); - } level = mix_get(m, SOUND_MIXER_PCM); recsrc = mix_getrecsrc(m); if (level < 0 || recsrc < 0) { diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h --- a/sys/dev/sound/pcm/mixer.h +++ b/sys/dev/sound/pcm/mixer.h @@ -45,8 +45,6 @@ void mixer_hwvol_step_locked(struct snd_mixer *m, int l_step, int r_step); void mixer_hwvol_step(device_t dev, int left_step, int right_step); -int mixer_busy(struct snd_mixer *m); - int mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right); int mix_get(struct snd_mixer *m, u_int dev); int mix_setrecsrc(struct snd_mixer *m, u_int32_t src); diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -48,7 +48,6 @@ struct snd_mixer { KOBJ_FIELDS; void *devinfo; - int busy; int hwvol_mixer; int hwvol_step; int type; @@ -651,7 +650,6 @@ "primary pcm mixer" : "secondary pcm mixer", MTX_DEF); m->type = type; m->devinfo = devinfo; - m->busy = 0; m->dev = dev; for (i = 0; i < nitems(m->parent); i++) { m->parent[i] = SOUND_MIXER_NONE; @@ -947,14 +945,6 @@ mtx_unlock(&m->lock); } -int -mixer_busy(struct snd_mixer *m) -{ - KASSERT(m != NULL, ("NULL snd_mixer")); - - return (m->busy); -} - int mix_set(struct snd_mixer *m, u_int dev, u_int left, u_int right) { @@ -1035,12 +1025,6 @@ if (!PCM_REGISTERED(d)) return (EBADF); - /* XXX Need Giant magic entry ??? */ - - mtx_lock(&m->lock); - m->busy = 1; - mtx_unlock(&m->lock); - return (0); } @@ -1049,7 +1033,6 @@ { struct snddev_info *d; struct snd_mixer *m; - int ret; if (i_dev == NULL || i_dev->si_drv1 == NULL) return (EBADF); @@ -1059,14 +1042,7 @@ if (!PCM_REGISTERED(d)) return (EBADF); - /* XXX Need Giant magic entry ??? */ - - mtx_lock(&m->lock); - ret = (m->busy == 0) ? EBADF : 0; - m->busy = 0; - mtx_unlock(&m->lock); - - return (ret); + return (0); } static int @@ -1262,10 +1238,6 @@ return (EBADF); mtx_lock(&m->lock); - if (from == MIXER_CMD_CDEV && !m->busy) { - mtx_unlock(&m->lock); - return (EBADF); - } switch (cmd) { case SNDCTL_DSP_GET_RECSRC_NAMES: bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo));