svn commit: r269228 - head/sys/dev/sound/pcm
Alexander Motin
mav at FreeBSD.org
Tue Jul 29 08:31:11 UTC 2014
Author: mav
Date: Tue Jul 29 08:31:10 2014
New Revision: 269228
URL: http://svnweb.freebsd.org/changeset/base/269228
Log:
Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer.
Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>
MFC after: 2 weeks
Modified:
head/sys/dev/sound/pcm/mixer.c
Modified: head/sys/dev/sound/pcm/mixer.c
==============================================================================
--- head/sys/dev/sound/pcm/mixer.c Tue Jul 29 08:00:13 2014 (r269227)
+++ head/sys/dev/sound/pcm/mixer.c Tue Jul 29 08:31:10 2014 (r269228)
@@ -1221,6 +1221,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 !
@@ -1279,6 +1288,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-head
mailing list