<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/sound/pcm/buffer.h, branch releng/6.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F6.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F6.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2007-05-13T20:50:31Z</updated>
<entry>
<title>MFC: [stage: 1/7]</title>
<updated>2007-05-13T20:50:31Z</updated>
<author>
<name>Ariff Abdullah</name>
<email>ariff@FreeBSD.org</email>
</author>
<published>2007-05-13T20:50:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=000a9373fa2563b5d4a073cc740211625b90cbde'/>
<id>urn:sha1:000a9373fa2563b5d4a073cc740211625b90cbde</id>
<content type='text'>
buf_addr should be bus_addr_t rather than u_int32_t.
</content>
</entry>
<entry>
<title>Partial MFC (buffer.h 1.14, buffer.c 1.30)</title>
<updated>2007-02-04T06:17:48Z</updated>
<author>
<name>Ariff Abdullah</name>
<email>ariff@FreeBSD.org</email>
</author>
<published>2007-02-04T06:17:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7040bb9cb7e18a242be8519ab82a86693c932367'/>
<id>urn:sha1:7040bb9cb7e18a242be8519ab82a86693c932367</id>
<content type='text'>
Fix huge memory leak within sound buffer (during channel destruction,
buffer resizing, etc.) that was here since eon. Free all (unmanaged)
allocated buffer through sndbuf_destroy() in case we forgot to call
sndbuf_free(). For a managed buffer (mostly hw specific managed buffer),
either provide CHANNEL_FREE() method with appropriate return value to
invoke semi-automatic sndbuf_free() or simply do it on their own. If
everything is failed, sndbuf_destroy() will come to the rescue as a
final measure.
</content>
</entry>
<entry>
<title>Start each of the license/copyright comments with /*-, minor shuffle of lines</title>
<updated>2005-01-06T01:43:34Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2005-01-06T01:43:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=098ca2bda93c701c5331d4e6aace072495b4caaa'/>
<id>urn:sha1:098ca2bda93c701c5331d4e6aace072495b4caaa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change KASSERT() in feed_vchan16() into an explicit test and call to</title>
<updated>2004-01-28T08:02:15Z</updated>
<author>
<name>Don Lewis</name>
<email>truckman@FreeBSD.org</email>
</author>
<published>2004-01-28T08:02:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=12e524a290a2aa65e5c8192fb8ea4dff942da0f0'/>
<id>urn:sha1:12e524a290a2aa65e5c8192fb8ea4dff942da0f0</id>
<content type='text'>
panic() so that the buffer overflow just beyond this point is always
caught, even when the code is not compiled with INVARIANTS.

Change chn_setblocksize() buffer reallocation code to attempt to avoid
the feed_vchan16() buffer overflow by attempting to always keep the
bufsoft buffer at least as large as the bufhard buffer.

Print a diagnositic message
	Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE()
if our best attempts fail.  If feed_vchan16() were to be called by
the interrupt handler while locks are dropped in chn_setblocksize()
to increase the size bufsoft to match the size of bufhard, the panic()
code in feed_vchan16() will be triggered.  If the diagnostic message
is printed, it is a warning that a panic is possible if the system
were to see events in an "unlucky" order.

Change the locking code to avoid the need for MTX_RECURSIVE mutexes.

Add the MTX_DUPOK option to the channel mutexes and change the locking
sequence to always lock the parent channel before its children to avoid
the possibility of deadlock.

Actually implement locking assertions for the channel mutexes and fix
the problems found by the resulting assertion violations.

Clean up the locking code in dsp_ioctl().

Allocate the channel buffers using the malloc() M_WAITOK option instead
of M_NOWAIT so that buffer allocation won't fail.  Drop locks across
the malloc() calls.

Add/modify KASSERTS() in attempt to detect problems early.

Abuse layering by adding a pointer to the snd_dbuf structure that points
back to the pcm_channel that owns it.  This allows sndbuf_resize() to do
proper locking without having to change the its API, which is used by
the hardware drivers.

Don't dereference a NULL pointer when setting hw.snd.maxautovchans
if a hardware driver is not loaded.  Noticed by Ryan Sommers
&lt;ryans at gamersimpact.com&gt;.

Tested by:	Stefan Ehmann &lt;shoesoft AT gmx.net&gt;
Tested by:	matk (Mathew Kanner)
Tested by:	Gordon Bergling &lt;gbergling AT 0xfce3.net&gt;
</content>
</entry>
<entry>
<title>Fix a panic due to holding a lock over calls to uiomove.</title>
<updated>2003-11-27T19:51:44Z</updated>
<author>
<name>Mathew Kanner</name>
<email>matk@FreeBSD.org</email>
</author>
<published>2003-11-27T19:51:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8e2d74a4866fd497540daa1713ab98ab7f8e1dce'/>
<id>urn:sha1:8e2d74a4866fd497540daa1713ab98ab7f8e1dce</id>
<content type='text'>
Pointed out by:	Artur Poplawski
Explained by:	Don Lewis (truckman)
Approved by:	tanimura (mentor)
Approved by:	scottl	(re)
</content>
</entry>
<entry>
<title>update my email address.</title>
<updated>2003-09-07T16:28:03Z</updated>
<author>
<name>Cameron Grant</name>
<email>cg@FreeBSD.org</email>
</author>
<published>2003-09-07T16:28:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3f22597838c3b74ccf3bea8b2a6526aa0652c6bf'/>
<id>urn:sha1:3f22597838c3b74ccf3bea8b2a6526aa0652c6bf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement a "sndbuf_getbufaddr" function and use it instead of vtophys().</title>
<updated>2003-02-20T17:31:12Z</updated>
<author>
<name>Olivier Houchard</name>
<email>cognet@FreeBSD.org</email>
</author>
<published>2003-02-20T17:31:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=38cc9942076f291be0823d72ed34c5dbbc881357'/>
<id>urn:sha1:38cc9942076f291be0823d72ed34c5dbbc881357</id>
<content type='text'>
Reviewed by:	orion
</content>
</entry>
<entry>
<title>- Clean up ISA DMA supports.</title>
<updated>2003-02-07T14:05:34Z</updated>
<author>
<name>Yoshihiro Takahashi</name>
<email>nyan@FreeBSD.org</email>
</author>
<published>2003-02-07T14:05:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3febcc57ecb5fb54e123852ee8b07557b4bde0fe'/>
<id>urn:sha1:3febcc57ecb5fb54e123852ee8b07557b4bde0fe</id>
<content type='text'>
- Rename all sndbuf_isadma* functions to sndbuf_dma* and move them into
  sys/dev/sound/isa/sndbuf_dma.c.

No response from:	sound
</content>
</entry>
<entry>
<title>* improve error handling</title>
<updated>2002-01-26T22:13:24Z</updated>
<author>
<name>Cameron Grant</name>
<email>cg@FreeBSD.org</email>
</author>
<published>2002-01-26T22:13:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b8a3639565c4a8c5ea3653412ac25f6ab5ae467f'/>
<id>urn:sha1:b8a3639565c4a8c5ea3653412ac25f6ab5ae467f</id>
<content type='text'>
* be more specific in verbose boot messages
* allow the feeder subsystem to veto pcm* attaching if there is an error
  initialising the root feeder
* don't free/malloc a new tmpbuf when resizing a snd_dbuf to the same size as
  it currently is
* store the feeder description in the feeder structure instead of mallocing
  space for it
</content>
</entry>
<entry>
<title>don't erase info in sndbuf_setup()</title>
<updated>2001-05-27T14:39:34Z</updated>
<author>
<name>Cameron Grant</name>
<email>cg@FreeBSD.org</email>
</author>
<published>2001-05-27T14:39:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fc60109d91df9f84c660fbbea790f607aea4501e'/>
<id>urn:sha1:fc60109d91df9f84c660fbbea790f607aea4501e</id>
<content type='text'>
set free'd pointers to NULL in sndbuf_free()
add a new function
</content>
</entry>
</feed>
