summaryrefslogtreecommitdiff
path: root/firmware/drivers/audio/tsc2100.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/audio/tsc2100.c')
-rw-r--r--firmware/drivers/audio/tsc2100.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/audio/tsc2100.c b/firmware/drivers/audio/tsc2100.c
index fda192a62a..b74d445056 100644
--- a/firmware/drivers/audio/tsc2100.c
+++ b/firmware/drivers/audio/tsc2100.c
@@ -34,12 +34,12 @@ static bool is_muted = false;
34static int vol_tenthdb2hw(int db) 34static int vol_tenthdb2hw(int db)
35{ 35{
36 /* 0 to -63.0dB in 1dB steps, tsc2100 can goto -63.5 in 0.5dB steps */ 36 /* 0 to -63.0dB in 1dB steps, tsc2100 can goto -63.5 in 0.5dB steps */
37 if (db < VOLUME_MIN) { 37 if (db <= -640) {
38 return 0x7E; 38 return 0x7E;
39 } else if (db >= VOLUME_MAX) { 39 } else if (db >= 0) {
40 return 0x00; 40 return 0x00;
41 } else { 41 } else {
42 return(-((db)/5)); /* VOLUME_MIN is negative */ 42 return(-((db)/5));
43 } 43 }
44} 44}
45 45