From owner-svn-src-all@FreeBSD.ORG Tue Jul 29 08:31:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F33B2702; Tue, 29 Jul 2014 08:31:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E05652994; Tue, 29 Jul 2014 08:31:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s6T8VAKB039441; Tue, 29 Jul 2014 08:31:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s6T8VAAQ039440; Tue, 29 Jul 2014 08:31:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407290831.s6T8VAAQ039440@svn.freebsd.org> From: Alexander Motin Date: Tue, 29 Jul 2014 08:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269228 - head/sys/dev/sound/pcm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jul 2014 08:31:11 -0000 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 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)