<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/firmware/pcm.c, branch working</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>Greatly reduce volume-change zipper artifacts with SW volume.</title>
<updated>2014-03-08T07:04:41+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2013-08-23T18:18:08+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=61d0583384b81de28498544ea3ec2e5c8eba42be'/>
<id>61d0583384b81de28498544ea3ec2e5c8eba42be</id>
<content type='text'>
Uses a cosine factor to smoothly shift the PCM level from the old level
to the new one over the length of a frame.

Implements indirect calls to PCM scaling function instead of testing
conditions on every callback, cleanly assigning a different call to
do the volume transition. The volume change call then assigns the final
scaling function.

Change-Id: If1004b92a91c5ca766dd0e4014ec274636e8ed26
Reviewed-on: http://gerrit.rockbox.org/763
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Uses a cosine factor to smoothly shift the PCM level from the old level
to the new one over the length of a frame.

Implements indirect calls to PCM scaling function instead of testing
conditions on every callback, cleanly assigning a different call to
do the volume transition. The volume change call then assigns the final
scaling function.

Change-Id: If1004b92a91c5ca766dd0e4014ec274636e8ed26
Reviewed-on: http://gerrit.rockbox.org/763
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable setting of global output samplerate on certain targets.</title>
<updated>2013-07-06T02:22:04+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2013-05-23T17:58:51+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=d37bf24d9011addbfbd40942a4e9bbf26de7df00'/>
<id>d37bf24d9011addbfbd40942a4e9bbf26de7df00</id>
<content type='text'>
Replaces the NATIVE_FREQUENCY constant with a configurable frequency.

The user may select 48000Hz if the hardware supports it. The default is
still 44100Hz and the minimum is 44100Hz. The setting is located in the
playback settings, under "Frequency".

"Frequency" was duplicated in english.lang for now to avoid having to
fix every .lang file for the moment and throwing everything out of sync
because of the new play_frequency feature in features.txt. The next
cleanup should combine it with the one included for recording and
generalize the ID label.

If the hardware doesn't support 48000Hz, no setting will be available.

On particular hardware where very high rates are practical and desireable,
the upper bound can be extended by patching.

The PCM mixer can be configured to play at the full hardware frequency
range. The DSP core can configure to the hardware minimum up to the
maximum playback setting (some buffers must be reserved according to
the maximum rate).

If only 44100Hz is supported or possible on a given target for playback,
using the DSP and mixer at other samperates is possible if the hardware
offers them.

Change-Id: I6023cf0c0baa8bc6292b6919b4dd3618a6a25622
Reviewed-on: http://gerrit.rockbox.org/479
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaces the NATIVE_FREQUENCY constant with a configurable frequency.

The user may select 48000Hz if the hardware supports it. The default is
still 44100Hz and the minimum is 44100Hz. The setting is located in the
playback settings, under "Frequency".

"Frequency" was duplicated in english.lang for now to avoid having to
fix every .lang file for the moment and throwing everything out of sync
because of the new play_frequency feature in features.txt. The next
cleanup should combine it with the one included for recording and
generalize the ID label.

If the hardware doesn't support 48000Hz, no setting will be available.

On particular hardware where very high rates are practical and desireable,
the upper bound can be extended by patching.

The PCM mixer can be configured to play at the full hardware frequency
range. The DSP core can configure to the hardware minimum up to the
maximum playback setting (some buffers must be reserved according to
the maximum rate).

If only 44100Hz is supported or possible on a given target for playback,
using the DSP and mixer at other samperates is possible if the hardware
offers them.

Change-Id: I6023cf0c0baa8bc6292b6919b4dd3618a6a25622
Reviewed-on: http://gerrit.rockbox.org/479
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Provide high resolution volume and prescaler to hosted targets.</title>
<updated>2013-04-27T04:59:27+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2013-04-23T07:20:49+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=08199cd6cb1e2c600eb16ce077cc308fee82de33'/>
<id>08199cd6cb1e2c600eb16ce077cc308fee82de33</id>
<content type='text'>
HAVE_SW_VOLUME_CONTROL is required and at this time only affects the
SDL targets using pcm-sdl.c.

Enables balance control in SDL targets, unless mono volume is in use.

Compiles software volume control as unbuffered when
PCM_SW_VOLUME_UNBUFFERED is defined. This avoids the overhead and
extra latency introduced by the double buffer when it is not needed.
Use this config when the target's PCM driver is buffered and sufficient
latency exists to perform safely the volume scaling.

Simulated targets that are double-buffered when made as native targets
remain so in the sim in order to run the same code.

Change-Id: Ifa77d2d3ae7376c65afecdfc785a084478cb5ffb
Reviewed-on: http://gerrit.rockbox.org/457
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
HAVE_SW_VOLUME_CONTROL is required and at this time only affects the
SDL targets using pcm-sdl.c.

Enables balance control in SDL targets, unless mono volume is in use.

Compiles software volume control as unbuffered when
PCM_SW_VOLUME_UNBUFFERED is defined. This avoids the overhead and
extra latency introduced by the double buffer when it is not needed.
Use this config when the target's PCM driver is buffered and sufficient
latency exists to perform safely the volume scaling.

Simulated targets that are double-buffered when made as native targets
remain so in the sim in order to run the same code.

Change-Id: Ifa77d2d3ae7376c65afecdfc785a084478cb5ffb
Reviewed-on: http://gerrit.rockbox.org/457
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement universal in-PCM-driver software volume control.</title>
<updated>2013-04-11T20:55:16+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2013-04-05T08:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=f5a5b946867677de76c405ee72e2ea47e36e4c83'/>
<id>f5a5b946867677de76c405ee72e2ea47e36e4c83</id>
<content type='text'>
Implements double-buffered volume, balance and prescaling control in
the main PCM driver when HAVE_SW_VOLUME_CONTROL is defined ensuring
that all PCM is volume controlled and level changes are low in latency.

Supports -73 to +6 dB using a 15-bit factor so that no large-integer
math is needed.

Low-level hardware drivers do not have to implement it themselves but
parameters can be changed (currently defined in pcm-internal.h) to work
best with a particular SoC or to provide different volume ranges.

Volume and prescale calls should be made in the codec driver. It should
appear as a normal hardware interface. PCM volume calls expect .1 dB
units.

Change-Id: Idf6316a64ef4fb8abcede10707e1e6c6d01d57db
Reviewed-on: http://gerrit.rockbox.org/423
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements double-buffered volume, balance and prescaling control in
the main PCM driver when HAVE_SW_VOLUME_CONTROL is defined ensuring
that all PCM is volume controlled and level changes are low in latency.

Supports -73 to +6 dB using a 15-bit factor so that no large-integer
math is needed.

Low-level hardware drivers do not have to implement it themselves but
parameters can be changed (currently defined in pcm-internal.h) to work
best with a particular SoC or to provide different volume ranges.

Volume and prescale calls should be made in the codec driver. It should
appear as a normal hardware interface. PCM volume calls expect .1 dB
units.

Change-Id: Idf6316a64ef4fb8abcede10707e1e6c6d01d57db
Reviewed-on: http://gerrit.rockbox.org/423
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up peak calculating code.</title>
<updated>2012-05-03T00:53:07+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2012-05-03T00:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=e189b33ff4cc530cb6e59a17b260675d7341e551'/>
<id>e189b33ff4cc530cb6e59a17b260675d7341e551</id>
<content type='text'>
Mixer needn't keep peak data around that will never be used. Just
pass pcm_peaks structure to it instead of allocating for every
channel. Plugin API becomes incompatible.

vu_meter digital mode was still using global peak calculation;
switch it to playback channel like the rest.

Remove some accumulated soil peaks inside pcm.c and make it more
generic.

Change-Id: Ib4d268d80b6a9d09915eea1c91eab483c1a2c009
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mixer needn't keep peak data around that will never be used. Just
pass pcm_peaks structure to it instead of allocating for every
channel. Plugin API becomes incompatible.

vu_meter digital mode was still using global peak calculation;
switch it to playback channel like the rest.

Remove some accumulated soil peaks inside pcm.c and make it more
generic.

