Rockbox mail archiveSubject: Re: [PATCH,RFC] avoid radio noise on sansa clipplus
Re: [PATCH,RFC] avoid radio noise on sansa clipplus
From: Thomas Martitz <kugel_at_rockbox.org>
Date: Wed, 07 Nov 2012 22:23:44 +0100
Am 07.11.2012 10:11, schrieb Stefan Seyfried:
> Hi all,
> I'm new to rockbox development, so bear with me if I'm violating
> the mailing list etiquette etc.
> On my sansa clip+, there is a quiet, ticking noise on weak fm radio
> I found out that this is probably due to the cpu being woken up to
> update the display 5 times a second, even if the display is turned off.
> This patch fixes the issue by not updating the display unless it is
> turned on.
> diff --git a/apps/radio/radio_skin.c b/apps/radio/radio_skin.c
> index 521890c..0c05f33 100644
> --- a/apps/radio/radio_skin.c
> +++ b/apps/radio/radio_skin.c
> _at__at_ -96,7 +96,13 _at__at_ void fms_fix_displays(enum fms_exiting toggle_state)
> int fms_do_button_loop(bool update_screen)
> int button = skin_wait_for_action(FM_SCREEN, CONTEXT_FM,
> - update_screen ? TIMEOUT_NOBLOCK : HZ/5);
> + update_screen ? TIMEOUT_NOBLOCK :
> +#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
> + (lcd_active() ? HZ/5 : TIMEOUT_BLOCK)
> + HZ/5
> + );
> #ifdef HAVE_TOUCHSCREEN
> struct touchregion *region;
> int offset;
> Unfortunately, if combined with the "backlight filters first
> keypress: on" config option, this causes the display (including
> RSSI) to also not be updated after it is woken up again, simply
> because skin_wait_for_action() will not return if the keypress
> was only turning on the backlight.
> The following patch pushes a dummy event into the button queue
> to work around that.
I absolutely expected this to happen. Have a look at how the WPS handles
this very issue which is solved there. See wps_lcd_activation_hook() and
related, it's actually similar to your solution.
This fixes too frequent updates which are completely unnecessary and as
such it is welcome. However, I'm not positive that it's the right fix
for the radio noise (which still happens with display on, right?).
Received on 2012-11-07