A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove int_prio argument from timer_register, and move the only use for it into alpine_cdc plugin, since this plugin is only built on SH7034

Also remove it from TIMER_START()

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21558 a1c6a512-1295-4272-9138-f99709370657

+42 -68
+4 -4
apps/plugin.h
··· 128 128 #define PLUGIN_MAGIC 0x526F634B /* RocK */ 129 129 130 130 /* increase this every time the api struct changes */ 131 - #define PLUGIN_API_VERSION 156 131 + #define PLUGIN_API_VERSION 157 132 132 133 133 /* update this to latest version if a change to the api struct breaks 134 134 backwards compatibility (and please take the opportunity to sort in any 135 135 new function which are "waiting" at the end of the function table) */ 136 - #define PLUGIN_MIN_API_VERSION 156 136 + #define PLUGIN_MIN_API_VERSION 157 137 137 138 138 /* plugin return codes */ 139 139 enum plugin_status { ··· 461 461 void (*cpucache_invalidate)(void); 462 462 #endif 463 463 bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), 464 - long cycles, int int_prio, 465 - void (*timer_callback)(void) IF_COP(, int core)); 464 + long cycles, void (*timer_callback)(void) 465 + IF_COP(, int core)); 466 466 void (*timer_unregister)(void); 467 467 bool (*timer_set_period)(long count); 468 468
+4 -2
apps/plugins/alpine_cdc.c
··· 231 231 232 232 if (mode == TM_RX_TIMEOUT) 233 233 { 234 - rb->timer_register(1, NULL, gTimer.timeout, 11, timer4_isr IF_COP(, CPU)); 234 + rb->timer_register(1, NULL, gTimer.timeout, timer4_isr IF_COP(, CPU)); 235 + IPRD = (IPRD & 0xFF0F) | 11 << 4; /* interrupt priority */ 235 236 } 236 237 else if (mode == TM_TRANSMIT) 237 238 { 238 - rb->timer_register(1, NULL, gTimer.transmit, 14, timer4_isr IF_COP(, CPU)); 239 + rb->timer_register(1, NULL, gTimer.transmit, timer4_isr IF_COP(, CPU)); 240 + IPRD = (IPRD & 0xFF0F) | 14 << 4; /* interrupt priority */ 239 241 } 240 242 else 241 243 {
+1 -1
apps/plugins/doom/i_system.c
··· 109 109 void I_Init (void) 110 110 { 111 111 #if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) && !defined(RB_PROFILE) 112 - rb->timer_register(1, NULL, TIMER_FREQ/TICRATE, 1, doomtime IF_COP(, CPU)); 112 + rb->timer_register(1, NULL, TIMER_FREQ/TICRATE, doomtime IF_COP(, CPU)); 113 113 #endif 114 114 I_InitSound(); 115 115 }
+2 -3
apps/plugins/lib/grey_core.c
··· 648 648 #endif 649 649 #if NUM_CORES > 1 650 650 rb->timer_register(1, NULL, TIMER_FREQ / LCD_SCANRATE, 651 - 1, _timer_isr, 651 + _timer_isr, 652 652 (_grey_info.flags & GREY_ON_COP) ? COP : CPU); 653 653 #else 654 - rb->timer_register(1, NULL, TIMER_FREQ / LCD_SCANRATE, 1, 655 - _timer_isr); 654 + rb->timer_register(1, NULL, TIMER_FREQ / LCD_SCANRATE, _timer_isr); 656 655 #endif 657 656 #endif /* !SIMULATOR */ 658 657 rb->screen_dump_set_hook(grey_screendump_hook);
+1 -1
apps/plugins/metronome.c
··· 910 910 #endif /* CONFIG_CODEC != SWCODEC */ 911 911 912 912 calc_period(); 913 - rb->timer_register(1, NULL, TIMER_FREQ/1024, 1, timer_callback IF_COP(, CPU)); 913 + rb->timer_register(1, NULL, TIMER_FREQ/1024, timer_callback IF_COP(, CPU)); 914 914 915 915 draw_display(); 916 916
+1 -1
apps/plugins/test_scanrate.c
··· 162 162 rb->cpu_boost(true); 163 163 #endif 164 164 /* The actual frequency is twice the displayed value */ 165 - rb->timer_register(1, NULL, TIMER_FREQ * 5 / scan_rate, 1, 165 + rb->timer_register(1, NULL, TIMER_FREQ * 5 / scan_rate, 166 166 timer_isr IF_COP(, CPU)); 167 167 168 168 while (!done)
+4 -4
apps/plugins/video.c
··· 562 562 gPlay.bVideoUnderrun = false; 563 563 /* start display interrupt */ 564 564 #if FREQ == 12000000 /* Ondio speed kludge */ 565 - rb->timer_register(1, NULL, gPlay.nFrameTimeAdjusted, 1, 565 + rb->timer_register(1, NULL, gPlay.nFrameTimeAdjusted, 566 566 timer4_isr IF_COP(, CPU)); 567 567 #else 568 - rb->timer_register(1, NULL, gFileHdr.video_frametime, 1, 568 + rb->timer_register(1, NULL, gFileHdr.video_frametime, 569 569 timer4_isr IF_COP(, CPU)); 570 570 #endif 571 571 } ··· 748 748 { /* start the video */ 749 749 #if FREQ == 12000000 /* Ondio speed kludge */ 750 750 rb->timer_register(1, NULL, 751 - gPlay.nFrameTimeAdjusted, 1, timer4_isr); 751 + gPlay.nFrameTimeAdjusted, timer4_isr); 752 752 #else 753 753 rb->timer_register(1, NULL, 754 - gFileHdr.video_frametime, 1, timer4_isr); 754 + gFileHdr.video_frametime, timer4_isr); 755 755 #endif 756 756 } 757 757 }
+1 -2
docs/PLUGIN_API.new
··· 2438 2438 \param thread 2439 2439 \description 2440 2440 2441 - bool timer_register(int reg_prio, void (*unregister_callback)(void), long cycles, int int_prio, void (*timer_callback)(void) IF_COP(, int core)) 2441 + bool timer_register(int reg_prio, void (*unregister_callback)(void), long cycles, void (*timer_callback)(void) IF_COP(, int core)) 2442 2442 \param reg_prio 2443 2443 \param unregister_callback 2444 2444 \param cycles 2445 - \param int_prio 2446 2445 \param core 2447 2446 \param timer_callback 2448 2447 \return
+1 -1
firmware/backlight.c
··· 332 332 if (bl_timer_active) 333 333 return ; 334 334 335 - if (timer_register(0, backlight_release_timer, 2, 0, backlight_isr 335 + if (timer_register(0, backlight_release_timer, 2, backlight_isr 336 336 IF_COP(, CPU))) 337 337 { 338 338 #ifdef _BACKLIGHT_FADE_BOOST
+1 -1
firmware/export/timer.h
··· 41 41 #define TIMER_FREQ CPU_FREQ 42 42 #endif 43 43 bool timer_register(int reg_prio, void (*unregister_callback)(void), 44 - long cycles, int int_prio, void (*timer_callback)(void) 44 + long cycles, void (*timer_callback)(void) 45 45 IF_COP(,int core)); 46 46 bool timer_set_period(long cycles); 47 47 #ifdef CPU_COLDFIRE
+2 -2
firmware/profile.c
··· 140 140 if (profiling < PROF_ERROR) { 141 141 /* After we de-mask, if profiling is active, reactivate the timer */ 142 142 timer_register(0, profile_timer_unregister, 143 - TIMER_FREQ/10000, 0, profile_timer_tick IF_COP(, 0 ) ); 143 + TIMER_FREQ/10000, profile_timer_tick IF_COP(, 0 ) ); 144 144 } 145 145 } 146 146 } ··· 169 169 pfds[0].self_pc = 0; 170 170 memset(indices,0,INDEX_SIZE * sizeof(unsigned short)); 171 171 timer_register( 172 - 0, profile_timer_unregister, TIMER_FREQ/10000, 0, profile_timer_tick IF_COP(, 0 ) ); 172 + 0, profile_timer_unregister, TIMER_FREQ/10000, profile_timer_tick IF_COP(, 0 ) ); 173 173 profiling = PROF_ON; 174 174 } 175 175
+1 -1
firmware/target/arm/as3525/timer-target.h
··· 30 30 #define __TIMER_SET(cycles, set) \ 31 31 __timer_set(cycles, set) 32 32 33 - #define __TIMER_START(int_prio) \ 33 + #define __TIMER_START() \ 34 34 __timer_start() 35 35 36 36 #define __TIMER_STOP(...) \
+1 -1
firmware/target/arm/at91sam/lyre_proto1/timer-target.h
··· 32 32 #define __TIMER_SET(cycles, set) \ 33 33 __timer_set(cycles, set) 34 34 35 - #define __TIMER_START(int_prio) \ 35 + #define __TIMER_START() \ 36 36 __timer_start() 37 37 38 38 #define __TIMER_STOP(...) \
+1 -1
firmware/target/arm/imx31/gigabeat-s/timer-target.h
··· 31 31 #define __TIMER_SET(cycles, set) \ 32 32 _timer_set(cycles, set) 33 33 34 - #define __TIMER_START(int_prio) \ 34 + #define __TIMER_START() \ 35 35 _timer_start() 36 36 37 37 #define __TIMER_STOP(...) \
+1 -1
firmware/target/arm/pnx0101/timer-target.h
··· 30 30 #define __TIMER_SET(cycles, set) \ 31 31 __timer_set(cycles, set) 32 32 33 - #define __TIMER_START(int_prio) \ 33 + #define __TIMER_START() \ 34 34 __timer_start() 35 35 36 36 #define __TIMER_STOP(...) \
+1 -1
firmware/target/arm/s3c2440/gigabeat-fx/timer-target.h
··· 32 32 #define __TIMER_SET(cycles, set) \ 33 33 __timer_set(cycles, set) 34 34 35 - #define __TIMER_START(int_prio) \ 35 + #define __TIMER_START() \ 36 36 __timer_start() 37 37 38 38 #define __TIMER_STOP(...) \
+1 -1
firmware/target/arm/tcc780x/timer-target.h
··· 31 31 #define __TIMER_SET(cycles, set) \ 32 32 __timer_set(cycles, set) 33 33 34 - #define __TIMER_START(int_prio) \ 34 + #define __TIMER_START() \ 35 35 __timer_start() 36 36 37 37 #define __TIMER_STOP(...) \
+2 -2
firmware/target/arm/timer-target.h
··· 39 39 __timer_set(cycles, set) 40 40 41 41 #if NUM_CORES > 1 42 - #define __TIMER_START(int_prio, core) \ 42 + #define __TIMER_START(core) \ 43 43 __timer_start(core) 44 44 #else 45 - #define __TIMER_START(int_prio) \ 45 + #define __TIMER_START() \ 46 46 __timer_start() 47 47 #endif 48 48
+1 -1
firmware/target/arm/tms320dm320/timer-target.h
··· 31 31 #define __TIMER_SET(cycles, set) \ 32 32 __timer_set(cycles, set) 33 33 34 - #define __TIMER_START(int_prio) \ 34 + #define __TIMER_START() \ 35 35 __timer_start() 36 36 37 37 #define __TIMER_STOP(...) \
+1 -1
firmware/target/coldfire/timer-target.h
··· 31 31 #define __TIMER_SET(cycles, set) \ 32 32 __timer_set(cycles, set) 33 33 34 - #define __TIMER_START(int_prio) \ 34 + #define __TIMER_START() \ 35 35 __timer_start() 36 36 37 37 #define __TIMER_STOP(...) \
+1 -1
firmware/target/mips/ingenic_jz47xx/timer-target.h
··· 33 33 #define __TIMER_SET(cycles, set) \ 34 34 __timer_set(cycles, set) 35 35 36 - #define __TIMER_START(int_prio) \ 36 + #define __TIMER_START() \ 37 37 __timer_start() 38 38 39 39 #define __TIMER_STOP(...) \
+2 -2
firmware/target/sh/archos/timer-archos.c
··· 71 71 return true; 72 72 } 73 73 74 - bool __timer_start(int int_prio) 74 + bool __timer_start(void) 75 75 { 76 - IPRD = (IPRD & 0xFF0F) | int_prio << 4; /* interrupt priority */ 76 + IPRD = (IPRD & 0xFF0F) | 1 << 4; /* interrupt priority */ 77 77 or_b(0x10, &TSTR); /* start timer 4 */ 78 78 return true; 79 79 }
+3 -3
firmware/target/sh/archos/timer-target.h
··· 24 24 #include "config.h" 25 25 26 26 bool __timer_set(long cycles, bool start); 27 - bool __timer_start(int int_prio); 27 + bool __timer_start(void); 28 28 void __timer_stop(void); 29 29 30 30 #define TIMER_FREQ CPU_FREQ ··· 32 32 #define __TIMER_SET(cycles, set) \ 33 33 __timer_set(cycles, set) 34 34 35 - #define __TIMER_START(int_prio) \ 36 - __timer_start(int_prio) 35 + #define __TIMER_START() \ 36 + __timer_start() 37 37 38 38 #define __TIMER_STOP(...) \ 39 39 __timer_stop()
+3 -28
firmware/timer.c
··· 30 30 void SHAREDBSS_ATTR (*pfn_timer)(void) = NULL; /* timer callback */ 31 31 void SHAREDBSS_ATTR (*pfn_unregister)(void) = NULL; /* unregister callback */ 32 32 33 - #ifndef __TIMER_SET 34 - /* Define these if not defined by target to make the #else cases compile 35 - * even if the target doesn't have them implemented. */ 36 - #define __TIMER_SET(cycles, set) false 37 - #if NUM_CORES > 1 38 - #define __TIMER_START(int_prio, core) false 39 - #else 40 - #define __TIMER_START(int_prio) false 41 - #endif 42 - #define __TIMER_STOP() 43 - #endif 44 - 45 33 static bool timer_set(long cycles, bool start) 46 34 { 47 35 return __TIMER_SET(cycles, start); ··· 49 37 50 38 /* Register a user timer, called every <cycles> TIMER_FREQ cycles */ 51 39 bool timer_register(int reg_prio, void (*unregister_callback)(void), 52 - long cycles, int int_prio, void (*timer_callback)(void) 40 + long cycles, void (*timer_callback)(void) 53 41 IF_COP(, int core)) 54 42 { 55 43 if (reg_prio <= timer_prio || cycles == 0) 56 44 return false; 57 45 58 - #if CONFIG_CPU == SH7034 59 - if (int_prio < 1 || int_prio > 15) 60 - return false; 61 - #endif 62 - 63 46 if (!timer_set(cycles, true)) 64 47 return false; 65 48 ··· 68 51 timer_prio = reg_prio; 69 52 70 53 #if NUM_CORES > 1 71 - return __TIMER_START(int_prio, core); 54 + return __TIMER_START(core); 72 55 #else 73 - return __TIMER_START(int_prio); 56 + return __TIMER_START(); 74 57 #endif 75 - 76 - /* Cover for targets that don't use all these */ 77 - (void)reg_prio; 78 - (void)unregister_callback; 79 - (void)cycles; 80 - /* TODO: Implement for PortalPlayer and iFP (if possible) */ 81 - (void)int_prio; 82 - (void)timer_callback; 83 58 } 84 59 85 60 bool timer_set_period(long cycles)
+1 -2
uisimulator/sdl/timer.c
··· 36 36 ((int)((1000*cycles)/TIMER_FREQ)) 37 37 38 38 bool timer_register(int reg_prio, void (*unregister_callback)(void), 39 - long cycles, int int_prio, void (*timer_callback)(void)) 39 + long cycles, void (*timer_callback)(void)) 40 40 { 41 - (void)int_prio;/* interrupt priority not used */ 42 41 (void)unregister_callback; 43 42 if (reg_prio <= timer_prio || cycles == 0) 44 43 return false;