ma9: Slightly change df1704 driver API.
This change should be done for easier integration of ma8 port.
diff --git a/firmware/drivers/audio/df1704.c b/firmware/drivers/audio/df1704.c
index ec8d56b..917cecb 100644
--- a/firmware/drivers/audio/df1704.c
+++ b/firmware/drivers/audio/df1704.c
@@ -67,7 +67,7 @@
}
-void df1704_init(void)
+void audiohw_init(void)
{
df1704_write_reg(DF1704_MODE(2),
DF1704_OW_24 |
@@ -81,7 +81,7 @@
DF1704_I2S_ON);
}
-void df1704_mute(void)
+void audiohw_mute(void)
{
df1704_write_reg(DF1704_MODE(2),
DF1704_OW_24 |
@@ -90,7 +90,7 @@
DF1704_MUTE_ON);
}
-void df1704_unmute(void)
+void audiohw_unmute(void)
{
df1704_write_reg(DF1704_MODE(2),
DF1704_OW_24 |
diff --git a/firmware/export/df1704.h b/firmware/export/df1704.h
index 4a0bdfd..81848d8 100644
--- a/firmware/export/df1704.h
+++ b/firmware/export/df1704.h
@@ -87,8 +87,7 @@
#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);
diff --git a/firmware/target/arm/rk27xx/ma/audio-ma.c b/firmware/target/arm/rk27xx/ma/audio-ma.c
index c870ca0..92cea30 100644
--- a/firmware/target/arm/rk27xx/ma/audio-ma.c
+++ b/firmware/target/arm/rk27xx/ma/audio-ma.c
@@ -55,7 +55,7 @@
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 @@
{
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);
}