diff options
-rw-r--r-- | firmware/drivers/audio/df1704.c | 14 | ||||
-rw-r--r-- | firmware/export/df1704.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/firmware/drivers/audio/df1704.c b/firmware/drivers/audio/df1704.c index b0b9d7b1d3..ec8d56b955 100644 --- a/firmware/drivers/audio/df1704.c +++ b/firmware/drivers/audio/df1704.c | |||
@@ -113,3 +113,17 @@ void audiohw_set_volume(int vol_l, int vol_r) | |||
113 | df1704_write_reg(DF1704_MODE(0), DF1704_LDL_ON|vol_tenthdb2hw(vol_l)); | 113 | df1704_write_reg(DF1704_MODE(0), DF1704_LDL_ON|vol_tenthdb2hw(vol_l)); |
114 | df1704_write_reg(DF1704_MODE(1), DF1704_LDR_ON|vol_tenthdb2hw(vol_r)); | 114 | df1704_write_reg(DF1704_MODE(1), DF1704_LDR_ON|vol_tenthdb2hw(vol_r)); |
115 | } | 115 | } |
116 | |||
117 | void audiohw_set_filter_roll_off(int value) | ||
118 | { | ||
119 | int mode3_val = DF1704_CKO_HALF | | ||
120 | DF1704_LRP_H | | ||
121 | DF1704_I2S_ON; | ||
122 | |||
123 | if (value == 0) { | ||
124 | mode3_val |= DF1704_SRO_SHARP; | ||
125 | } else { | ||
126 | mode3_val |= DF1704_SRO_SLOW; | ||
127 | } | ||
128 | df1704_write_reg(DF1704_MODE(3), mode3_val); | ||
129 | } | ||
diff --git a/firmware/export/df1704.h b/firmware/export/df1704.h index 59d1372477..4a0bdfd8ba 100644 --- a/firmware/export/df1704.h +++ b/firmware/export/df1704.h | |||
@@ -26,7 +26,9 @@ | |||
26 | #define DF1704_VOLUME_MIN -1270 | 26 | #define DF1704_VOLUME_MIN -1270 |
27 | #define DF1704_VOLUME_MAX 0 | 27 | #define DF1704_VOLUME_MAX 0 |
28 | 28 | ||
29 | #define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP) | ||
29 | AUDIOHW_SETTING(VOLUME, "dB", 0, 1, DF1704_VOLUME_MIN/10, DF1704_VOLUME_MAX/10, 0) | 30 | AUDIOHW_SETTING(VOLUME, "dB", 0, 1, DF1704_VOLUME_MIN/10, DF1704_VOLUME_MAX/10, 0) |
31 | AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0) | ||
30 | 32 | ||
31 | #define DF1704_MODE(x) (((x)&0x03)<<9) | 33 | #define DF1704_MODE(x) (((x)&0x03)<<9) |
32 | 34 | ||