diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/wmcodec-pp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/firmware/target/arm/wmcodec-pp.c b/firmware/target/arm/wmcodec-pp.c index e9626220e7..73324c0dec 100644 --- a/firmware/target/arm/wmcodec-pp.c +++ b/firmware/target/arm/wmcodec-pp.c | |||
@@ -43,6 +43,14 @@ | |||
43 | #include "i2c-pp5002.h" | 43 | #include "i2c-pp5002.h" |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) | ||
47 | /* The H10's audio codec uses an I2C address of 0x1b */ | ||
48 | #define I2C_AUDIO_ADDRESS 0x1b | ||
49 | #else | ||
50 | /* The iPod's audio codecs use an I2C address of 0x1a */ | ||
51 | #define I2C_AUDIO_ADDRESS 0x1a | ||
52 | #endif | ||
53 | |||
46 | /* | 54 | /* |
47 | * Reset the I2S BIT.FORMAT I2S, 16bit, FIFO.FORMAT 32bit | 55 | * Reset the I2S BIT.FORMAT I2S, 16bit, FIFO.FORMAT 32bit |
48 | */ | 56 | */ |
@@ -144,13 +152,5 @@ int wmcodec_init(void) { | |||
144 | 152 | ||
145 | void wmcodec_write(int reg, int data) | 153 | void wmcodec_write(int reg, int data) |
146 | { | 154 | { |
147 | /* Todo: Since the ipod_i2c_* functions also work on H10 and possibly other PP | 155 | pp_i2c_send(I2C_AUDIO_ADDRESS, (reg<<1) | ((data&0x100)>>8),data&0xff); |
148 | targets, these functions should probably be renamed */ | ||
149 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) | ||
150 | /* The H10's audio codec uses an I2C address of 0x1b */ | ||
151 | ipod_i2c_send(0x1b, (reg<<1) | ((data&0x100)>>8),data&0xff); | ||
152 | #else | ||
153 | /* The iPod's audio codecs use an I2C address of 0x1a */ | ||
154 | ipod_i2c_send(0x1a, (reg<<1) | ((data&0x100)>>8),data&0xff); | ||
155 | #endif | ||
156 | } | 156 | } |