Make sure that audio_resume() is not called in interrupt context when car adapter mode is enabled. Fixes FS#7304.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15034 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2007-10-08 09:09:40 +00:00
parent 46b7028f91
commit 16301880a1
2 changed files with 7 additions and 1 deletions

View file

@ -800,6 +800,7 @@ static void car_adapter_mode_processing(bool inserted)
else
audio_pause();
}
waiting_to_resume_play = false;
}
}
}
@ -812,7 +813,7 @@ static void car_adapter_tick(void)
{
if (audio_status() & AUDIO_STATUS_PAUSE)
{
audio_resume();
queue_broadcast(SYS_CAR_ADAPTER_RESUME, 0);
}
waiting_to_resume_play = false;
}
@ -892,6 +893,10 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame
case SYS_CHARGER_DISCONNECTED:
car_adapter_mode_processing(false);
return SYS_CHARGER_DISCONNECTED;
case SYS_CAR_ADAPTER_RESUME:
audio_resume();
return SYS_CAR_ADAPTER_RESUME;
#endif
#ifdef HAVE_HEADPHONE_DETECTION
case SYS_PHONE_PLUGGED:

View file

@ -70,6 +70,7 @@
#define SYS_REMOTE_PLUGGED MAKE_SYS_EVENT(SYS_EVENT_CLS_PLUG, 4)
#define SYS_REMOTE_UNPLUGGED MAKE_SYS_EVENT(SYS_EVENT_CLS_PLUG, 5)
#define SYS_SCREENDUMP MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 0)
#define SYS_CAR_ADAPTER_RESUME MAKE_SYS_EVENT(SYS_EVENT_CLS_MISC, 1)
struct event
{