It looks like it's not that easy. It beeps, but immediately panics with the first call. I'm guessing there's something unsafe about calling beep in this way..


audio-empeg: BEEP 200, 60
Internal error: branch through zero: 0
CPU: 0
pc : [<00000004>] lr : [<0209e6bc>]
sp : be3ffce8 ip : 00000000 fp : c0111f24
r10: c0112f60 r9 : c0113cc4 r8 : c01140c4
r7 : c0113cc0 r6 : c0113cc4 r5 : c0113cc0 r4 : 00000000
r3 : 60000013 r2 : c0136654 r1 : c0113d48 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment kernel
Control: C000517D Table: C000517D DAC: 0000001D
Process swapper (pid: 0, stackpage=c0111000)
...
...
Code: pc not in code space
Aiee, killing interrupt handler
Kernel panic: Attempted to kill the idle task!
In swapper task - not syncing


I guess there's no safe way to call it from inside a driver. The whole reason I'm trying to do this is to provide an audio beep whenever a specific remote key is pressed. I'm building on top of Frank Van Gestel's IR trans patch, and have it so that I can get another 10 functions out of the remote if I use one of the buttons as a "switch functions" button. I wanted a beep when this button is pressed. Since it's not a normal Empeg function, the player doesn't generate beeps for that button. I just wanted to generate a beep inside the IR driver, as in this snippet:


add_timer(&irtrans_timer);
if(data == 0x0000AD0C) {
audio_beep(&audio[0], 60, 200, 100);
irtransmodify=1;


For whatever reason, this causes a massive kernel crash. Guess I should have picked an easier first kernel project :)

-Tony
MkII #554
_________________________
- Tony C
my empeg stuff