diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 42ddd11bbbb0..1c5307654cc9 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1221,6 +1221,15 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, return (ret); } +static void +mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi) +{ + bzero((void *)mi, sizeof(*mi)); + strlcpy(mi->id, m->name, sizeof(mi->id)); + strlcpy(mi->name, device_get_desc(m->dev), sizeof(mi->name)); + mi->modify_counter = m->modify_counter; +} + /* * XXX Make sure you can guarantee concurrency safety before calling this * function, be it through Giant, PCM_*, etc ! @@ -1279,6 +1288,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, *arg_i = SOUND_VERSION; ret = 0; goto done; + case SOUND_MIXER_INFO: + mixer_mixerinfo(m, (mixer_info *)arg); + ret = 0; + goto done; } if ((cmd & ~0xff) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC)