• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category
  • Assigned To No-one
  • Operating System
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by diddystar5 - 2003-09-08
Last edited by diddystar5 - 2005-03-24

FS#1682 - beep when battery low

This patch makes a "beep" everytime the battery icon
blinks in the status bar.
There may be a better way to do this, if so tell me.

-Make it sound more like a beep. I borrowed code from
the "key click" patch, since I don't know how to make
sound myself.

-Make a setting in the system menu to turn it on/off


Closed by  midkay
2007-03-11 20:26
Reason for closing:  Out of Date
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Out of date

This is the patch for feature request 802229.

Whoops! Thats feature request 626816.

removed the #define… It's not really needed.

I plan to revive this patch soon, since the new mp3_xx
functions are out. Stay tuned!

Just a note

do { mas_codec_writereg(0, 0); mas_codec_writereg(0, 1); }
while (0);

First off… This code is identical to:

mas_codec_writereg(0, 0);
mas_codec_writereg(0, 1);

Secondly, without checking the core code, I guess this just
enables and disables the audio, thus creating a "click" or "pop"
on the audio lines.

In theory, if you do this at the right speed you will create a
"tone" or "buzz" at a given frequency.

You are probably looking to create a frequency between about
200Hz and 1000Hz, so here is a basic idea for you, if you want
to try it.

int Hz = 444; /* Concert Pitch Middle A */
int Freq = 1000/Hz; /* 1000mS per S */

for (i=0; i<duration_mS; i+=Freq)

  mas_codec_writereg(0, 0); 
  mas_codec_writereg(0, 1); 


hi, i'd like to use your patch but i'm not shure the way to
apply it. i use rockbox dev kit and when i type the
command "patch -p0 < batt_low_beep.diff.txt
it doesn't seem to apply properly. do i have to apply it in a
precise directory? i'm not really familiar with applying a patch
so would be really nice to help me a little, i'm a blind rockbox

Here is a somewhat updated version.
Apply it in the rockbox root directory

I used BC's beep (which I have not listened to, my recorder
is not around right now).

Todo: Support the new units (probably with the mp3 commands?)

Please give feedback!

blue chip, this may seem trivial, but concert tuning is actually A 440 (i play guitar so ive heard that a lot)

I this relevant now that low battery shutdown is implemented for most (all?) targets?


Available keyboard shortcuts


Task Details

Task Editing