summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/audio/tlv320.c2
-rw-r--r--firmware/drivers/audio/wm8985.c2
-rw-r--r--firmware/sound.c3
3 files changed, 6 insertions, 1 deletions
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c
index 8839078..d3669a2 100644
--- a/firmware/drivers/audio/tlv320.c
+++ b/firmware/drivers/audio/tlv320.c
@@ -37,9 +37,11 @@ const struct sound_settings_info audiohw_settings[] = {
[SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
+#ifdef HAVE_RECORDING
[SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 31, 23},
[SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 1, 1},
+#endif
};
/* convert tenth of dB volume (-840..0) to master volume register value */
diff --git a/firmware/drivers/audio/wm8985.c b/firmware/drivers/audio/wm8985.c
index 95afbd9..6f8d659 100644
--- a/firmware/drivers/audio/wm8985.c
+++ b/firmware/drivers/audio/wm8985.c
@@ -105,9 +105,11 @@ const struct sound_settings_info audiohw_settings[] = {
[SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
+#ifdef HAVE_RECORDING
[SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
+#endif
[SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1},
[SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1},
};
diff --git a/firmware/sound.c b/firmware/sound.c
index d33addb..2cf6ad0 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -665,6 +665,7 @@ int sound_val2phys(int setting, int value)
switch(setting)
{
+#ifdef HAVE_RECORDING
case SOUND_LEFT_GAIN:
case SOUND_RIGHT_GAIN:
result = (value - 23) * 15; /* (x - 23)/1.5 *10 */
@@ -673,7 +674,7 @@ int sound_val2phys(int setting, int value)
case SOUND_MIC_GAIN:
result = value * 200; /* 0 or 20 dB */
break;
-
+#endif
default:
result = value;
break;