From owner-cvs-all@FreeBSD.ORG Sat Sep 23 20:46:02 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B8BF16A412; Sat, 23 Sep 2006 20:46:02 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3108143D46; Sat, 23 Sep 2006 20:45:48 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8NKjlMQ016352; Sat, 23 Sep 2006 20:45:47 GMT (envelope-from netchild@repoman.freebsd.org) Received: (from netchild@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8NKjljR016351; Sat, 23 Sep 2006 20:45:47 GMT (envelope-from netchild) Message-Id: <200609232045.k8NKjljR016351@repoman.freebsd.org> From: Alexander Leidinger Date: Sat, 23 Sep 2006 20:45:47 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sys param.h soundcard.h src/sys/dev/sound/pcm buffer.c buffer.h channel.c channel.h channel_if.m dsp.c dsp.h mixer.c mixer.h sound.c sound.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Sep 2006 20:46:02 -0000 netchild 2006-09-23 20:45:47 UTC FreeBSD src repository Modified files: sys/sys soundcard.h param.h sys/dev/sound/pcm buffer.c buffer.h channel.c channel.h channel_if.m dsp.c dsp.h mixer.c mixer.h sound.c sound.h Log: MFp4 the sound Google Summer of Code project: The goal was to sync with the OSSv4 API 4Front Technologies uses in their proprietary OSS driver. This was successful as far as possible. The part of the API which is stable is implemented, for the rest there are some stubs already. New system ioctls: - SNDCTL_SYSINFO - obtain audio system info (version, # of audio/midi/ mixer devices, etc.) - SNDCTL_AUDIOINFO - fetch details about a specific audio device - SNDCTL_MIXERINFO - fetch details about a specific mixer device New audio ioctls: - Sync groups (SNDCTL_DSP_SYNCGROUP/SNDCTL_DSP_SYNCSTART) which allow triggered playback/recording on multiple devices (even across processes simultaneously). - Peak meters (SNDCTL_DSP_GETIPEAKS/SNDCTL_DSP_GETOPEAKS) - can query audio drivers for peak levels (needs driver support, disabled for now). - Per channel playback/recording levels - SNDCTL_DSP_{GET,SET}{PLAY,REC}VOL. Note that these are still in name only, just wrapping around the AC97-style mixer at the moment. The next step is to push them down to the drivers. Audio ioctls still under development by 4Front (for which stubs may exist in this commit): - SNDCTL_GETNAME, SNDCTL_{GET,SET}{SONG,LABEL} - SNDCTL_DSP_{GET,SET}_CHNORDER - SNDCTL_MIX_ENUMINFO, SNDCTL_MIX_EXTINFO - (might be documented enough in the OSS releases to work on this. These ioctls cover the cool "twiddle any knob on your card" features.) Missing: - SNDCTL_DSP_COOKEDMODE -- this ioctl is used to give applications direct access to a card's buffers, bypassing the feeder architecture. It's a toughy -- "someone" needs to decide : (a) if this is desireable, and (b) if it's reasonably feasible. Updates for driver writers: So far, only two routines to the channel class (in channel_if.m) are added. One is for fetching a list of discrete supported playback/recording rates of a channel, and the other is for fetching peak level info (useful for drawing peak meters). Interested parties may want to help pushing down SNDCTL_DSP_{GET,SET}{PLAY,REC}VOL into the drivers. To use the new stuff you need to rebuild the sound drivers or your kernel (depending on if you use modules or not) and to install soundcard.h (a buildworld/installworld handles this). Sponsored by: Google SoC 2006 Submitted by: ryanb Many thanks to: 4Front Technologies for their cooperation, explanations and the nice license of their soundcard.h. Revision Changes Path 1.28 +125 -0 src/sys/dev/sound/pcm/buffer.c 1.12 +8 -0 src/sys/dev/sound/pcm/buffer.h 1.110 +154 -3 src/sys/dev/sound/pcm/channel.c 1.33 +67 -0 src/sys/dev/sound/pcm/channel.h 1.6 +64 -0 src/sys/dev/sound/pcm/channel_if.m 1.96 +1162 -1 src/sys/dev/sound/pcm/dsp.c 1.10 +6 -0 src/sys/dev/sound/pcm/dsp.h 1.50 +335 -1 src/sys/dev/sound/pcm/mixer.c 1.16 +9 -1 src/sys/dev/sound/pcm/mixer.h 1.106 +137 -1 src/sys/dev/sound/pcm/sound.c 1.71 +5 -0 src/sys/dev/sound/pcm/sound.h 1.275 +1 -1 src/sys/sys/param.h 1.46 +436 -3 src/sys/sys/soundcard.h