<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/apps/talk.c, branch duke3d</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>talk: On hwcodec disabling DMA interrupt is required during buflib move</title>
<updated>2014-02-03T11:43:05+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-02-03T11:43:05+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=0b7a90722a7bf9ffe5cd75eb3990c57af17098d1'/>
<id>0b7a90722a7bf9ffe5cd75eb3990c57af17098d1</id>
<content type='text'>
Even though the DMA buffer itself does not move the ISR copies from a movable
buffer into the static commit buffer. To ensure this copying yields consistent
data it must not be interrupted by this ISR..

Also bump the commit buffer size to 2k, this should reduce the overhead
considerably because many clips are smaller than that (especially on
swcodec/speex).

Change-Id: I4e1ab83074f31fc91b51a58baa1df55ce659ac73
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even though the DMA buffer itself does not move the ISR copies from a movable
buffer into the static commit buffer. To ensure this copying yields consistent
data it must not be interrupted by this ISR..

Also bump the commit buffer size to 2k, this should reduce the overhead
considerably because many clips are smaller than that (especially on
swcodec/speex).

Change-Id: I4e1ab83074f31fc91b51a58baa1df55ce659ac73
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix warnings.</title>
<updated>2014-02-03T11:33:33+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-02-03T11:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=10b3bc78f6e55a3a442f2da1f95f158ab158e648'/>
<id>10b3bc78f6e55a3a442f2da1f95f158ab158e648</id>
<content type='text'>
Change-Id: If3cbcd7557797684f1b7fea8e1bb134777680dee
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: If3cbcd7557797684f1b7fea8e1bb134777680dee
</pre>
</div>
</content>
</entry>
<entry>
<title>talk/voice: Reduce the size of the commit buffer.</title>
<updated>2014-02-02T18:40:39+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-01-21T22:22:37+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=e5eb74592eeff013d818ff0c56692b220dd53fbc'/>
<id>e5eb74592eeff013d818ff0c56692b220dd53fbc</id>
<content type='text'>
The voice engine can now request more voice data during decoding, it does
not require the entire clip to be available before start of decoding anymore.
Therefore the commit buffer does not need to hold an entire voice clip anymore,
and can be made greatly smaller.

Change-Id: I3eca9026448e725b9b8d0dae1efca0ad185371da
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The voice engine can now request more voice data during decoding, it does
not require the entire clip to be available before start of decoding anymore.
Therefore the commit buffer does not need to hold an entire voice clip anymore,
and can be made greatly smaller.

Change-Id: I3eca9026448e725b9b8d0dae1efca0ad185371da
</pre>
</div>
</content>
</entry>
<entry>
<title>talk.c: The new cache management is good enough to use it for .talk clips as well.</title>
<updated>2014-02-02T18:40:39+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-02-02T15:58:28+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=af02a674c539ee76260be543c000637ffa6ce2af'/>
<id>af02a674c539ee76260be543c000637ffa6ce2af</id>
<content type='text'>
This unifies the talk.c for all possible voice payload. .talk clips are placed
onto the same unified clip cache, along with normal clips. This allows for more
effecient memory usage.

The cache handling makes a slight difference between normal clips and .talk
ones: .talk clips can be cached multiple and are always freed first.The extra
logic to avoid loading multiple copies of .talks is not necessary because the
will be freed first anyway.

Change-Id: I88d056a0a613b129f5875f50fdb757b58bac0a42
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This unifies the talk.c for all possible voice payload. .talk clips are placed
onto the same unified clip cache, along with normal clips. This allows for more
effecient memory usage.

The cache handling makes a slight difference between normal clips and .talk
ones: .talk clips can be cached multiple and are always freed first.The extra
logic to avoid loading multiple copies of .talks is not necessary because the
will be freed first anyway.

Change-Id: I88d056a0a613b129f5875f50fdb757b58bac0a42
</pre>
</div>
</content>
</entry>
<entry>
<title>talk.c: The new cache management is good enough to use it on all targets.</title>
<updated>2014-02-02T18:40:39+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-02-02T13:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=03f373c9cd370e77766a511c574b3cf7bf8d9226'/>
<id>03f373c9cd370e77766a511c574b3cf7bf8d9226</id>
<content type='text'>
This unifies the talk.c for all targets. The only separation is left is
TALK_PROGRESSIVE_LOAD: When this is defined the talk buffer will not be
initially prefilled. This is useful for super slow storage or when the buffer
is not large enough to prefill it with useful clips (the prefill code could
be made smarter too).

The buffer size can be adjusted. By default lowmem uses 100k while
other targets load the entire file. The bigger the more clips can be cached
but with diminishing returns.

Change-Id: Ife38fb101c53093117e6638c40c65f7d177a31d4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This unifies the talk.c for all targets. The only separation is left is
TALK_PROGRESSIVE_LOAD: When this is defined the talk buffer will not be
initially prefilled. This is useful for super slow storage or when the buffer
is not large enough to prefill it with useful clips (the prefill code could
be made smarter too).

The buffer size can be adjusted. By default lowmem uses 100k while
other targets load the entire file. The bigger the more clips can be cached
but with diminishing returns.

