diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-08-07 11:14:15 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-08-07 11:18:19 -0400 |
commit | 39fff5cb5330c1b65ad49b094b54d60078e8a31e (patch) | |
tree | 9b492d8269ba0be76f11f516866df2b25cfd504a | |
parent | eeb0aaf36f6d3a322e716d202efc2754735a6280 (diff) | |
download | rockbox-39fff5cb5330c1b65ad49b094b54d60078e8a31e.tar.gz rockbox-39fff5cb5330c1b65ad49b094b54d60078e8a31e.zip |
move PCM_NATIVE_BITDEPTH definiton into global config code
Change-Id: I391bcffca670916c2c88426e2ba2603351326cee
-rw-r--r-- | firmware/export/audiohw.h | 5 | ||||
-rw-r--r-- | firmware/pcm_sw_volume.c | 5 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_x1000/pcm-x1000.c | 5 |
3 files changed, 5 insertions, 10 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index 5a706da3b8..3f1bcb6feb 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h | |||
@@ -692,4 +692,9 @@ AUDIOHW_SETTING(BALANCE, "%", 0, 1, -100, 100, 0) | |||
692 | AUDIOHW_SETTING(CHANNELS, "", 0, 1, 0, 5, 0) | 692 | AUDIOHW_SETTING(CHANNELS, "", 0, 1, 0, 5, 0) |
693 | AUDIOHW_SETTING(STEREO_WIDTH, "%", 0, 5, 0, 250, 100) | 693 | AUDIOHW_SETTING(STEREO_WIDTH, "%", 0, 5, 0, 250, 100) |
694 | 694 | ||
695 | /* if not otherwise defined, set to 16 */ | ||
696 | #if !defined(PCM_NATIVE_BITDEPTH) | ||
697 | # define PCM_NATIVE_BITDEPTH 16 | ||
698 | #endif | ||
699 | |||
695 | #endif /* _AUDIOHW_H_ */ | 700 | #endif /* _AUDIOHW_H_ */ |
diff --git a/firmware/pcm_sw_volume.c b/firmware/pcm_sw_volume.c index 646f2a680a..bee1559bb8 100644 --- a/firmware/pcm_sw_volume.c +++ b/firmware/pcm_sw_volume.c | |||
@@ -49,11 +49,6 @@ static uint32_t pcm_new_factor_l = 0, pcm_new_factor_r = 0; | |||
49 | static uint32_t pcm_factor_l = 0, pcm_factor_r = 0; | 49 | static uint32_t pcm_factor_l = 0, pcm_factor_r = 0; |
50 | static typeof (memcpy) *pcm_scaling_fn = NULL; | 50 | static typeof (memcpy) *pcm_scaling_fn = NULL; |
51 | 51 | ||
52 | /* default to 16-bit volume scaling unless specified */ | ||
53 | #if !defined(PCM_NATIVE_BITDEPTH) | ||
54 | # define PCM_NATIVE_BITDEPTH 16 | ||
55 | #endif | ||
56 | |||
57 | /* take care of some defines for 32-bit software vol */ | 52 | /* take care of some defines for 32-bit software vol */ |
58 | #if (PCM_NATIVE_BITDEPTH > 16) /* >16-bit */ | 53 | #if (PCM_NATIVE_BITDEPTH > 16) /* >16-bit */ |
59 | 54 | ||
diff --git a/firmware/target/mips/ingenic_x1000/pcm-x1000.c b/firmware/target/mips/ingenic_x1000/pcm-x1000.c index 73c568c950..ce2fbb17a9 100644 --- a/firmware/target/mips/ingenic_x1000/pcm-x1000.c +++ b/firmware/target/mips/ingenic_x1000/pcm-x1000.c | |||
@@ -48,11 +48,6 @@ static void pcm_play_dma_int_cb(int event); | |||
48 | static void pcm_rec_dma_int_cb(int event); | 48 | static void pcm_rec_dma_int_cb(int event); |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | /* if not otherwise defined, set to 16 */ | ||
52 | #if !defined(PCM_NATIVE_BITDEPTH) | ||
53 | # define PCM_NATIVE_BITDEPTH 16 | ||
54 | #endif | ||
55 | |||
56 | void pcm_play_dma_init(void) | 51 | void pcm_play_dma_init(void) |
57 | { | 52 | { |
58 | /* Ungate clock, assign pins. NB this overlaps with pins labeled "sa0-sa4" | 53 | /* Ungate clock, assign pins. NB this overlaps with pins labeled "sa0-sa4" |