<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/sound/pcm/buffer.h, branch release/5.3.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2004-11-04T19:12:42+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2004-11-04T19:12:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3f86d8a2ea3f3265afaa1fd263b0004c5c000e69'/>
<id>3f86d8a2ea3f3265afaa1fd263b0004c5c000e69</id>
<content type='text'>
'RELENG_5_3_0_RELEASE'.

This commit was manufactured to restore the state of the 5.3-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_5_3_0_RELEASE'.

This commit was manufactured to restore the state of the 5.3-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change KASSERT() in feed_vchan16() into an explicit test and call to</title>
<updated>2004-01-28T08:02:15+00:00</updated>
<author>
<name>Don Lewis</name>
<email>truckman@FreeBSD.org</email>
</author>
<published>2004-01-28T08:02:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=12e524a290a2aa65e5c8192fb8ea4dff942da0f0'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a panic due to holding a lock over calls to uiomove.</title>
<updated>2003-11-27T19:51:44+00:00</updated>
<author>
<name>Mathew Kanner</name>
<email>matk@FreeBSD.org</email>
</author>
<published>2003-11-27T19:51:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8e2d74a4866fd497540daa1713ab98ab7f8e1dce'/>
<id>8e2d74a4866fd497540daa1713ab98ab7f8e1dce</id>
<content type='text'>
Pointed out by:	Artur Poplawski
Explained by:	Don Lewis (truckman)
Approved by:	tanimura (mentor)
Approved by:	scottl	(re)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pointed out by:	Artur Poplawski
Explained by:	Don Lewis (truckman)
Approved by:	tanimura (mentor)
Approved by:	scottl	(re)
</pre>
</div>
</content>
</entry>
<entry>
<title>update my email address.</title>
<updated>2003-09-07T16:28:03+00:00</updated>
<author>
<name>Cameron Grant</name>
<email>cg@FreeBSD.org</email>
</author>
<published>2003-09-07T16:28:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3f22597838c3b74ccf3bea8b2a6526aa0652c6bf'/>
<id>3f22597838c3b74ccf3bea8b2a6526aa0652c6bf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement a "sndbuf_getbufaddr" function and use it instead of vtophys().</title>
<updated>2003-02-20T17:31:12+00:00</updated>
<author>
<name>Olivier Houchard</name>
<email>cognet@FreeBSD.org</email>
</author>
<published>2003-02-20T17:31:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=38cc9942076f291be0823d72ed34c5dbbc881357'/>
<id>38cc9942076f291be0823d72ed34c5dbbc881357</id>
<content type='text'>
Reviewed by:	orion
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	orion
</pre>
</div>
</content>
</entry>
<entry>
<title>- Clean up ISA DMA supports.</title>
<updated>2003-02-07T14:05:34+00:00</updated>
<author>
<name>Yoshihiro Takahashi</name>
<email>nyan@FreeBSD.org</email>
</author>
<published>2003-02-07T14:05:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3febcc57ecb5fb54e123852ee8b07557b4bde0fe'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Rename all sndbuf_isadma* functions to sndbuf_dma* and move them into
  sys/dev/sound/isa/sndbuf_dma.c.

No response from:	sound
</pre>
</div>
</content>
</entry>
<entry>
<title>* improve error handling</title>
<updated>2002-01-26T22:13:24+00:00</updated>
<author>
<name>Cameron Grant</name>
<email>cg@FreeBSD.org</email>
</author>
<published>2002-01-26T22:13:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b8a3639565c4a8c5ea3653412ac25f6ab5ae467f'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>don't erase info in sndbuf_setup()</title>
<updated>2001-05-27T14:39:34+00:00</updated>
<author>
<name>Cameron Grant</name>
<email>cg@FreeBSD.org</email>
</author>
<published>2001-05-27T14:39:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fc60109d91df9f84c660fbbea790f607aea4501e'/>
<id>fc60109d91df9f84c660fbbea790f607aea4501e</id>
<content type='text'>
set free'd pointers to NULL in sndbuf_free()
add a new function
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
set free'd pointers to NULL in sndbuf_free()
add a new function
</pre>
</div>
</content>
</entry>
<entry>
<title>mega-commit.</title>
<updated>2001-03-24T23:10:29+00:00</updated>
<author>
<name>Cameron Grant</name>
<email>cg@FreeBSD.org</email>
</author>
<published>2001-03-24T23:10:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=66ef8af5b0e00b074572e81d3ff8c0453b284325'/>
<id>66ef8af5b0e00b074572e81d3ff8c0453b284325</id>
<content type='text'>
this introduces a new buffering mechanism which results in dramatic
simplification of the channel manager.

as several structures have changed, we take the opportunity to move their
definitions into the source files where they are used, make them private and
de-typedef them.

the sound drivers are updated to use snd_setup_intr instead of
bus_setup_intr, and to comply with the de-typedefed structures.

the ac97, mixer and channel layers have been updated with finegrained
locking, as have some drivers- not all though.  the rest will follow soon.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this introduces a new buffering mechanism which results in dramatic
simplification of the channel manager.

as several structures have changed, we take the opportunity to move their
definitions into the source files where they are used, make them private and
de-typedef them.

the sound drivers are updated to use snd_setup_intr instead of
bus_setup_intr, and to comply with the de-typedefed structures.

the ac97, mixer and channel layers have been updated with finegrained
locking, as have some drivers- not all though.  the rest will follow soon.
</pre>
</div>
</content>
</entry>
<entry>
<title>update code dealing with snd_dbuf objects to do so using a functional interface</title>
<updated>2000-12-23T03:16:13+00:00</updated>
<author>
<name>Cameron Grant</name>
<email>cg@FreeBSD.org</email>
</author>
<published>2000-12-23T03:16:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=350a5fafb1e6ac54471b60a61ce248dc123386c0'/>
<id>350a5fafb1e6ac54471b60a61ce248dc123386c0</id>
<content type='text'>
modify chn_setblocksize() to pick a default soft-blocksize appropriate to the
sample rate and format in use.  it will aim for a power of two size small
enough to generate block sizes of at most 20ms.  it will also set the
hard-blocksize taking into account rate/format conversions in use.

update drivers to implement setblocksize  correctly:
updated, tested: 	sb16, emu10k1, maestro, solo
updated, untested: 	ad1816, ess, mss, sb8, csa
not updated: 		ds1, es137x, fm801, neomagic, t4dwave, via82c686

i lack hardware to test: ad1816, csa, fm801, neomagic
others will be updated/tested in the next few days.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
modify chn_setblocksize() to pick a default soft-blocksize appropriate to the
sample rate and format in use.  it will aim for a power of two size small
enough to generate block sizes of at most 20ms.  it will also set the
hard-blocksize taking into account rate/format conversions in use.

update drivers to implement setblocksize  correctly:
updated, tested: 	sb16, emu10k1, maestro, solo
updated, untested: 	ad1816, ess, mss, sb8, csa
not updated: 		ds1, es137x, fm801, neomagic, t4dwave, via82c686

i lack hardware to test: ad1816, csa, fm801, neomagic
others will be updated/tested in the next few days.
</pre>
</div>
</content>
</entry>
</feed>