Change-Id: Ife38fb101c53093117e6638c40c65f7d177a31d4
</pre>
</div>
</content>
</entry>
<entry>
<title>talk: Smarter cache management for TALK_PARTIAL_LOAD.</title>
<updated>2014-02-02T18:40:39+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2013-11-21T10:44:04+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=c46f9be10a9b3f34f804583d8cdc980ab62c58bd'/>
<id>c46f9be10a9b3f34f804583d8cdc980ab62c58bd</id>
<content type='text'>
Previously the clip cache of TALK_PARTIAL_LOAD reserved space N clips, each slot
was as big as the maximum sized clip which was necessary to replace clips
in-memory in MRU-style.

The cache management now uses buflib to allocate and free each clip, using the
clip's real size. This allows the clip cache to be much more compact, because
no space is wasted for the max. sized clip. This makes use of buflib's ability
to easily manage differently-sized memory chunks by moving them to make free
space.

As an example: for english.voice TALK_PARTIAL_LOAD allocated 288k in advance.
for just 64 clips. With this patch ~70 clips can be stored in a 100k buffer.
This, the memory usage is cut by 2/3 and almost optimal (there's still the
buflib per-alloc cookie overhead).

As a result the TALK_PARTIAL_LOAD buffer is restricted to 100k which still
allows for more clips than previously, on average.

Change-Id: I257654071e9a95770cd6db2c2765f020befce412
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously the clip cache of TALK_PARTIAL_LOAD reserved space N clips, each slot
was as big as the maximum sized clip which was necessary to replace clips
in-memory in MRU-style.

The cache management now uses buflib to allocate and free each clip, using the
clip's real size. This allows the clip cache to be much more compact, because
no space is wasted for the max. sized clip. This makes use of buflib's ability
to easily manage differently-sized memory chunks by moving them to make free
space.

As an example: for english.voice TALK_PARTIAL_LOAD allocated 288k in advance.
for just 64 clips. With this patch ~70 clips can be stored in a 100k buffer.
This, the memory usage is cut by 2/3 and almost optimal (there's still the
buflib per-alloc cookie overhead).

As a result the TALK_PARTIAL_LOAD buffer is restricted to 100k which still
allows for more clips than previously, on average.

Change-Id: I257654071e9a95770cd6db2c2765f020befce412
</pre>
</div>
</content>
</entry>
<entry>
<title>talk: Add debug menu entry to view statistics about talk engine.</title>
<updated>2014-02-02T18:40:39+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2013-07-02T06:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=dac40fdd60872da55b60ae9912b31e6549f1cf4a'/>
<id>dac40fdd60872da55b60ae9912b31e6549f1cf4a</id>
<content type='text'>
This engine includes voicefile, memory usage and cache
hits/misses for TALK_PARTIAL_LOAD.

Change-Id: I331981ddda39ea30c57b4b74504accb3c556c3b9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This engine includes voicefile, memory usage and cache
hits/misses for TALK_PARTIAL_LOAD.

Change-Id: I331981ddda39ea30c57b4b74504accb3c556c3b9
</pre>
</div>
</content>
</entry>
<entry>
<title>talk: Make talk_voice_required() local to talk.c</title>
<updated>2014-02-02T18:40:39+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-01-29T06:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=57000b513bd54b9dba3b308b7734c88962b81ae3'/>
<id>57000b513bd54b9dba3b308b7734c88962b81ae3</id>
<content type='text'>
Change-Id: I3a04760d550efab7f011a917597ef29c039b05bd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I3a04760d550efab7f011a917597ef29c039b05bd
</pre>
</div>
</content>
</entry>
<entry>
<title>talk/hwcodec: Do always free the clip buffer in shrink_callback().</title>
<updated>2014-02-02T18:40:39+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-01-29T06:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=60dea95cad710095477a2f5e35bd5692f79f76da'/>
<id>60dea95cad710095477a2f5e35bd5692f79f76da</id>
<content type='text'>
This is necessary because when voice is active audio is disabled. But only
audio was able to shrink it's buffer to let other memory allocs succeed.
talk needs to be able to do this too when it owns the audio buffer exclusively.

Change-Id: Idea8ab90da7169f977c0c766cccb42c4fe6d6e81
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is necessary because when voice is active audio is disabled. But only
audio was able to shrink it's buffer to let other memory allocs succeed.
talk needs to be able to do this too when it owns the audio buffer exclusively.

Change-Id: Idea8ab90da7169f977c0c766cccb42c4fe6d6e81
</pre>
</div>
</content>
</entry>
<entry>
<title>talk: When no voice file is loaded don't even attempt to load the clip, it's hopeless.</title>
<updated>2014-01-27T09:05:48+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2014-01-27T09:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=efc20ec1642fd28ce1518f97ef3addef2984cadd'/>
<id>efc20ec1642fd28ce1518f97ef3addef2984cadd</id>
<content type='text'>
Change-Id: I420155d7f01ca0ea301c0678ac7245d251d365b0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I420155d7f01ca0ea301c0678ac7245d251d365b0
</pre>
</div>
</content>
</entry>
</feed>
