iBasso DX50: Digital filter roll off setting.

This patch enables "Settings -> Sound Settings -> DAC's filter roll-off" for the
iBasso DX50.

Confirmed working on iBasso DX50, firmware 1.6.

Change-Id: I901615541d8fa4f6550c5156cf8c6069f5bdf9d0
This commit is contained in:
Udo Schläpfer 2015-02-07 13:34:06 +01:00
parent 8aa72f07f4
commit d81b36222a
4 changed files with 21 additions and 1 deletions

View file

@ -66,3 +66,14 @@ void audiohw_set_volume(int volume)
DEBUGF("ERROR %s: Can not set volume.", __func__);
}
}
void audiohw_set_filter_roll_off(int val)
{
DEBUGF("DEBUG %s: val: %d", __func__, val);
if(! sysfs_set_char(SYSFS_ES9018_FILTER, (char) val))
{
DEBUGF("ERROR %s: Can not set roll off filter.", __func__);
}
}

View file

@ -26,7 +26,7 @@
#define _CODEC_DX50_H_
#define AUDIOHW_CAPS MONO_VOL_CAP
#define AUDIOHW_CAPS (MONO_VOL_CAP | FILTER_ROLL_OFF_CAP)
/*
@ -48,4 +48,8 @@
AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -128, 0, -30)
/* 1: slow roll off, 0: sharp roll off, sharp roll off default */
AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0)
#endif

View file

@ -43,6 +43,9 @@ static const char* SYSFS_PATHS[] =
/* SYSFS_DX90_ES9018_VOLUME */
"/sys/class/codec/es9018_volume",
/* SYSFS_ES9018_FILTER */
"/sys/class/codec/es9018_filter",
/* SYSFS_MUTE */
"/sys/class/codec/mute",
@ -280,6 +283,7 @@ bool sysfs_set_char(enum sys_fs_interface_id id, char value)
{
case SYSFS_MUTE:
case SYSFS_WM8740_MUTE:
case SYSFS_ES9018_FILTER:
{
break;
}

View file

@ -38,6 +38,7 @@ enum sys_fs_interface_id
SYSFS_DX50_CODEC_VOLUME = 0,
SYSFS_HOLDKEY,
SYSFS_DX90_ES9018_VOLUME,
SYSFS_ES9018_FILTER,
SYSFS_MUTE,
SYSFS_WM8740_MUTE,
SYSFS_BATTERY_CAPACITY,