Change-Id: Ib4d268d80b6a9d09915eea1c91eab483c1a2c009
</pre>
</div>
</content>
</entry>
<entry>
<title>Revise the PCM callback system after adding multichannel audio.</title>
<updated>2012-03-03T06:23:38+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2012-02-23T13:14:46+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=286a4c5caa1945c8d1cb365a3d90fb09d5700cb2'/>
<id>286a4c5caa1945c8d1cb365a3d90fb09d5700cb2</id>
<content type='text'>
Additional status callback is added to pcm_play/rec_data instead of
using a special function to set it. Status includes DMA error
reporting to the status callback. Playback and recording callback
become more alike except playback uses "const void **addr" (because
the data should not be altered) and recording  uses "void **addr".
"const" is put in place throughout where appropriate.

Most changes are fairly trivial. One that should be checked in
particular because it isn't so much is telechips, if anyone cares to
bother. PP5002 is not so trivial either but that tested as working.

Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2
Reviewed-on: http://gerrit.rockbox.org/166
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Additional status callback is added to pcm_play/rec_data instead of
using a special function to set it. Status includes DMA error
reporting to the status callback. Playback and recording callback
become more alike except playback uses "const void **addr" (because
the data should not be altered) and recording  uses "void **addr".
"const" is put in place throughout where appropriate.

Most changes are fairly trivial. One that should be checked in
particular because it isn't so much is telechips, if anyone cares to
bother. PP5002 is not so trivial either but that tested as working.

Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2
Reviewed-on: http://gerrit.rockbox.org/166
Reviewed-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
Tested-by: Michael Sevakis &lt;jethead71@rockbox.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>AS3525v1/v2:</title>
<updated>2011-12-08T19:20:00+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2011-12-08T19:20:00+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=e42a3194de3b4fb9cd3e7cbd2e0ff17fea804b72'/>
<id>e42a3194de3b4fb9cd3e7cbd2e0ff17fea804b72</id>
<content type='text'>
Fix problems with volume of recorded material by converting 14-bit samples to
16-bit. Remove duplicate samples from recorded data and support proper
samplerate since ADC runs 1/2 the codec clock. Support monitoring mono on both
output channels by feeding data manually to I2SOUT under the right conditions.

DMA is no longer used for recording since frames must be processed as described
above but it does allow full-duplex audio.

Miscellaneous change includes a proper constant (HW_SAMPR_DEFAULT) to reset the
hardware samplerate when recording is closed. PP5024 and AS3525 have different
default recording rates (22kHz and 44kHz respectively) but both have half-speed
ADC.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31180 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix problems with volume of recorded material by converting 14-bit samples to
16-bit. Remove duplicate samples from recorded data and support proper
samplerate since ADC runs 1/2 the codec clock. Support monitoring mono on both
output channels by feeding data manually to I2SOUT under the right conditions.

DMA is no longer used for recording since frames must be processed as described
above but it does allow full-duplex audio.

Miscellaneous change includes a proper constant (HW_SAMPR_DEFAULT) to reset the
hardware samplerate when recording is closed. PP5024 and AS3525 have different
default recording rates (22kHz and 44kHz respectively) but both have half-speed
ADC.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31180 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>Use a macro for aligning PCM chunks instead of explictly coding it each time.</title>
<updated>2011-12-05T13:58:35+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2011-12-05T13:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=906905aa43566c16913238a71ccc13d438af1702'/>
<id>906905aa43566c16913238a71ccc13d438af1702</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31152 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31152 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>Shuffle some functions around so that interfacing with playback.c in particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it.</title>
<updated>2011-09-01T12:15:43+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2011-09-01T12:15:43+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=4db3e8965270dfe813a14c5ee9bcd0b645eb2edf'/>
<id>4db3e8965270dfe813a14c5ee9bcd0b645eb2edf</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>Use playback channel directly for peakmeters and plugins using peak calculation. Also, for now, don't allow mixer playback to overlap recording, even if full duplex works.</title>
<updated>2011-07-02T11:55:38+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2011-07-02T11:55:38+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=22b6def065ab7c2ca030f405577e34104ad20011'/>
<id>22b6def065ab7c2ca030f405577e34104ad20011</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30119 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30119 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
</feed>
