summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/audio/android.c26
-rw-r--r--firmware/drivers/audio/sdl.c4
-rw-r--r--firmware/drivers/audio/tlv320.c15
3 files changed, 3 insertions, 42 deletions
diff --git a/firmware/drivers/audio/android.c b/firmware/drivers/audio/android.c
index ff36ca21d9..7a5f34ea48 100644
--- a/firmware/drivers/audio/android.c
+++ b/firmware/drivers/audio/android.c
@@ -23,32 +23,6 @@
23#include "config.h" 23#include "config.h"
24#include "audiohw.h" 24#include "audiohw.h"
25 25
26const struct sound_settings_info audiohw_settings[] = {
27 [SOUND_VOLUME] = {"dB", 0, 1, VOLUME_MIN / 10, VOLUME_MAX / 10, -25},
28/* Bass and treble tone controls */
29#ifdef AUDIOHW_HAVE_BASS
30 [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0},
31#endif
32#ifdef AUDIOHW_HAVE_TREBLE
33 [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0},
34#endif
35 [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
36 [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
37 [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
38#if defined(HAVE_RECORDING)
39 [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
40 [SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
41 [SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
42#endif
43#if defined(AUDIOHW_HAVE_BASS_CUTOFF)
44 [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1},
45#endif
46#if defined(AUDIOHW_HAVE_TREBLE_CUTOFF)
47 [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1},
48#endif
49};
50
51
52void audiohw_set_volume(int volume) 26void audiohw_set_volume(int volume)
53{ 27{
54 extern void pcm_set_mixer_volume(int); 28 extern void pcm_set_mixer_volume(int);
diff --git a/firmware/drivers/audio/sdl.c b/firmware/drivers/audio/sdl.c
index eea10ad12c..dfc77378bd 100644
--- a/firmware/drivers/audio/sdl.c
+++ b/firmware/drivers/audio/sdl.c
@@ -21,7 +21,7 @@
21 21
22#include <SDL_audio.h> 22#include <SDL_audio.h>
23#include "config.h" 23#include "config.h"
24#include "audiohw.h" 24#include "sound.h"
25#include "pcm_sampr.h" 25#include "pcm_sampr.h"
26 26
27/** 27/**
@@ -85,6 +85,8 @@ void audiohw_set_treble(int value) { (void)value; }
85#if CONFIG_CODEC != SWCODEC 85#if CONFIG_CODEC != SWCODEC
86void audiohw_set_channel(int value) { (void)value; } 86void audiohw_set_channel(int value) { (void)value; }
87void audiohw_set_stereo_width(int value){ (void)value; } 87void audiohw_set_stereo_width(int value){ (void)value; }
88void audiohw_set_pitch(int32_t value) { (void)value; }
89int32_t audiohw_get_pitch(void) { return PITCH_SPEED_100; }
88#endif 90#endif
89#if defined(AUDIOHW_HAVE_BASS_CUTOFF) 91#if defined(AUDIOHW_HAVE_BASS_CUTOFF)
90void audiohw_set_bass_cutoff(int value) { (void)value; } 92void audiohw_set_bass_cutoff(int value) { (void)value; }
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c
index 23d2fea3a1..6118734d37 100644
--- a/firmware/drivers/audio/tlv320.c
+++ b/firmware/drivers/audio/tlv320.c
@@ -31,21 +31,6 @@
31#endif 31#endif
32#include "audiohw.h" 32#include "audiohw.h"
33 33
34const struct sound_settings_info audiohw_settings[] = {
35 [SOUND_VOLUME] = {"dB", 0, 1, -73, 6, -20},
36 /* HAVE_SW_TONE_CONTROLS */
37 [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0},
38 [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0},
39 [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
40 [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
41 [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
42#ifdef HAVE_RECORDING
43 [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23},
44 [SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 31, 23},
45 [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 1, 1},
46#endif
47};
48
49/* convert tenth of dB volume (-73..6) to master volume register value */ 34/* convert tenth of dB volume (-73..6) to master volume register value */
50static int vol_tenthdb2hw(int db) 35static int vol_tenthdb2hw(int db)
51{ 36{