df1704: Add filter roll-off selection.
Change-Id: I732ebd3446858b497105cf03fc81e934a749a57b
This commit is contained in:
parent
0519f7e5ab
commit
00b8563654
2 changed files with 16 additions and 0 deletions
|
@ -113,3 +113,17 @@ void audiohw_set_volume(int vol_l, int vol_r)
|
|||
df1704_write_reg(DF1704_MODE(0), DF1704_LDL_ON|vol_tenthdb2hw(vol_l));
|
||||
df1704_write_reg(DF1704_MODE(1), DF1704_LDR_ON|vol_tenthdb2hw(vol_r));
|
||||
}
|
||||
|
||||
void audiohw_set_filter_roll_off(int value)
|
||||
{
|
||||
int mode3_val = DF1704_CKO_HALF |
|
||||
DF1704_LRP_H |
|
||||
DF1704_I2S_ON;
|
||||
|
||||
if (value == 0) {
|
||||
mode3_val |= DF1704_SRO_SHARP;
|
||||
} else {
|
||||
mode3_val |= DF1704_SRO_SLOW;
|
||||
}
|
||||
df1704_write_reg(DF1704_MODE(3), mode3_val);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
#define DF1704_VOLUME_MIN -1270
|
||||
#define DF1704_VOLUME_MAX 0
|
||||
|
||||
#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP)
|
||||
AUDIOHW_SETTING(VOLUME, "dB", 0, 1, DF1704_VOLUME_MIN/10, DF1704_VOLUME_MAX/10, 0)
|
||||
AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0)
|
||||
|
||||
#define DF1704_MODE(x) (((x)&0x03)<<9)
|
||||
|
||||
|
|
Loading…
Reference in a new issue