From owner-p4-projects@FreeBSD.ORG Mon Aug 21 10:22:34 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 18AF016A4E1; Mon, 21 Aug 2006 10:22:34 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDFCF16A4DE for ; Mon, 21 Aug 2006 10:22:33 +0000 (UTC) (envelope-from ryanb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4987343D5D for ; Mon, 21 Aug 2006 10:22:32 +0000 (GMT) (envelope-from ryanb@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 k7LAMW1v068463 for ; Mon, 21 Aug 2006 10:22:32 GMT (envelope-from ryanb@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7LAMWvC068454 for perforce@freebsd.org; Mon, 21 Aug 2006 10:22:32 GMT (envelope-from ryanb@FreeBSD.org) Date: Mon, 21 Aug 2006 10:22:32 GMT Message-Id: <200608211022.k7LAMWvC068454@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ryanb@FreeBSD.org using -f From: Ryan Beasley To: Perforce Change Reviews Cc: Subject: PERFORCE change 104673 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2006 10:22:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=104673 Change 104673 by ryanb@ryanb_yuki on 2006/08/21 10:22:13 Integrate last minute minor cleanups from user branch. Affected files ... .. //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/channel.c#3 integrate .. //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/channel.h#3 integrate .. //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/sound.c#12 integrate Differences ... ==== //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/channel.c#3 (text+ko) ==== @@ -73,11 +73,17 @@ * * Clients should acquire this lock @b without holding any channel locks * before touching syncgroups or the main syncgroup list. - * - * @todo rename? */ struct mtx snd_pcm_syncgroups_mtx; MTX_SYSINIT(pcm_syncgroup, &snd_pcm_syncgroups_mtx, "PCM channel sync group lock", MTX_DEF); +/** + * @brief syncgroups' master list + * + * Each time a channel syncgroup is created, it's added to this list. This + * list should only be accessed with @sa snd_pcm_syncgroups_mtx held. + * + * See SNDCTL_DSP_SYNCGROUP for more information. + */ struct pcm_synclist snd_pcm_syncgroups = SLIST_HEAD_INITIALIZER(head); static int chn_buildfeeder(struct pcm_channel *c); @@ -864,16 +870,6 @@ c->bufsoft = bs; c->flags = 0; c->feederflags = 0; - - /* - * OSSv4 docs: "By default OSS will set the low water level equal - * to the fragment size which is optimal in most cases." - * - * @todo So what happens if user requests a new block size? Should - * this value be updated? (Will mail 4Front with a list of - * questions as project continues.) - */ - c->lw = sndbuf_getblksz(bs); c->sm = NULL; ret = ENODEV; @@ -1255,6 +1251,12 @@ goto out1; } + /* + * OSSv4 docs: "By default OSS will set the low water level equal + * to the fragment size which is optimal in most cases." + */ + c->lw = sndbuf_getblksz(bs); + chn_resetbuf(c); out1: KASSERT(sndbuf_getsize(bs) == 0 || ==== //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/channel.h#3 (text+ko) ==== @@ -104,7 +104,14 @@ * wait on this cv for previous operation to finish. */ struct cv cv; - unsigned int lw; /**< select()/poll() low water mark */ + /** + * Low water mark for select()/poll(). + * + * This is initialized to the channel's fragment size, and will be + * overwritten if a new fragment size is set. Users may alter this + * value directly with the @c SNDCTL_DSP_LOW_WATER ioctl. + */ + unsigned int lw; /** * If part of a sync group, this will point to the syncmember * container. ==== //depot/projects/soc2006/rbeasley_sound/sys/dev/sound/pcm/sound.c#12 (text+ko) ==== @@ -1228,12 +1228,7 @@ */ bzero((void *)&si->openedmidi, sizeof(si->openedmidi)); - /** - * @todo Ask about altering oss_sysinfo definition to use a macro - * for size of the filler field. Doing so would deviate - * in appearance from 4Front's soundcard.h, and userland - * developers may think that the macro is official. - * + /* * Si->filler is a reserved array, but according to docs each * element should be set to -1. */