diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-10-02 07:48:50 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-10-02 07:48:50 +0000 |
commit | 15b7321fe1345a9efd296fe135f19e1da45f0e7c (patch) | |
tree | e2b704e2e0dd20d8d6d46e6fedc159fafc7fdca4 /firmware/target/arm/wmcodec-pp.c | |
parent | 4d34457cd0a1958ff271bb2d87bfdba1432b678e (diff) | |
download | rockbox-15b7321fe1345a9efd296fe135f19e1da45f0e7c.tar.gz rockbox-15b7321fe1345a9efd296fe135f19e1da45f0e7c.zip |
Split wm8731 and wm8721 drivers. wm8721 can be much simpler since it has no recording. Provide reg bit definitions for those. Add some temporary hacks pcm-pp to prevent crashing when playing after recording. Make playback start after recording on pp5020. Get wm8731 to monitor recording but plans are to do that digitally.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14948 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/wmcodec-pp.c')
-rw-r--r-- | firmware/target/arm/wmcodec-pp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/target/arm/wmcodec-pp.c b/firmware/target/arm/wmcodec-pp.c index 455e3e1087..a2c83f33b3 100644 --- a/firmware/target/arm/wmcodec-pp.c +++ b/firmware/target/arm/wmcodec-pp.c | |||
@@ -25,6 +25,7 @@ | |||
25 | ****************************************************************************/ | 25 | ****************************************************************************/ |
26 | 26 | ||
27 | #include "system.h" | 27 | #include "system.h" |
28 | #include "audiohw.h" | ||
28 | #include "i2c-pp.h" | 29 | #include "i2c-pp.h" |
29 | 30 | ||
30 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) | 31 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) |
@@ -39,7 +40,7 @@ | |||
39 | /* | 40 | /* |
40 | * Initialise the PP I2C and I2S. | 41 | * Initialise the PP I2C and I2S. |
41 | */ | 42 | */ |
42 | int audiohw_init(void) { | 43 | void audiohw_init(void) { |
43 | /* reset I2C */ | 44 | /* reset I2C */ |
44 | i2c_init(); | 45 | i2c_init(); |
45 | 46 | ||
@@ -95,12 +96,17 @@ int audiohw_init(void) { | |||
95 | #endif /* IPOD_1G2G/3G */ | 96 | #endif /* IPOD_1G2G/3G */ |
96 | #endif | 97 | #endif |
97 | 98 | ||
98 | return 0; | 99 | #ifdef HAVE_WM8731 |
100 | audiohw_preinit(); | ||
101 | #endif | ||
102 | |||
99 | } | 103 | } |
100 | 104 | ||
105 | #ifndef HAVE_WM8731 | ||
101 | void audiohw_postinit(void) | 106 | void audiohw_postinit(void) |
102 | { | 107 | { |
103 | } | 108 | } |
109 | #endif | ||
104 | 110 | ||
105 | void wmcodec_write(int reg, int data) | 111 | void wmcodec_write(int reg, int data) |
106 | { | 112 | { |