diff options
Diffstat (limited to 'firmware/drivers/wm8731l.c')
-rw-r--r-- | firmware/drivers/wm8731l.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/firmware/drivers/wm8731l.c b/firmware/drivers/wm8731l.c index be9bf14099..4fc33f882d 100644 --- a/firmware/drivers/wm8731l.c +++ b/firmware/drivers/wm8731l.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #define IPOD_PCM_LEVEL 0x65 /* -6dB */ | 43 | #define IPOD_PCM_LEVEL 0x65 /* -6dB */ |
44 | 44 | ||
45 | 45 | ||
46 | int wmcodec_mute(int mute) | 46 | int audiohw_mute(int mute) |
47 | { | 47 | { |
48 | if (mute) | 48 | if (mute) |
49 | { | 49 | { |
@@ -70,7 +70,7 @@ static void codec_set_active(int active) | |||
70 | 70 | ||
71 | 71 | ||
72 | /* Silently enable / disable audio output */ | 72 | /* Silently enable / disable audio output */ |
73 | void wmcodec_enable_output(bool enable) | 73 | void audiohw_enable_output(bool enable) |
74 | { | 74 | { |
75 | if (enable) | 75 | if (enable) |
76 | { | 76 | { |
@@ -96,7 +96,7 @@ void wmcodec_enable_output(bool enable) | |||
96 | /* IWL=00(16 bit) FORMAT=10(I2S format) */ | 96 | /* IWL=00(16 bit) FORMAT=10(I2S format) */ |
97 | wmcodec_write(AINTFCE, 0x42); | 97 | wmcodec_write(AINTFCE, 0x42); |
98 | 98 | ||
99 | wmcodec_set_sample_rate(WM8731L_44100HZ); | 99 | audiohw_set_sample_rate(WM8731L_44100HZ); |
100 | 100 | ||
101 | /* set the volume to -6dB */ | 101 | /* set the volume to -6dB */ |
102 | wmcodec_write(LOUTVOL, IPOD_PCM_LEVEL); | 102 | wmcodec_write(LOUTVOL, IPOD_PCM_LEVEL); |
@@ -112,17 +112,17 @@ void wmcodec_enable_output(bool enable) | |||
112 | /* We need to enable bit 4 of GPIOL for output for sound on H10 */ | 112 | /* We need to enable bit 4 of GPIOL for output for sound on H10 */ |
113 | GPIOL_OUTPUT_VAL |= 0x10; | 113 | GPIOL_OUTPUT_VAL |= 0x10; |
114 | #endif | 114 | #endif |
115 | wmcodec_mute(0); | 115 | audiohw_mute(0); |
116 | } else { | 116 | } else { |
117 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) | 117 | #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) |
118 | /* We need to disable bit 4 of GPIOL to disable sound on H10 */ | 118 | /* We need to disable bit 4 of GPIOL to disable sound on H10 */ |
119 | GPIOL_OUTPUT_VAL &= ~0x10; | 119 | GPIOL_OUTPUT_VAL &= ~0x10; |
120 | #endif | 120 | #endif |
121 | wmcodec_mute(1); | 121 | audiohw_mute(1); |
122 | } | 122 | } |
123 | } | 123 | } |
124 | 124 | ||
125 | int wmcodec_set_master_vol(int vol_l, int vol_r) | 125 | int audiohw_set_master_vol(int vol_l, int vol_r) |
126 | { | 126 | { |
127 | /* +6 to -73dB 1dB steps (plus mute == 80levels) 7bits */ | 127 | /* +6 to -73dB 1dB steps (plus mute == 80levels) 7bits */ |
128 | /* 1111111 == +6dB */ | 128 | /* 1111111 == +6dB */ |
@@ -136,7 +136,7 @@ int wmcodec_set_master_vol(int vol_l, int vol_r) | |||
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | int wmcodec_set_mixer_vol(int channel1, int channel2) | 139 | int audiohw_set_mixer_vol(int channel1, int channel2) |
140 | { | 140 | { |
141 | (void)channel1; | 141 | (void)channel1; |
142 | (void)channel2; | 142 | (void)channel2; |
@@ -144,18 +144,18 @@ int wmcodec_set_mixer_vol(int channel1, int channel2) | |||
144 | return 0; | 144 | return 0; |
145 | } | 145 | } |
146 | 146 | ||
147 | void wmcodec_set_bass(int value) | 147 | void audiohw_set_bass(int value) |
148 | { | 148 | { |
149 | (void)value; | 149 | (void)value; |
150 | } | 150 | } |
151 | 151 | ||
152 | void wmcodec_set_treble(int value) | 152 | void audiohw_set_treble(int value) |
153 | { | 153 | { |
154 | (void)value; | 154 | (void)value; |
155 | } | 155 | } |
156 | 156 | ||
157 | /* Nice shutdown of WM8731 codec */ | 157 | /* Nice shutdown of WM8731 codec */ |
158 | void wmcodec_close(void) | 158 | void audiohw_close(void) |
159 | { | 159 | { |
160 | /* set DACMU=1 DEEMPH=0 */ | 160 | /* set DACMU=1 DEEMPH=0 */ |
161 | wmcodec_write(DACCTRL, 0x8); | 161 | wmcodec_write(DACCTRL, 0x8); |
@@ -177,36 +177,36 @@ void wmcodec_close(void) | |||
177 | } | 177 | } |
178 | 178 | ||
179 | /* Change the order of the noise shaper, 5th order is recommended above 32kHz */ | 179 | /* Change the order of the noise shaper, 5th order is recommended above 32kHz */ |
180 | void wmcodec_set_nsorder(int order) | 180 | void audiohw_set_nsorder(int order) |
181 | { | 181 | { |
182 | (void)order; | 182 | (void)order; |
183 | } | 183 | } |
184 | 184 | ||
185 | void wmcodec_set_sample_rate(int sampling_control) | 185 | void audiohw_set_sample_rate(int sampling_control) |
186 | { | 186 | { |
187 | codec_set_active(0x0); | 187 | codec_set_active(0x0); |
188 | wmcodec_write(SAMPCTRL, sampling_control); | 188 | wmcodec_write(SAMPCTRL, sampling_control); |
189 | codec_set_active(0x1); | 189 | codec_set_active(0x1); |
190 | } | 190 | } |
191 | 191 | ||
192 | void wmcodec_enable_recording(bool source_mic) | 192 | void audiohw_enable_recording(bool source_mic) |
193 | { | 193 | { |
194 | (void)source_mic; | 194 | (void)source_mic; |
195 | } | 195 | } |
196 | 196 | ||
197 | void wmcodec_disable_recording(void) | 197 | void audiohw_disable_recording(void) |
198 | { | 198 | { |
199 | 199 | ||
200 | } | 200 | } |
201 | 201 | ||
202 | void wmcodec_set_recvol(int left, int right, int type) | 202 | void audiohw_set_recvol(int left, int right, int type) |
203 | { | 203 | { |
204 | (void)left; | 204 | (void)left; |
205 | (void)right; | 205 | (void)right; |
206 | (void)type; | 206 | (void)type; |
207 | } | 207 | } |
208 | 208 | ||
209 | void wmcodec_set_monitor(int enable) | 209 | void audiohw_set_monitor(int enable) |
210 | { | 210 | { |
211 | (void)enable; | 211 | (void)enable; |
212 | } | 212 | } |