svn commit: r271513 - stable/9/sys/dev/sound/pcm
Alexander Motin
mav at FreeBSD.org
Sat Sep 13 15:20:50 UTC 2014
Author: mav
Date: Sat Sep 13 15:20:49 2014
New Revision: 271513
URL: http://svnweb.freebsd.org/changeset/base/271513
Log:
MFC r269228:
Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer.
Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>
Modified:
stable/9/sys/dev/sound/pcm/mixer.c
Directory Properties:
stable/9/ (props changed)
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/sound/pcm/mixer.c
==============================================================================
--- stable/9/sys/dev/sound/pcm/mixer.c Sat Sep 13 15:05:10 2014 (r271512)
+++ stable/9/sys/dev/sound/pcm/mixer.c Sat Sep 13 15:20:49 2014 (r271513)
@@ -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-9
mailing list