Rockbox Technical Forums
Support and General Use => Hardware => Topic started by: fml2 on August 16, 2006, 02:30:06 AM
-
Hello,
I asked this yesterday in IRC but got no reply. Maybe here more eyes will see it.
Does the FM radio need a special initialization? I tried to set up FM screen after startup by calling radio_screen() in tree.c (where auto resume is checked). The FM screen shows up but there's no sound. I use iriver H1xx.
I saw that in the menu, the radio is also activated by calling radio_screen(). But that doesn't work right after start up. Any ideas?
Thanks!
-
Could it be that the audio setup is deferred nowadays, and you call radio_screen() before the audio init is done?
-
Could it be that the audio setup is deferred nowadays, and you call radio_screen() before the audio init is done?
Yes, that's what I think. But I wasn't sure since I don't know RockBox well. Do you mean that after switching on some activities (audio setup) are completed in the background by a special thread? Or is a check ('has audio been initialized') made just before activating playback? Because auto resume is called without anything special being done before.
-
Yes, some init stuff is being done in the background. Don't know the details, sorry...
-
Yes, some init stuff is being done in the background. Don't know the details, sorry...
Thanks for the confirmation. I'll try to dig into it then. Maybe a sleep for a second or two will help thus allowing the background thread to finish its work. He-he... Poor man's solution :-)
-
Maybe a sleep for a second or two will help
Hey, that did indeed help!