summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/audiohw.h44
-rw-r--r--firmware/export/wm8758.h4
-rw-r--r--firmware/export/wm8985.h4
3 files changed, 40 insertions, 12 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index 4c9271e03e..5842ff7d3b 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -24,11 +24,13 @@
#include <stdbool.h>
/* define some audiohw caps */
-#define TREBLE_CAP (1 << 0)
-#define BASS_CAP (1 << 1)
-#define BALANCE_CAP (1 << 2)
-#define CLIPPING_CAP (1 << 3)
-#define PRESCALER_CAP (1 << 4)
+#define TREBLE_CAP (1 << 0)
+#define BASS_CAP (1 << 1)
+#define BALANCE_CAP (1 << 2)
+#define CLIPPING_CAP (1 << 3)
+#define PRESCALER_CAP (1 << 4)
+#define BASS_CUTOFF_CAP (1 << 5)
+#define TREBLE_CUTOFF_CAP (1 << 6)
#ifdef HAVE_UDA1380
#include "uda1380.h"
@@ -77,6 +79,14 @@
#if (AUDIOHW_CAPS & PRESCALER_CAP)
#define AUDIOHW_HAVE_PRESCALER
#endif
+
+#if (AUDIOHW_CAPS & BASS_CUTOFF_CAP)
+#define AUDIOHW_HAVE_BASS_CUTOFF
+#endif
+
+#if (AUDIOHW_CAPS & TREBLE_CUTOFF_CAP)
+#define AUDIOHW_HAVE_TREBLE_CUTOFF
+#endif
#endif /* AUDIOHW_CAPS */
enum {
@@ -103,8 +113,10 @@ enum {
SOUND_RIGHT_GAIN,
SOUND_MIC_GAIN,
#endif
-#if defined(HAVE_WM8758) || defined(HAVE_WM8985)
+#if defined(AUDIOHW_HAVE_BASS_CUTOFF)
SOUND_BASS_CUTOFF,
+#endif
+#if defined(AUDIOHW_HAVE_TREBLE_CUTOFF)
SOUND_TREBLE_CUTOFF,
#endif
};
@@ -221,6 +233,26 @@ void audiohw_set_treble(int val);
void audiohw_set_bass(int val);
#endif
+#ifdef AUDIOHW_HAVE_BASS_CUTOFF
+/**
+ * Set new bass cut off value.
+ * @param val to set.
+ * NOTE: AUDIOHW_CAPS need to contain
+ * BASS_CUTOFF_CAP
+ */
+void audiohw_set_bass_cutoff(int val);
+#endif
+
+#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF
+/**
+ * Set new treble cut off value.
+ * @param val to set.
+ * NOTE: AUDIOHW_CAPS need to contain
+ * TREBLE_CUTOFF_CAP
+ */
+void audiohw_set_treble_cutoff(int val);
+#endif
+
#ifdef HAVE_RECORDING
/**
diff --git a/firmware/export/wm8758.h b/firmware/export/wm8758.h
index 5e37e203d5..6c1987c3e8 100644
--- a/firmware/export/wm8758.h
+++ b/firmware/export/wm8758.h
@@ -24,7 +24,7 @@
#define VOLUME_MIN -570
#define VOLUME_MAX 60
-#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP)
+#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP | BASS_CUTOFF_CAP | TREBLE_CUTOFF_CAP)
extern int tenthdb2master(int db);
extern int tenthdb2mixer(int db);
@@ -32,8 +32,6 @@ extern int tenthdb2mixer(int db);
extern void audiohw_set_master_vol(int vol_l, int vol_r);
extern void audiohw_set_lineout_vol(int vol_l, int vol_r);
extern void audiohw_set_mixer_vol(int channel1, int channel2);
-extern void audiohw_set_bass_cutoff(int value);
-extern void audiohw_set_treble_cutoff(int value);
extern void audiohw_set_nsorder(int order);
extern void audiohw_set_sample_rate(int sampling_control);
diff --git a/firmware/export/wm8985.h b/firmware/export/wm8985.h
index 8696e3dd6f..f59bc771bd 100644
--- a/firmware/export/wm8985.h
+++ b/firmware/export/wm8985.h
@@ -24,7 +24,7 @@
#define VOLUME_MIN -570
#define VOLUME_MAX 60
-#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP)
+#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP | BASS_CUTOFF_CAP | TREBLE_CUTOFF_CAP)
extern int tenthdb2master(int db);
extern int tenthdb2mixer(int db);
@@ -32,8 +32,6 @@ extern int tenthdb2mixer(int db);
extern void audiohw_set_master_vol(int vol_l, int vol_r);
extern void audiohw_set_lineout_vol(int vol_l, int vol_r);
extern void audiohw_set_mixer_vol(int channel1, int channel2);
-extern void audiohw_set_bass_cutoff(int value);
-extern void audiohw_set_treble_cutoff(int value);
extern void audiohw_set_nsorder(int order);
extern void audiohw_set_sample_rate(int sampling_control);