diff options
Diffstat (limited to 'firmware/target/arm/wmcodec-pp.c')
-rw-r--r-- | firmware/target/arm/wmcodec-pp.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/firmware/target/arm/wmcodec-pp.c b/firmware/target/arm/wmcodec-pp.c index 0d751f6b3f..031f5c8d47 100644 --- a/firmware/target/arm/wmcodec-pp.c +++ b/firmware/target/arm/wmcodec-pp.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "system.h" | 29 | #include "system.h" |
30 | #include "audiohw.h" | 30 | #include "audiohw.h" |
31 | #include "i2c-pp.h" | 31 | #include "i2c-pp.h" |
32 | #include "i2s.h" | ||
32 | #include "wmcodec.h" | 33 | #include "wmcodec.h" |
33 | 34 | ||
34 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || defined(MROBE_100) | 35 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || defined(MROBE_100) |
@@ -43,7 +44,8 @@ | |||
43 | /* | 44 | /* |
44 | * Initialise the PP I2C and I2S. | 45 | * Initialise the PP I2C and I2S. |
45 | */ | 46 | */ |
46 | void audiohw_init(void) { | 47 | void audiohw_init(void) |
48 | { | ||
47 | #ifdef CPU_PP502x | 49 | #ifdef CPU_PP502x |
48 | /* normal outputs for CDI and I2S pin groups */ | 50 | /* normal outputs for CDI and I2S pin groups */ |
49 | DEV_INIT2 &= ~0x300; | 51 | DEV_INIT2 &= ~0x300; |
@@ -95,21 +97,13 @@ void audiohw_init(void) { | |||
95 | outl(inl(0xcf000028) & ~0x8, 0xcf000028); | 97 | outl(inl(0xcf000028) & ~0x8, 0xcf000028); |
96 | #endif /* IPOD_1G2G/3G */ | 98 | #endif /* IPOD_1G2G/3G */ |
97 | #endif | 99 | #endif |
100 | |||
101 | /* reset the I2S controller into known state */ | ||
102 | i2s_reset(); | ||
98 | 103 | ||
99 | #if defined(HAVE_WM8731) || defined(HAVE_WM8751) || defined(HAVE_WM8975) \ | ||
100 | || defined(HAVE_WM8758) | ||
101 | audiohw_preinit(); | 104 | audiohw_preinit(); |
102 | #endif | ||
103 | |||
104 | } | 105 | } |
105 | 106 | ||
106 | #if !defined(HAVE_WM8731) && !defined(HAVE_WM8751) && !defined(HAVE_WM8975) \ | ||
107 | && !defined(HAVE_WM8758) | ||
108 | void audiohw_postinit(void) | ||
109 | { | ||
110 | } | ||
111 | #endif | ||
112 | |||
113 | void wmcodec_write(int reg, int data) | 107 | void wmcodec_write(int reg, int data) |
114 | { | 108 | { |
115 | pp_i2c_send(I2C_AUDIO_ADDRESS, (reg<<1) | ((data&0x100)>>8),data&0xff); | 109 | pp_i2c_send(I2C_AUDIO_ADDRESS, (reg<<1) | ((data&0x100)>>8),data&0xff); |