summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/audiohw.h16
-rw-r--r--firmware/export/audiohw_settings.h3
-rw-r--r--firmware/export/sound.h4
3 files changed, 23 insertions, 0 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index d1579b5b93..1cabf6f782 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -40,6 +40,7 @@
40#define MONO_VOL_CAP (1 << 10) 40#define MONO_VOL_CAP (1 << 10)
41#define LIN_GAIN_CAP (1 << 11) 41#define LIN_GAIN_CAP (1 << 11)
42#define MIC_GAIN_CAP (1 << 12) 42#define MIC_GAIN_CAP (1 << 12)
43#define FILTER_ROLL_OFF_CAP (1 << 13)
43 44
44/* Used by every driver to export its min/max/default values for its audio 45/* Used by every driver to export its min/max/default values for its audio
45 settings. */ 46 settings. */
@@ -269,6 +270,11 @@ enum AUDIOHW_EQ_SETTINGS
269#define AUDIOHW_HAVE_MIC_GAIN 270#define AUDIOHW_HAVE_MIC_GAIN
270#endif 271#endif
271#endif /* HAVE_RECORDING */ 272#endif /* HAVE_RECORDING */
273
274#if (AUDIOHW_CAPS & FILTER_ROLL_OFF_CAP)
275#define AUDIOHW_HAVE_FILTER_ROLL_OFF
276#endif
277
272#endif /* AUDIOHW_CAPS */ 278#endif /* AUDIOHW_CAPS */
273 279
274#ifdef HAVE_SW_TONE_CONTROLS 280#ifdef HAVE_SW_TONE_CONTROLS
@@ -454,6 +460,16 @@ void audiohw_set_eq_band_width(unsigned int band, int val);
454void audiohw_set_depth_3d(int val); 460void audiohw_set_depth_3d(int val);
455#endif 461#endif
456 462
463#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
464/**
465 * Set DAC's oversampling filter roll-off.
466 * @param val 0 - sharp roll-off, 1 - slow roll-off.
467 * NOTE: AUDIOHW_CAPS need to contain
468 * FILTER_ROLL_OFF_CAP
469 */
470void audiohw_set_filter_roll_off(int val);
471#endif
472
457 473
458void audiohw_set_frequency(int fsel); 474void audiohw_set_frequency(int fsel);
459 475
diff --git a/firmware/export/audiohw_settings.h b/firmware/export/audiohw_settings.h
index f934c96302..675ec59a7b 100644
--- a/firmware/export/audiohw_settings.h
+++ b/firmware/export/audiohw_settings.h
@@ -110,6 +110,9 @@ AUDIOHW_SETTINGS(
110#if defined(AUDIOHW_HAVE_DEPTH_3D) 110#if defined(AUDIOHW_HAVE_DEPTH_3D)
111 AUDIOHW_SETTING_ENT(DEPTH_3D, sound_set_depth_3d) 111 AUDIOHW_SETTING_ENT(DEPTH_3D, sound_set_depth_3d)
112#endif 112#endif
113#if defined(AUDIOHW_HAVE_FILTER_ROLL_OFF)
114 AUDIOHW_SETTING_ENT(FILTER_ROLL_OFF, sound_set_filter_roll_off)
115#endif
113/* Hardware EQ tone controls */ 116/* Hardware EQ tone controls */
114#if defined(AUDIOHW_HAVE_EQ) 117#if defined(AUDIOHW_HAVE_EQ)
115 AUDIOHW_SETTING_ENT(EQ_BAND1_GAIN, sound_set_hw_eq_band1_gain) 118 AUDIOHW_SETTING_ENT(EQ_BAND1_GAIN, sound_set_hw_eq_band1_gain)
diff --git a/firmware/export/sound.h b/firmware/export/sound.h
index fa76c67b1f..501c6a48a1 100644
--- a/firmware/export/sound.h
+++ b/firmware/export/sound.h
@@ -51,6 +51,10 @@ void sound_set_treble_cutoff(int value);
51void sound_set_depth_3d(int value); 51void sound_set_depth_3d(int value);
52#endif 52#endif
53 53
54#if defined(AUDIOHW_HAVE_FILTER_ROLL_OFF)
55void sound_set_filter_roll_off(int value);
56#endif
57
54#ifdef AUDIOHW_HAVE_EQ 58#ifdef AUDIOHW_HAVE_EQ
55/* 59/*
56 * band = SOUND_EQ_BANDb 60 * band = SOUND_EQ_BANDb