summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ryabinin <ryabinin.a.a@gmail.com>2013-11-01 18:59:53 +0400
committerAndrew Ryabinin <ryabinin.a.a@gmail.com>2013-11-05 09:59:45 +0400
commita170c99170589488531f7f576ad5e248b1c7c589 (patch)
tree77d4c63663dac283e978cdaa1d8e0b4df565da78
parentd602717735b09cdd39e4e8c75d69ce8c5e2d957d (diff)
downloadrockbox-a170c99170589488531f7f576ad5e248b1c7c589.tar.gz
rockbox-a170c99170589488531f7f576ad5e248b1c7c589.zip
ma9: Slightly change df1704 driver API.
This change should be done for easier integration of ma8 port.
-rw-r--r--firmware/drivers/audio/df1704.c6
-rw-r--r--firmware/export/df1704.h3
-rw-r--r--firmware/target/arm/rk27xx/ma/audio-ma.c10
3 files changed, 9 insertions, 10 deletions
diff --git a/firmware/drivers/audio/df1704.c b/firmware/drivers/audio/df1704.c
index ec8d56b955..917cecb767 100644
--- a/firmware/drivers/audio/df1704.c
+++ b/firmware/drivers/audio/df1704.c
@@ -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 |
diff --git a/firmware/export/df1704.h b/firmware/export/df1704.h
index 4a0bdfd8ba..81848d8c6f 100644
--- a/firmware/export/df1704.h
+++ b/firmware/export/df1704.h
@@ -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);
diff --git a/firmware/target/arm/rk27xx/ma/audio-ma.c b/firmware/target/arm/rk27xx/ma/audio-ma.c
index c870ca09b8..92cea307b2 100644
--- a/firmware/target/arm/rk27xx/ma/audio-ma.c
+++ b/firmware/target/arm/rk27xx/ma/audio-ma.c
@@ -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);
}