Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index 1774932..65378c7 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -68,7 +68,7 @@ const struct sound_settings_info audiohw_settings[] = {
     /* HAVE_SW_TONE_CONTROLS */
     [SOUND_BASS]          = {"dB",   0,   1, -24,  24,   0},
     [SOUND_TREBLE]        = {"dB",   0,   1, -24,  24,   0},
-    [SOUND_BALANCE]       = {"%",    0,   1,-100, 100,   0},
+    [SOUND_BALANCE]       = {"dB",   1,   5, VOLUME_MIN, -VOLUME_MIN,   0},
     [SOUND_CHANNELS]      = {"",     0,   1,   0,   5,   0},
     [SOUND_STEREO_WIDTH]  = {"%",    0,   5,   0, 250, 100},
 #ifdef HAVE_RECORDING
diff --git a/firmware/sound.c b/firmware/sound.c
index 4dea2b8..3a90e5a 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -235,11 +235,11 @@ static void set_prescaled_volume(void)
     /* Subtract a dB from VOLUME_MIN to get it to a mute level */
     if (current_balance > 0)
     {
-        l -= ((l - (VOLUME_MIN - ONE_DB)) * current_balance) / VOLUME_RANGE;
+        l -= current_balance;
     }
     else if (current_balance < 0)
     {
-        r += ((r - (VOLUME_MIN - ONE_DB)) * current_balance) / VOLUME_RANGE;
+        r += current_balance;
     }
 
 #ifdef HAVE_SW_VOLUME_CONTROL
@@ -296,7 +296,7 @@ void sound_set_balance(int value)
 #ifdef AUDIOHW_HAVE_BALANCE
     audiohw_set_balance(value);
 #else
-    current_balance = value * VOLUME_RANGE / 100; /* tenth of dB */
+    current_balance = value; /* tenth of dB */
     set_prescaled_volume();
 #endif
 }