diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-04-08 23:58:49 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-04-08 23:58:49 -0400 |
commit | 1e2a9a651c26b7526530428b248132e02624bb84 (patch) | |
tree | 190d6e83db300c43481c62b94d2ff7d4cc59db08 /firmware/target/hosted/pcm-alsa.c | |
parent | e86d90905be290ff24a774e9687eca3236953490 (diff) | |
download | rockbox-1e2a9a651c26b7526530428b248132e02624bb84.tar.gz rockbox-1e2a9a651c26b7526530428b248132e02624bb84.zip |
erosq: Switch to 32-bit PCM output, and do volume scaling in driver
Should improve audio output quality, especially at lower volumes.
Change-Id: I31c38f05fe4b554b092511f0fe7aaad9f346f6c5
Diffstat (limited to 'firmware/target/hosted/pcm-alsa.c')
-rw-r--r-- | firmware/target/hosted/pcm-alsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/hosted/pcm-alsa.c b/firmware/target/hosted/pcm-alsa.c index 16f82bad5c..81c0a19a45 100644 --- a/firmware/target/hosted/pcm-alsa.c +++ b/firmware/target/hosted/pcm-alsa.c | |||
@@ -277,7 +277,7 @@ static int dig_vol_mult_r = 2 << 16; /* multiplicative factor to apply to each s | |||
277 | void pcm_set_mixer_volume(int vol_db_l, int vol_db_r) | 277 | void pcm_set_mixer_volume(int vol_db_l, int vol_db_r) |
278 | { | 278 | { |
279 | if(vol_db_l > 0 || vol_db_r > 0 || vol_db_l < -43 || vol_db_r < -43) | 279 | if(vol_db_l > 0 || vol_db_r > 0 || vol_db_l < -43 || vol_db_r < -43) |
280 | panicf("invalid pcm alsa volume"); | 280 | panicf("invalid pcm alsa volume %d %d", vol_db_l, vol_db_r); |
281 | if(format != SND_PCM_FORMAT_S32_LE) | 281 | if(format != SND_PCM_FORMAT_S32_LE) |
282 | panicf("this function assumes 32-bit sample size"); | 282 | panicf("this function assumes 32-bit sample size"); |
283 | vol_db_l += 48; /* -42dB .. 0dB => 5dB .. 48dB */ | 283 | vol_db_l += 48; /* -42dB .. 0dB => 5dB .. 48dB */ |