summaryrefslogtreecommitdiff
path: root/firmware/asm
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-02-23 08:14:46 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-03-03 07:23:38 +0100
commit286a4c5caa1945c8d1cb365a3d90fb09d5700cb2 (patch)
tree4835f46d16ec78d035ec9f49333079fe618384c1 /firmware/asm
parent3f82f3aca14eb954e55f761721ffdd2684f0e812 (diff)
Revise the PCM callback system after adding multichannel audio.
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 <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
Diffstat (limited to 'firmware/asm')
-rw-r--r--firmware/asm/arm/pcm-mixer-armv4.c8
-rw-r--r--firmware/asm/arm/pcm-mixer-armv5.c6
-rw-r--r--firmware/asm/arm/pcm-mixer-armv6.c6
-rw-r--r--firmware/asm/m68k/pcm-mixer.c6
-rw-r--r--firmware/asm/pcm-mixer.c8
5 files changed, 17 insertions, 17 deletions
diff --git a/firmware/asm/arm/pcm-mixer-armv4.c b/firmware/asm/arm/pcm-mixer-armv4.c
index 4818544d7b..dc2edb781c 100644
--- a/firmware/asm/arm/pcm-mixer-armv4.c
+++ b/firmware/asm/arm/pcm-mixer-armv4.c
@@ -24,9 +24,9 @@
/* Mix channels' samples and apply gain factors */
static FORCE_INLINE void mix_samples(void *out,
- void *src0,
+ const void *src0,
int32_t src0_amp,
- void *src1,
+ const void *src1,
int32_t src1_amp,
size_t size)
{
@@ -96,7 +96,7 @@ static FORCE_INLINE void mix_samples(void *out,
if (src0_amp != MIX_AMP_UNITY)
{
/* Keep unity in src0, amp0 */
- int16_t *src_tmp = src0;
+ const void *src_tmp = src0;
src0 = src1;
src1 = src_tmp;
src1_amp = src0_amp;
@@ -133,7 +133,7 @@ static FORCE_INLINE void mix_samples(void *out,
/* Write channel's samples and apply gain factor */
static FORCE_INLINE void write_samples(void *out,
- void *src,
+ const void *src,
int32_t amp,
size_t size)
{
diff --git a/firmware/asm/arm/pcm-mixer-armv5.c b/firmware/asm/arm/pcm-mixer-armv5.c
index 64f2c86f52..add1522fd9 100644
--- a/firmware/asm/arm/pcm-mixer-armv5.c
+++ b/firmware/asm/arm/pcm-mixer-armv5.c
@@ -24,9 +24,9 @@
/* Mix channels' samples and apply gain factors */
static FORCE_INLINE void mix_samples(void *out,
- void *src0,
+ const void *src0,
int32_t src0_amp,
- void *src1,
+ const void *src1,
int32_t src1_amp,
size_t size)
{
@@ -57,7 +57,7 @@ static FORCE_INLINE void mix_samples(void *out,
/* Write channel's samples and apply gain factor */
static FORCE_INLINE void write_samples(void *out,
- void *src,
+ const void *src,
int32_t amp,
size_t size)
{
diff --git a/firmware/asm/arm/pcm-mixer-armv6.c b/firmware/asm/arm/pcm-mixer-armv6.c
index 94eecd0f90..9da5b40ef1 100644
--- a/firmware/asm/arm/pcm-mixer-armv6.c
+++ b/firmware/asm/arm/pcm-mixer-armv6.c
@@ -23,9 +23,9 @@
/* Mix channels' samples and apply gain factors */
static FORCE_INLINE void mix_samples(void *out,
- void *src0,
+ const void *src0,
int32_t src0_amp,
- void *src1,
+ const void *src1,
int32_t src1_amp,
size_t size)
{
@@ -71,7 +71,7 @@ static FORCE_INLINE void mix_samples(void *out,
/* Write channel's samples and apply gain factor */
static FORCE_INLINE void write_samples(void *out,
- void *src,
+ const void *src,
int32_t amp,
size_t size)
{
diff --git a/firmware/asm/m68k/pcm-mixer.c b/firmware/asm/m68k/pcm-mixer.c
index d8318fffaf..730ae4ace7 100644
--- a/firmware/asm/m68k/pcm-mixer.c
+++ b/firmware/asm/m68k/pcm-mixer.c
@@ -56,9 +56,9 @@ static FORCE_INLINE void restore_emac_context(void)
/* Mix channels' samples and apply gain factors */
static FORCE_INLINE void mix_samples(void *out,
- void *src0,
+ const void *src0,
int32_t src0_amp,
- void *src1,
+ const void *src1,
int32_t src1_amp,
size_t size)
{
@@ -94,7 +94,7 @@ static FORCE_INLINE void mix_samples(void *out,
/* Write channel's samples and apply gain factor */
static FORCE_INLINE void write_samples(void *out,
- void *src,
+ const void *src,
int32_t amp,
size_t size)
{
diff --git a/firmware/asm/pcm-mixer.c b/firmware/asm/pcm-mixer.c
index 62dfa3e9db..3e6e2fff78 100644
--- a/firmware/asm/pcm-mixer.c
+++ b/firmware/asm/pcm-mixer.c
@@ -28,9 +28,9 @@
#include "dsp-util.h" /* for clip_sample_16 */
/* Mix channels' samples and apply gain factors */
static FORCE_INLINE void mix_samples(int16_t *out,
- int16_t *src0,
+ const int16_t *src0,
int32_t src0_amp,
- int16_t *src1,
+ const int16_t *src1,
int32_t src1_amp,
size_t size)
{
@@ -64,7 +64,7 @@ static FORCE_INLINE void mix_samples(int16_t *out,
if (src0_amp != MIX_AMP_UNITY)
{
/* Keep unity in src0, amp0 */
- int16_t *src_tmp = src0;
+ const int16_t *src_tmp = src0;
src0 = src1;
src1 = src_tmp;
src1_amp = src0_amp;
@@ -84,7 +84,7 @@ static FORCE_INLINE void mix_samples(int16_t *out,
/* Write channel's samples and apply gain factor */
static FORCE_INLINE void write_samples(int16_t *out,
- int16_t *src,
+ const int16_t *src,
int32_t amp,
size_t size)
{