PERFORCE change 104673 for review
Ryan Beasley
ryanb at FreeBSD.org
Mon Aug 21 10:22:34 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=104673
Change 104673 by ryanb at 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.
*/
More information about the p4-projects
mailing list