svn commit: r271193 - stable/10/sys/dev/sound/pcm
Alexander Motin
mav at FreeBSD.org
Sat Sep 6 15:24:48 UTC 2014
Author: mav
Date: Sat Sep 6 15:24:48 2014
New Revision: 271193
URL: http://svnweb.freebsd.org/changeset/base/271193
Log:
MFC r269228:
Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer.
Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>
Approved by: re (marius)
Modified:
stable/10/sys/dev/sound/pcm/mixer.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/sound/pcm/mixer.c
==============================================================================
--- stable/10/sys/dev/sound/pcm/mixer.c Sat Sep 6 15:23:28 2014 (r271192)
+++ stable/10/sys/dev/sound/pcm/mixer.c Sat Sep 6 15:24:48 2014 (r271193)
@@ -1222,6 +1222,15 @@ mixer_ioctl(struct cdev *i_dev, u_long c
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 !
@@ -1280,6 +1289,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo
*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)
More information about the svn-src-stable-10
mailing list