void audio_set_output_source(int source) { int oldmode = set_fiq_status(FIQ_DISABLED); if ((unsigned)source >= AUDIO_NUM_SOURCES) source = AUDIO_SRC_PLAYBACK; audio_output_source = source; set_fiq_status(oldmode); }
void audio_set_output_source(int source) { int oldmode = set_fiq_status(FIQ_DISABLED); if ((unsigned)source >= AUDIO_NUM_SOURCES) source = AUDIO_SRC_PLAYBACK; audio_output_source = source; /*if (source != AUDIO_SRC_PLAYBACK) IISCONFIG |= (1 << 29);*/ set_fiq_status(oldmode); }
void main(void) { unsigned char* loadbuffer; int buffer_size; int rc; int(*kernel_entry)(void); /* Make sure interrupts are disabled */ set_irq_level(IRQ_DISABLED); set_fiq_status(FIQ_DISABLED); system_init(); kernel_init(); /* Now enable interrupts */ set_irq_level(IRQ_ENABLED); set_fiq_status(FIQ_ENABLED); lcd_init(); backlight_init(); font_init(); button_init(); usb_init(); power_init(); // enable_irq(); // enable_fiq(); adc_init(); lcd_setfont(FONT_SYSFIXED); /* Show debug messages if button is pressed */ // if(button_read_device()) verbose = true; printf("Rockbox boot loader"); printf("Version %s", rbversion); /* Enter USB mode without USB thread */ if(usb_detect() == USB_INSERTED) { const char msg[] = "Bootloader USB mode"; reset_screen(); lcd_putsxy( (LCD_WIDTH - (SYSFONT_WIDTH * strlen(msg))) / 2, (LCD_HEIGHT - SYSFONT_HEIGHT) / 2, msg); lcd_update(); ide_power_enable(true); storage_enable(false); sleep(HZ/20); usb_enable(true); while (usb_detect() == USB_INSERTED) { storage_spin(); /* Prevent the drive from spinning down */ sleep(HZ); } usb_enable(false); reset_screen(); lcd_update(); } sleep(50); printf("ATA"); rc = storage_init(); if(rc) { reset_screen(); error(EATA, rc, true); } printf("filesystem"); filesystem_init(); printf("mount"); rc = disk_mount_all(); if (rc<=0) { error(EDISK,rc, true); } printf("Loading firmware"); loadbuffer = (unsigned char*) 0x00900000; buffer_size = (unsigned char*)0x01900000 - loadbuffer; rc = load_firmware(loadbuffer, BOOTFILE, buffer_size); if(rc <= EFILE_EMPTY) error(EBOOTFILE, rc, true); kernel_entry = (void*) loadbuffer; rc = kernel_entry(); /* Should not get here! */ return rc; }