mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
ErosQ Native ES9018K2M: Add digital filters capability
Setting not yet hidden for older hardware revision. Change-Id: Iaaa5727e63c38de578a6bbc73498ae1073180e65
This commit is contained in:
parent
a3fe07ff12
commit
8cc7476735
5 changed files with 70 additions and 8 deletions
|
|
@ -63,6 +63,8 @@
|
|||
#define HAVE_EROS_QN_CODEC
|
||||
#define HAVE_SW_TONE_CONTROLS
|
||||
#define HAVE_SW_VOLUME_CONTROL
|
||||
#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP)
|
||||
#define AUDIOHW_HAVE_SHORT_ROLL_OFF
|
||||
|
||||
/* use high-bitdepth volume scaling */
|
||||
#define PCM_NATIVE_BITDEPTH 24
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@
|
|||
|
||||
//======================================================================================
|
||||
// ES9018K2M support stuff
|
||||
// Implement audiohw_* functions in audiohw-*.c. These functions are utilities which
|
||||
// may be used there.
|
||||
|
||||
// AUDIOHW_SETTING(VOLUME, *) not set here, probably best to put it in device-specific *_codec.h
|
||||
#ifdef AUDIOHW_HAVE_SHORT_ROLL_OFF
|
||||
AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 3, 0)
|
||||
#endif
|
||||
|
||||
#ifndef ES9018K2M_VOLUME_MIN
|
||||
# define ES9018K2M_VOLUME_MIN -1270
|
||||
|
|
@ -50,8 +57,11 @@
|
|||
#define ES9018K2M_REG16_VOLUME_R 16
|
||||
#define ES9018K2M_REG21_GPIO_INPUT_SELECT 21
|
||||
|
||||
/* writes volume levels to DAC over I2C */
|
||||
void es9018k2m_set_volume(int vol_l, int vol_r);
|
||||
/* writes volume levels to DAC over I2C, asynchronously */
|
||||
void es9018k2m_set_volume_async(int vol_l, int vol_r);
|
||||
|
||||
/* write filter roll-off setting to DAC over I2C, synchronously */
|
||||
void es9018k2m_set_filter_roll_off(int value);
|
||||
|
||||
/* writes a single register */
|
||||
/* returns I2C_STATUS_OK upon success, I2C_STATUS_* errors upon error */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue