summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/pcm-x1000.c
diff options
context:
space:
mode:
authorDana Conrad <dconrad@fastmail.com>2021-08-01 21:58:33 -0500
committerAidan MacDonald <amachronic@protonmail.com>2021-08-07 14:21:47 +0000
commit56b0dde5451ddedfd85c82391536e310cd05e1a8 (patch)
tree19d988f8cad0976abd086ee306ecbc840a1d477d /firmware/target/mips/ingenic_x1000/pcm-x1000.c
parent16b009825608164b17dabd877c78123a667b4981 (diff)
downloadrockbox-56b0dde5451ddedfd85c82391536e310cd05e1a8.tar.gz
rockbox-56b0dde5451ddedfd85c82391536e310cd05e1a8.zip
Higher bitdepth software volume scaling
Operates between 0 and -74 dB (mute) without issue Change-Id: I497e002bd8db43833a09ebbc29212fbb6cc8ebfd
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/pcm-x1000.c')
-rw-r--r--firmware/target/mips/ingenic_x1000/pcm-x1000.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/pcm-x1000.c b/firmware/target/mips/ingenic_x1000/pcm-x1000.c
index a3da3411f2..ce2fbb17a9 100644
--- a/firmware/target/mips/ingenic_x1000/pcm-x1000.c
+++ b/firmware/target/mips/ingenic_x1000/pcm-x1000.c
@@ -66,10 +66,17 @@ void pcm_play_dma_init(void)
66 /* Let the target initialize its hardware and setup the AIC */ 66 /* Let the target initialize its hardware and setup the AIC */
67 audiohw_init(); 67 audiohw_init();
68 68
69#if (PCM_NATIVE_BITDEPTH > 16)
70 /* Program audio format (stereo, 24 bit samples) */
71 jz_writef(AIC_CCR, PACK16(0), CHANNEL_V(STEREO),
72 OSS_V(24BIT), ISS_V(24BIT), M2S(0));
73 jz_writef(AIC_I2SCR, SWLH(0));
74#else
69 /* Program audio format (stereo, packed 16 bit samples) */ 75 /* Program audio format (stereo, packed 16 bit samples) */
70 jz_writef(AIC_CCR, PACK16(1), CHANNEL_V(STEREO), 76 jz_writef(AIC_CCR, PACK16(1), CHANNEL_V(STEREO),
71 OSS_V(16BIT), ISS_V(16BIT), M2S(0)); 77 OSS_V(16BIT), ISS_V(16BIT), M2S(0));
72 jz_writef(AIC_I2SCR, SWLH(0)); 78 jz_writef(AIC_I2SCR, SWLH(0));
79#endif
73 80
74 /* Set DMA settings */ 81 /* Set DMA settings */
75 jz_writef(AIC_CFG, TFTH(16), RFTH(16)); 82 jz_writef(AIC_CFG, TFTH(16), RFTH(16));