mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
imx233: Implement mutex for cpu_boost_lock/unlock
Playing AAC-HE files resulted in a race condition between audio/codec/buffering for set_cpu_frequency Change-Id: I35e1c1fd18db623e2990c305acdca03f57184d0d
This commit is contained in:
parent
428464774f
commit
b2c470719a
2 changed files with 34 additions and 0 deletions
|
|
@ -54,6 +54,23 @@ bool imx233_us_elapsed(uint32_t ref, unsigned us_delay);
|
|||
void imx233_reset_block(volatile uint32_t *block_reg);
|
||||
void imx233_enable_usb_controller(bool enable);
|
||||
void imx233_enable_usb_phy(bool enable);
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||
#define CPU_BOOST_LOCK_DEFINED
|
||||
|
||||
static inline bool cpu_boost_lock(void)
|
||||
{
|
||||
bool set_cpu_frequency__lock(void);
|
||||
return set_cpu_frequency__lock();
|
||||
}
|
||||
|
||||
static inline void cpu_boost_unlock(void)
|
||||
{
|
||||
void set_cpu_frequency__unlock(void);
|
||||
set_cpu_frequency__unlock();
|
||||
}
|
||||
#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
|
||||
|
||||
// NOTE: this is available even if HAVE_ADJUSTABLE_CPU_FREQ is undef
|
||||
void imx233_set_cpu_frequency(long frequency);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue