diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/audio/as3514.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/mas35xx.c | 3 | ||||
-rw-r--r-- | firmware/drivers/audio/tlv320.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/uda1380.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8721.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8731.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8751.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8758.c | 2 | ||||
-rw-r--r-- | firmware/drivers/audio/wm8975.c | 2 | ||||
-rw-r--r-- | firmware/sound.c | 6 |
10 files changed, 12 insertions, 13 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index 413b32e8d7..2dc1513668 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c | |||
@@ -33,7 +33,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
33 | /* HAVE_SW_TONE_CONTROLS */ | 33 | /* HAVE_SW_TONE_CONTROLS */ |
34 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, | 34 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, |
35 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, | 35 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, |
36 | [SOUND_BALANCE] = {"dB", 0, 1, -80, 80, 0}, | 36 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
37 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 37 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
38 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 38 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
39 | [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 39, 23}, | 39 | [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 39, 23}, |
diff --git a/firmware/drivers/audio/mas35xx.c b/firmware/drivers/audio/mas35xx.c index 2a7a37aac4..813b02e1ca 100644 --- a/firmware/drivers/audio/mas35xx.c +++ b/firmware/drivers/audio/mas35xx.c | |||
@@ -28,13 +28,12 @@ const struct sound_settings_info audiohw_settings[] = { | |||
28 | [SOUND_VOLUME] = {"dB", 0, 1,-100, 12, -25}, | 28 | [SOUND_VOLUME] = {"dB", 0, 1,-100, 12, -25}, |
29 | [SOUND_BASS] = {"dB", 0, 1, -12, 12, 6}, | 29 | [SOUND_BASS] = {"dB", 0, 1, -12, 12, 6}, |
30 | [SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 6}, | 30 | [SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 6}, |
31 | [SOUND_BALANCE] = {"dB", 0, 1,-128, 127, 0}, | ||
32 | #else /* MAS3507D */ | 31 | #else /* MAS3507D */ |
33 | [SOUND_VOLUME] = {"dB", 0, 1, -78, 18, -18}, | 32 | [SOUND_VOLUME] = {"dB", 0, 1, -78, 18, -18}, |
34 | [SOUND_BASS] = {"dB", 0, 1, -15, 15, 7}, | 33 | [SOUND_BASS] = {"dB", 0, 1, -15, 15, 7}, |
35 | [SOUND_TREBLE] = {"dB", 0, 1, -15, 15, 7}, | 34 | [SOUND_TREBLE] = {"dB", 0, 1, -15, 15, 7}, |
36 | [SOUND_BALANCE] = {"dB", 0, 1, -96, 96, 0}, | ||
37 | #endif | 35 | #endif |
36 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, | ||
38 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 37 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
39 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 38 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
40 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 39 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c index 121362acaa..c0f37302fc 100644 --- a/firmware/drivers/audio/tlv320.c +++ b/firmware/drivers/audio/tlv320.c | |||
@@ -29,7 +29,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
29 | /* HAVE_SW_TONE_CONTROLS */ | 29 | /* HAVE_SW_TONE_CONTROLS */ |
30 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, | 30 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, |
31 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, | 31 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, |
32 | [SOUND_BALANCE] = {"dB", 0, 1, -79, 79, 0}, | 32 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
33 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 33 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
34 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 34 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
35 | [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23}, | 35 | [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23}, |
diff --git a/firmware/drivers/audio/uda1380.c b/firmware/drivers/audio/uda1380.c index 2a7c2129ae..91bc9a1a8e 100644 --- a/firmware/drivers/audio/uda1380.c +++ b/firmware/drivers/audio/uda1380.c | |||
@@ -30,7 +30,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
30 | [SOUND_VOLUME] = {"dB", 0, 1, -84, 0, -25}, | 30 | [SOUND_VOLUME] = {"dB", 0, 1, -84, 0, -25}, |
31 | [SOUND_BASS] = {"dB", 0, 2, 0, 24, 0}, | 31 | [SOUND_BASS] = {"dB", 0, 2, 0, 24, 0}, |
32 | [SOUND_TREBLE] = {"dB", 0, 2, 0, 6, 0}, | 32 | [SOUND_TREBLE] = {"dB", 0, 2, 0, 6, 0}, |
33 | [SOUND_BALANCE] = {"dB", 0, 1, -84, 84, 0}, | 33 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
34 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 34 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
35 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 35 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
36 | [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, | 36 | [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, |
diff --git a/firmware/drivers/audio/wm8721.c b/firmware/drivers/audio/wm8721.c index 0efbd8570d..dd3c1332fc 100644 --- a/firmware/drivers/audio/wm8721.c +++ b/firmware/drivers/audio/wm8721.c | |||
@@ -43,7 +43,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
43 | /* HAVE_SW_TONE_CONTROLS */ | 43 | /* HAVE_SW_TONE_CONTROLS */ |
44 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, | 44 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, |
45 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, | 45 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, |
46 | [SOUND_BALANCE] = {"dB", 0, 1, -80, 80, 0}, | 46 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
47 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 47 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
48 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 48 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
49 | }; | 49 | }; |
diff --git a/firmware/drivers/audio/wm8731.c b/firmware/drivers/audio/wm8731.c index 48c8a6db15..e0e7cb38c0 100644 --- a/firmware/drivers/audio/wm8731.c +++ b/firmware/drivers/audio/wm8731.c | |||
@@ -38,7 +38,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
38 | /* HAVE_SW_TONE_CONTROLS */ | 38 | /* HAVE_SW_TONE_CONTROLS */ |
39 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, | 39 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, |
40 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, | 40 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, |
41 | [SOUND_BALANCE] = {"dB", 0, 1, -80, 80, 0}, | 41 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
42 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 42 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
43 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 43 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
44 | #ifdef HAVE_RECORDING | 44 | #ifdef HAVE_RECORDING |
diff --git a/firmware/drivers/audio/wm8751.c b/firmware/drivers/audio/wm8751.c index 0b511f8857..78e129803e 100644 --- a/firmware/drivers/audio/wm8751.c +++ b/firmware/drivers/audio/wm8751.c | |||
@@ -37,7 +37,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
37 | [SOUND_BASS] = {"dB", 1, 15, -60, 90, 0}, | 37 | [SOUND_BASS] = {"dB", 1, 15, -60, 90, 0}, |
38 | #endif | 38 | #endif |
39 | [SOUND_TREBLE] = {"dB", 1, 15, -60, 90, 0}, | 39 | [SOUND_TREBLE] = {"dB", 1, 15, -60, 90, 0}, |
40 | [SOUND_BALANCE] = {"dB", 0, 1, -80, 80, 0}, | 40 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
41 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 41 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
42 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 42 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
43 | }; | 43 | }; |
diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c index 02719f0b9d..a9f10fbe67 100644 --- a/firmware/drivers/audio/wm8758.c +++ b/firmware/drivers/audio/wm8758.c | |||
@@ -35,7 +35,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
35 | [SOUND_VOLUME] = {"dB", 0, 1, -58, 6, -25}, | 35 | [SOUND_VOLUME] = {"dB", 0, 1, -58, 6, -25}, |
36 | [SOUND_BASS] = {"dB", 0, 1, -12, 12, 0}, | 36 | [SOUND_BASS] = {"dB", 0, 1, -12, 12, 0}, |
37 | [SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 0}, | 37 | [SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 0}, |
38 | [SOUND_BALANCE] = {"dB", 0, 1, -64, 64, 0}, | 38 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
39 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 39 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
40 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 40 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
41 | [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, | 41 | [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, |
diff --git a/firmware/drivers/audio/wm8975.c b/firmware/drivers/audio/wm8975.c index 1603d42eea..7762224254 100644 --- a/firmware/drivers/audio/wm8975.c +++ b/firmware/drivers/audio/wm8975.c | |||
@@ -39,7 +39,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
39 | [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25}, | 39 | [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25}, |
40 | [SOUND_BASS] = {"dB", 0, 1, -6, 9, 0}, | 40 | [SOUND_BASS] = {"dB", 0, 1, -6, 9, 0}, |
41 | [SOUND_TREBLE] = {"dB", 0, 1, -6, 9, 0}, | 41 | [SOUND_TREBLE] = {"dB", 0, 1, -6, 9, 0}, |
42 | [SOUND_BALANCE] = {"dB", 0, 1, -80, 80, 0}, | 42 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
43 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 43 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
44 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 44 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
45 | [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, | 45 | [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, |
diff --git a/firmware/sound.c b/firmware/sound.c index 2dd5522e38..5a1a1e97b7 100644 --- a/firmware/sound.c +++ b/firmware/sound.c | |||
@@ -61,7 +61,7 @@ const struct sound_settings_info audiohw_settings[] = { | |||
61 | [SOUND_VOLUME] = {"dB", 0, 1, VOLUME_MIN / 10, VOLUME_MAX / 10, -25}, | 61 | [SOUND_VOLUME] = {"dB", 0, 1, VOLUME_MIN / 10, VOLUME_MAX / 10, -25}, |
62 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, | 62 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, |
63 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, | 63 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, |
64 | [SOUND_BALANCE] = {"dB", 0, 1, VOLUME_RANGE / 10, -VOLUME_RANGE / 10, 0}, | 64 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, |
65 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | 65 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, |
66 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | 66 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, |
67 | #if CONFIG_CODEC == MAS3587F || defined(HAVE_UDA1380) || defined(HAVE_TLV320)\ | 67 | #if CONFIG_CODEC == MAS3587F || defined(HAVE_UDA1380) || defined(HAVE_TLV320)\ |
@@ -418,13 +418,13 @@ void sound_set_balance(int value) | |||
418 | if(!audio_is_initialized) | 418 | if(!audio_is_initialized) |
419 | return; | 419 | return; |
420 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 420 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
421 | unsigned tmp = ((unsigned)(value) & 0xff) << 8; | 421 | unsigned tmp = ((unsigned)(value * 127 / 100) & 0xff) << 8; |
422 | mas_codec_writereg(0x11, tmp); | 422 | mas_codec_writereg(0x11, tmp); |
423 | #elif CONFIG_CODEC == MAS3507D || defined HAVE_UDA1380 \ | 423 | #elif CONFIG_CODEC == MAS3507D || defined HAVE_UDA1380 \ |
424 | || defined HAVE_WM8975 || defined HAVE_WM8758 || defined HAVE_WM8731 \ | 424 | || defined HAVE_WM8975 || defined HAVE_WM8758 || defined HAVE_WM8731 \ |
425 | || defined(HAVE_WM8721) || defined(HAVE_TLV320) || defined(HAVE_WM8751) \ | 425 | || defined(HAVE_WM8721) || defined(HAVE_TLV320) || defined(HAVE_WM8751) \ |
426 | || defined(HAVE_AS3514) | 426 | || defined(HAVE_AS3514) |
427 | current_balance = value * 10; /* tenth of dB */ | 427 | current_balance = value * VOLUME_RANGE / 100; /* tenth of dB */ |
428 | set_prescaled_volume(); | 428 | set_prescaled_volume(); |
429 | #elif CONFIG_CPU == PNX0101 | 429 | #elif CONFIG_CPU == PNX0101 |
430 | /* TODO: implement for iFP */ | 430 | /* TODO: implement for iFP */ |