summaryrefslogtreecommitdiff
path: root/firmware/export/es9018k2m.h
diff options
context:
space:
mode:
authorDana Conrad <dconrad@fastmail.com>2023-12-03 15:07:26 -0600
committerAidan MacDonald <amachronic@protonmail.com>2024-01-02 08:19:23 -0500
commit8cc7476735dd3f9f9e3f5b1356eadc4ef40c23b4 (patch)
tree23891c54ebb8e6adaea8b8382830c7e29ad7475d /firmware/export/es9018k2m.h
parenta3fe07ff128e521051aee8bc91add071724d6538 (diff)
downloadrockbox-8cc7476735dd3f9f9e3f5b1356eadc4ef40c23b4.tar.gz
rockbox-8cc7476735dd3f9f9e3f5b1356eadc4ef40c23b4.zip
ErosQ Native ES9018K2M: Add digital filters capability
Setting not yet hidden for older hardware revision. Change-Id: Iaaa5727e63c38de578a6bbc73498ae1073180e65
Diffstat (limited to 'firmware/export/es9018k2m.h')
-rw-r--r--firmware/export/es9018k2m.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/firmware/export/es9018k2m.h b/firmware/export/es9018k2m.h
index 035a607030..2824fed505 100644
--- a/firmware/export/es9018k2m.h
+++ b/firmware/export/es9018k2m.h
@@ -25,6 +25,13 @@
25 25
26//====================================================================================== 26//======================================================================================
27// ES9018K2M support stuff 27// ES9018K2M support stuff
28// Implement audiohw_* functions in audiohw-*.c. These functions are utilities which
29// may be used there.
30
31// AUDIOHW_SETTING(VOLUME, *) not set here, probably best to put it in device-specific *_codec.h
32#ifdef AUDIOHW_HAVE_SHORT_ROLL_OFF
33AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 3, 0)
34#endif
28 35
29#ifndef ES9018K2M_VOLUME_MIN 36#ifndef ES9018K2M_VOLUME_MIN
30# define ES9018K2M_VOLUME_MIN -1270 37# define ES9018K2M_VOLUME_MIN -1270
@@ -50,8 +57,11 @@
50#define ES9018K2M_REG16_VOLUME_R 16 57#define ES9018K2M_REG16_VOLUME_R 16
51#define ES9018K2M_REG21_GPIO_INPUT_SELECT 21 58#define ES9018K2M_REG21_GPIO_INPUT_SELECT 21
52 59
53/* writes volume levels to DAC over I2C */ 60/* writes volume levels to DAC over I2C, asynchronously */
54void es9018k2m_set_volume(int vol_l, int vol_r); 61void es9018k2m_set_volume_async(int vol_l, int vol_r);
62
63/* write filter roll-off setting to DAC over I2C, synchronously */
64void es9018k2m_set_filter_roll_off(int value);
55 65
56/* writes a single register */ 66/* writes a single register */
57/* returns I2C_STATUS_OK upon success, I2C_STATUS_* errors upon error */ 67/* returns I2C_STATUS_OK upon success, I2C_STATUS_* errors upon error */