diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2011-11-05 14:01:22 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2011-11-05 14:01:22 +0000 |
commit | f4b74b269af2f70a1b74715888b64b61dc73eff6 (patch) | |
tree | 2e4c8a26fc6488cbc14942f4ada168d3dbf914f0 /firmware | |
parent | 9310fc0b4c78eff371101088ea31d62cf35bfb76 (diff) | |
download | rockbox-f4b74b269af2f70a1b74715888b64b61dc73eff6.tar.gz rockbox-f4b74b269af2f70a1b74715888b64b61dc73eff6.zip |
MPIO HD300: vastly improve sound quality. This unfortunately means reverting r28797 which introduced poping noise
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30904 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/audio/wm8751.c | 26 | ||||
-rw-r--r-- | firmware/target/coldfire/mpio/hd300/lcd-hd300.c | 21 |
2 files changed, 17 insertions, 30 deletions
diff --git a/firmware/drivers/audio/wm8751.c b/firmware/drivers/audio/wm8751.c index c37341ef26..ca62f69d95 100644 --- a/firmware/drivers/audio/wm8751.c +++ b/firmware/drivers/audio/wm8751.c | |||
@@ -219,20 +219,22 @@ static void audiohw_mute(bool mute) | |||
219 | /* Reset and power up the WM8751 */ | 219 | /* Reset and power up the WM8751 */ |
220 | void audiohw_preinit(void) | 220 | void audiohw_preinit(void) |
221 | { | 221 | { |
222 | #ifdef MROBE_100 | 222 | #if defined(MROBE_100) |
223 | /* controls headphone ouput */ | 223 | /* controls headphone ouput */ |
224 | GPIOL_ENABLE |= 0x10; | 224 | GPIOL_ENABLE |= 0x10; |
225 | GPIOL_OUTPUT_EN |= 0x10; | 225 | GPIOL_OUTPUT_EN |= 0x10; |
226 | GPIOL_OUTPUT_VAL |= 0x10; /* disable */ | 226 | GPIOL_OUTPUT_VAL |= 0x10; /* disable */ |
227 | #endif | 227 | #elif defined(MPIO_HD200) |
228 | |||
229 | #ifdef MPIO_HD200 | ||
230 | /* control headphone output | 228 | /* control headphone output |
231 | * disabled on startup | 229 | * disabled on startup |
232 | */ | 230 | */ |
233 | and_l(~(1<<25),&GPIO1_OUT); | 231 | and_l(~(1<<25), &GPIO1_OUT); |
234 | or_l((1<<25), &GPIO1_ENABLE); | 232 | or_l((1<<25), &GPIO1_ENABLE); |
235 | or_l((1<<25), &GPIO1_FUNCTION); | 233 | or_l((1<<25), &GPIO1_FUNCTION); |
234 | #elif defined(MPIO_HD300) | ||
235 | and_l(~(1<<5), &GPIO1_OUT); | ||
236 | or_l((1<<5), &GPIO1_ENABLE); | ||
237 | or_l((1<<5), &GPIO1_FUNCTION); | ||
236 | #endif | 238 | #endif |
237 | 239 | ||
238 | /* | 240 | /* |
@@ -322,15 +324,15 @@ void audiohw_postinit(void) | |||
322 | 324 | ||
323 | audiohw_mute(false); | 325 | audiohw_mute(false); |
324 | 326 | ||
325 | #ifdef MROBE_100 | 327 | #if defined(MROBE_100) |
326 | /* enable headphone output */ | 328 | /* enable headphone output */ |
327 | GPIOL_OUTPUT_VAL &= ~0x10; | 329 | GPIOL_OUTPUT_VAL &= ~0x10; |
328 | GPIOL_OUTPUT_EN |= 0x10; | 330 | GPIOL_OUTPUT_EN |= 0x10; |
329 | #endif | 331 | #elif defined(MPIO_HD200) |
330 | |||
331 | #ifdef MPIO_HD200 | ||
332 | /* enable headphone output */ | 332 | /* enable headphone output */ |
333 | or_l((1<<25),&GPIO1_OUT); | 333 | or_l((1<<25), &GPIO1_OUT); |
334 | #elif defined(MPIO_HD300) | ||
335 | or_l((1<<5), &GPIO1_OUT); | ||
334 | #endif | 336 | #endif |
335 | } | 337 | } |
336 | 338 | ||
@@ -394,9 +396,11 @@ void audiohw_close(void) | |||
394 | /* 1. Set DACMU = 1 to soft-mute the audio DACs. */ | 396 | /* 1. Set DACMU = 1 to soft-mute the audio DACs. */ |
395 | audiohw_mute(true); | 397 | audiohw_mute(true); |
396 | 398 | ||
397 | #ifdef MPIO_HD200 | 399 | #if defined(MPIO_HD200) |
398 | /* disable headphone out */ | 400 | /* disable headphone out */ |
399 | and_l(~(1<<25), &GPIO1_OUT); | 401 | and_l(~(1<<25), &GPIO1_OUT); |
402 | #elif defined(MPIO_HD300) | ||
403 | and_l(~(1<<5), &GPIO1_OUT); | ||
400 | #endif | 404 | #endif |
401 | 405 | ||
402 | /* 2. Disable all output buffers. */ | 406 | /* 2. Disable all output buffers. */ |
diff --git a/firmware/target/coldfire/mpio/hd300/lcd-hd300.c b/firmware/target/coldfire/mpio/hd300/lcd-hd300.c index 3752a84073..31087a5d43 100644 --- a/firmware/target/coldfire/mpio/hd300/lcd-hd300.c +++ b/firmware/target/coldfire/mpio/hd300/lcd-hd300.c | |||
@@ -210,25 +210,8 @@ void lcd_update(void) | |||
210 | lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1); | 210 | lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1); |
211 | lcd_write_command(LCD_CNTL_DATA_WRITE); | 211 | lcd_write_command(LCD_CNTL_DATA_WRITE); |
212 | 212 | ||
213 | /* lcd can't handle the speed of DMA transfer when boosted | 213 | /* Copy display bitmap to hardware */ |
214 | * 11 MHz in bootloader hangs for unknown reason | 214 | lcd_write_data (&lcd_framebuffer[0][0], LCD_WIDTH*LCD_FBHEIGHT); |
215 | */ | ||
216 | if ( cpu_frequency == CPUFREQ_NORMAL ) | ||
217 | { | ||
218 | /* Copy display bitmap to hardware using DMA */ | ||
219 | DSR3 = 1; | ||
220 | DAR3 = 0xf0000002; | ||
221 | SAR3 = (unsigned long)lcd_framebuffer; | ||
222 | BCR3 = LCD_WIDTH*LCD_FBHEIGHT; | ||
223 | DCR3 = DMA_BWC(1) | DMA_SINC | DMA_SSIZE(DMA_SIZE_BYTE) | | ||
224 | DMA_DSIZE(DMA_SIZE_BYTE) | DMA_START; | ||
225 | } | ||
226 | else | ||
227 | { | ||
228 | /* Copy display bitmap to hardware */ | ||
229 | lcd_write_data (&lcd_framebuffer[0][0], LCD_WIDTH*LCD_FBHEIGHT); | ||
230 | } | ||
231 | |||
232 | } | 215 | } |
233 | 216 | ||
234 | /* Update a fraction of the display. */ | 217 | /* Update a fraction of the display. */ |