diff options
author | Dana Conrad <dconrad@fastmail.com> | 2021-08-01 21:58:33 -0500 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-08-07 14:21:47 +0000 |
commit | 56b0dde5451ddedfd85c82391536e310cd05e1a8 (patch) | |
tree | 19d988f8cad0976abd086ee306ecbc840a1d477d /firmware/target | |
parent | 16b009825608164b17dabd877c78123a667b4981 (diff) |
Higher bitdepth software volume scaling
Operates between 0 and -74 dB (mute) without issue
Change-Id: I497e002bd8db43833a09ebbc29212fbb6cc8ebfd
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/pcm-x1000.c | 7 |
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) /* Let the target initialize its hardware and setup the AIC */ audiohw_init(); +#if (PCM_NATIVE_BITDEPTH > 16) + /* Program audio format (stereo, 24 bit samples) */ + jz_writef(AIC_CCR, PACK16(0), CHANNEL_V(STEREO), + OSS_V(24BIT), ISS_V(24BIT), M2S(0)); + jz_writef(AIC_I2SCR, SWLH(0)); +#else /* Program audio format (stereo, packed 16 bit samples) */ jz_writef(AIC_CCR, PACK16(1), CHANNEL_V(STEREO), OSS_V(16BIT), ISS_V(16BIT), M2S(0)); jz_writef(AIC_I2SCR, SWLH(0)); +#endif /* Set DMA settings */ jz_writef(AIC_CFG, TFTH(16), RFTH(16)); |