diff options
author | Udo Schläpfer <rockbox-2014.10@desktopwarrior.net> | 2015-02-07 13:34:06 +0100 |
---|---|---|
committer | Udo Schläpfer <rockbox-2014.10@desktopwarrior.net> | 2015-02-07 13:34:06 +0100 |
commit | d81b36222a9d3c261367cc4cfbe692dc06a92023 (patch) | |
tree | e28fb7ba0c2eb913bb67e042ea352d43918d7212 | |
parent | 8aa72f07f4bf38e9b898fb8d8042239861b9a423 (diff) | |
download | rockbox-d81b36222a9d3c261367cc4cfbe692dc06a92023.tar.gz rockbox-d81b36222a9d3c261367cc4cfbe692dc06a92023.zip |
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
-rw-r--r-- | firmware/target/hosted/ibasso/dx50/audiohw-dx50.c | 11 | ||||
-rw-r--r-- | firmware/target/hosted/ibasso/dx50/codec-dx50.h | 6 | ||||
-rw-r--r-- | firmware/target/hosted/ibasso/sysfs-ibasso.c | 4 | ||||
-rw-r--r-- | firmware/target/hosted/ibasso/sysfs-ibasso.h | 1 |
4 files changed, 21 insertions, 1 deletions
diff --git a/firmware/target/hosted/ibasso/dx50/audiohw-dx50.c b/firmware/target/hosted/ibasso/dx50/audiohw-dx50.c index 5e61348c8d..4ed181ede9 100644 --- a/firmware/target/hosted/ibasso/dx50/audiohw-dx50.c +++ b/firmware/target/hosted/ibasso/dx50/audiohw-dx50.c | |||
@@ -66,3 +66,14 @@ void audiohw_set_volume(int volume) | |||
66 | DEBUGF("ERROR %s: Can not set volume.", __func__); | 66 | DEBUGF("ERROR %s: Can not set volume.", __func__); |
67 | } | 67 | } |
68 | } | 68 | } |
69 | |||
70 | |||
71 | void audiohw_set_filter_roll_off(int val) | ||
72 | { | ||
73 | DEBUGF("DEBUG %s: val: %d", __func__, val); | ||
74 | |||
75 | if(! sysfs_set_char(SYSFS_ES9018_FILTER, (char) val)) | ||
76 | { | ||
77 | DEBUGF("ERROR %s: Can not set roll off filter.", __func__); | ||
78 | } | ||
79 | } | ||
diff --git a/firmware/target/hosted/ibasso/dx50/codec-dx50.h b/firmware/target/hosted/ibasso/dx50/codec-dx50.h index 89a1a3f1c4..baa5b7c3b6 100644 --- a/firmware/target/hosted/ibasso/dx50/codec-dx50.h +++ b/firmware/target/hosted/ibasso/dx50/codec-dx50.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #define _CODEC_DX50_H_ | 26 | #define _CODEC_DX50_H_ |
27 | 27 | ||
28 | 28 | ||
29 | #define AUDIOHW_CAPS MONO_VOL_CAP | 29 | #define AUDIOHW_CAPS (MONO_VOL_CAP | FILTER_ROLL_OFF_CAP) |
30 | 30 | ||
31 | 31 | ||
32 | /* | 32 | /* |
@@ -48,4 +48,8 @@ | |||
48 | AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -128, 0, -30) | 48 | AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -128, 0, -30) |
49 | 49 | ||
50 | 50 | ||
51 | /* 1: slow roll off, 0: sharp roll off, sharp roll off default */ | ||
52 | AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0) | ||
53 | |||
54 | |||
51 | #endif | 55 | #endif |
diff --git a/firmware/target/hosted/ibasso/sysfs-ibasso.c b/firmware/target/hosted/ibasso/sysfs-ibasso.c index 8ca3edf387..5269c16704 100644 --- a/firmware/target/hosted/ibasso/sysfs-ibasso.c +++ b/firmware/target/hosted/ibasso/sysfs-ibasso.c | |||
@@ -43,6 +43,9 @@ static const char* SYSFS_PATHS[] = | |||
43 | /* SYSFS_DX90_ES9018_VOLUME */ | 43 | /* SYSFS_DX90_ES9018_VOLUME */ |
44 | "/sys/class/codec/es9018_volume", | 44 | "/sys/class/codec/es9018_volume", |
45 | 45 | ||
46 | /* SYSFS_ES9018_FILTER */ | ||
47 | "/sys/class/codec/es9018_filter", | ||
48 | |||
46 | /* SYSFS_MUTE */ | 49 | /* SYSFS_MUTE */ |
47 | "/sys/class/codec/mute", | 50 | "/sys/class/codec/mute", |
48 | 51 | ||
@@ -280,6 +283,7 @@ bool sysfs_set_char(enum sys_fs_interface_id id, char value) | |||
280 | { | 283 | { |
281 | case SYSFS_MUTE: | 284 | case SYSFS_MUTE: |
282 | case SYSFS_WM8740_MUTE: | 285 | case SYSFS_WM8740_MUTE: |
286 | case SYSFS_ES9018_FILTER: | ||
283 | { | 287 | { |
284 | break; | 288 | break; |
285 | } | 289 | } |
diff --git a/firmware/target/hosted/ibasso/sysfs-ibasso.h b/firmware/target/hosted/ibasso/sysfs-ibasso.h index fec8a082f9..23e562c296 100644 --- a/firmware/target/hosted/ibasso/sysfs-ibasso.h +++ b/firmware/target/hosted/ibasso/sysfs-ibasso.h | |||
@@ -38,6 +38,7 @@ enum sys_fs_interface_id | |||
38 | SYSFS_DX50_CODEC_VOLUME = 0, | 38 | SYSFS_DX50_CODEC_VOLUME = 0, |
39 | SYSFS_HOLDKEY, | 39 | SYSFS_HOLDKEY, |
40 | SYSFS_DX90_ES9018_VOLUME, | 40 | SYSFS_DX90_ES9018_VOLUME, |
41 | SYSFS_ES9018_FILTER, | ||
41 | SYSFS_MUTE, | 42 | SYSFS_MUTE, |
42 | SYSFS_WM8740_MUTE, | 43 | SYSFS_WM8740_MUTE, |
43 | SYSFS_BATTERY_CAPACITY, | 44 | SYSFS_BATTERY_CAPACITY, |