diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c index 5b742044eb..1840966aa1 100644 --- a/bootloader/iriver_h300.c +++ b/bootloader/iriver_h300.c @@ -41,7 +41,6 @@ #include "power.h" #include "powermgmt.h" #include "file.h" -#include "uda1380.h" #include "pcf50606.h" #include "common.h" #include "rbunicode.h" @@ -143,7 +142,8 @@ void main(void) int data; bool rtc_alarm; int button; - + int mask; + /* We want to read the buttons as early as possible, before the user releases the ON button */ @@ -173,9 +173,13 @@ void main(void) __reset_cookie(); power_off(); } - - audiohw_reset(); - + + /* get rid of a nasty humming sound during boot */ + mask = set_irq_level(HIGHEST_IRQ_LEVEL); + pcf50606_write(0x3b, 0x00); /* GPOOD2 high Z */ + pcf50606_write(0x3b, 0x07); /* GPOOD2 low */ + set_irq_level(mask); + /* Start with the main backlight OFF. */ _backlight_init(); _backlight_off(); diff --git a/bootloader/main.c b/bootloader/main.c index 8d58ca71d0..b1a29f992a 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -41,7 +41,6 @@ #include "power.h" #include "powermgmt.h" #include "file.h" -#include "uda1380.h" #include "eeprom_settings.h" #include "rbunicode.h" #include "common.h" @@ -444,8 +443,15 @@ void main(void) # endif backlight_init(); + #ifdef HAVE_UDA1380 - audiohw_reset(); + /* get rid of a nasty humming sound during boot + -> RESET signal */ + or_l(1<<29, &GPIO_OUT); + or_l(1<<29, &GPIO_ENABLE); + or_l(1<<29, &GPIO_FUNCTION); + sleep(HZ/100); + and_l(~(1<<29), &GPIO_OUT); #endif lcd_init(); diff --git a/firmware/SOURCES b/firmware/SOURCES index 6272bd20ce..52a7ab8d4c 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -202,7 +202,7 @@ drivers/mas.c #endif /* SWCODEC */ /* Audio codec */ -#ifndef SIMULATOR +#if !defined(SIMULATOR) && !defined(BOOTLOADER) #if defined(HAVE_UDA1380) drivers/audio/uda1380.c #elif defined(HAVE_WM8751) @@ -222,7 +222,7 @@ drivers/audio/tlv320.c #elif defined(HAVE_MAS35XX) drivers/audio/mas35xx.c #endif /* defined(HAVE_*) */ -#endif /* SIMULATOR */ +#endif /* !defined(SIMULATOR) && !defined(BOOTLOADER) */ /* USB Stack */ #if !defined(SIMULATOR)