ma9: Slightly change df1704 driver API.

This change should be done for easier integration of ma8 port.
This commit is contained in:
Andrew Ryabinin 2013-11-01 18:59:53 +04:00
parent d602717735
commit a170c99170
3 changed files with 9 additions and 10 deletions

View File

@ -67,7 +67,7 @@ static int vol_tenthdb2hw(const int tdb)
}
void df1704_init(void)
void audiohw_init(void)
{
df1704_write_reg(DF1704_MODE(2),
DF1704_OW_24 |
@ -81,7 +81,7 @@ void df1704_init(void)
DF1704_I2S_ON);
}
void df1704_mute(void)
void audiohw_mute(void)
{
df1704_write_reg(DF1704_MODE(2),
DF1704_OW_24 |
@ -90,7 +90,7 @@ void df1704_mute(void)
DF1704_MUTE_ON);
}
void df1704_unmute(void)
void audiohw_unmute(void)
{
df1704_write_reg(DF1704_MODE(2),
DF1704_OW_24 |

View File

@ -87,8 +87,7 @@ AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 1, 0)
#define DF1704_SF_32 (3<<6)
#define DF1704_SF_48 (2<<6)
void df1704_init(void);
void df1704_mute(void);
void audiohw_mute(void);
void df1704_set_ml(const int);
void df1704_set_mc(const int);
void df1704_set_md(const int);

View File

@ -55,7 +55,7 @@ static void amp_enable(const int val)
pca9555_write_output(val<<3, 1<<3);
}
static void df1704_enable(const int val)
static void dac_enable(const int val)
{
pca9555_write_output(val<<4, 1<<4);
}
@ -65,21 +65,21 @@ void audiohw_postinit(void)
{
pop_ctrl(0);
sleep(HZ/4);
df1704_enable(1);
dac_enable(1);
amp_enable(1);
sleep(HZ/100);
df1704_init();
audiohw_init();
sleep(HZ/4);
pop_ctrl(1);
}
void audiohw_close(void)
{
df1704_mute();
audiohw_mute();
pop_ctrl(0);
sleep(HZ/5);
amp_enable(0);
df1704_enable(0);
dac_enable(0);
sleep(HZ/5);
pop_ctrl(1);
}