Ok gpe-announce fixed, i was right. The buzzer device it' s not needed by the Zauri and Desktop.
Yes - it works (very loud!)
This is the gpe-announce fixed. Still remains the mixer problem, it gives the same "Device busy" because there' s a function that try to control the volume for the Snooze issue.
Now is /dev/mixer the right device?
I get 'unable to get volume' or something, and it blasts out at full noise! (I don't get device busy error unless it is actually busy).
It looks like the right device (mine is a symlink to /dev/sound/mixer). I can get/set the volume using /usr/bin/mixmos or the gui mixer applet without trouble (not both at once of course).
I wonder if the mixer needs to be set at all? If I set the volume low, gpe-announce still runs at full volume. I read somewhere that esd gets volume info with the specific stream, so perhaps the mixer is a red herring and you need to look at the esd play routine? Is there another spot where you get a choice between buzzer and esd?
Ok now i' m becoming mad with the atd commands.
at -f /tmp/atjob.txt -q g the -q switch it' s not related to the query but to the priority so that is not the error.
I tried it, it generates the right file in the right /var/spool/at position.
Now i got the error "Atd is not running etc." from gpe-calendar removing the event.
This beacause the atrm it' s not in the atd Zauri package.
So i changed the cancel string to delete the atd file in the spool dir directly.
It worked but the problem is that the event doesn' t execute the command!!!!
So, what a big hassle this at daemon guys.
I still doesn' t know how to make it work from the command line!!!! It doesn' t trig the event nor from the Desktop than the Zauri.
I still think that you need to remove the -q switch. at accepts it on my Zaurus, but it doesn't return. Are you sure that it is making the spool file correctly? When it does this for me, it makes a file, but it doesn't finish correctly and doesn't schedule it. I don't see any need for a priority, as there isn't likely to be much else running!
To make atd work on pdaXrom:
1) Make a file (e.g. atd_command.txt) containing your command (no shebang):
echo "atd executed this at $(date)" >> ~/atd_test.txt
2) Run at from the command line:
at -f atd_command.txt 8:15
(it was 8:10 when I did this). Note that if at does not exit cleanly on the command line, it doesn't work. Between 8:10 and 8:15, I can see the file /var/spool/at/1142410500.26491, which is executable. After being executed, it is gone (the file is the command above prefixed by a shebang and postfixed by 'rm -f $0'). The output is of course in ~/atd_test.txt.
The above works perfectly fine for me, and wakes the Zaurus from suspend. However, it fails when I try to use the -q switch (file is made but never executed, just like your problem), or even pipe a command directly into at; it only seems to work with a file input.
It's very close now...
Karl
[div align=\"right\"][a href=\"index.php?act=findpost&pid=118559\"][{POST_SNAPBACK}][/a][/div]
Ok PERFECT! I got it! GPE-ANNOUNCE completely fixed, now all works and i' ll explain how.
gpe-announce has 3 modes of function.
Silent, Automatic, Level as you can see here:
int get_config (void)
{
int result = CFG_AUTOMATIC;
char *filename = g_strdup_printf("%s/.gpe/alarm.conf", g_get_home_dir());
FILE *cfgfile;
int enabled = 1;
int automatic = 1;
int level = 0;
cfgfile = fopen(filename, "r");
if (cfgfile)
{
int val = -1, ret;
char buf[128];
while (fgets(buf, 128, cfgfile))
{
ret = sscanf(buf, "enabled %d", &val);
if (ret)
enabled = val;
ret = sscanf(buf, "automatic %d", &val);
if (ret)
automatic = val;
ret = sscanf(buf, "level %d", &val);
if (ret)
{
if ((val >= 0) && (val <=100))
level = val;
}
}
fclose(cfgfile);
if (!enabled)
result = CFG_NOSOUND;
else
if (!automatic)
result = level;
}
g_free(filename);You need to put a file called alarm.conf in your .gpe directory
In this file there must be three lines:
enable 0 -> 0 means volume on, 1 means silent
automatic 0 -> if 1 raise automatically the level to the maximum and after 20 sec goes down
level 0 -> is a range from 0 to 100 of the Volume that remains fixed
For the
Unable to get volume is logical because you have only the Master Volume and gpe-announce try to set the PCM too, to be sure that the PCM is active.
But the Zauri haven' t the PCM Volume so i deleted the strings related (The red ones).
if((get_vol(&curl, &curr, SOUND_MIXER_VOLUME) == -1)
||
(get_vol(&curpcml, &curpcmr, SOUND_MIXER_PCM) == -1))
{
VolumeReset = FALSE;
printf("Unable to get volume\n");
}
set_vol(100, 100, SOUND_MIXER_PCM);
signal (SIGINT, buzzer_off);
if (sound_config != CFG_NOSOUND)
set_buzzer (1000, 500);
if (sound_config != CFG_NOSOUND)
{
if (sound_config == CFG_AUTOMATIC)
set_vol(50, 50, SOUND_MIXER_VOLUME);
else
set_vol(sound_config, sound_config, SOUND_MIXER_VOLUME);
}
PlayAlarmStop = FALSE;
if (pthread_create(&SoundThread, NULL, play_alarm, NULL) != 0) {
g_print("pthread_create() failed\n");
gtk_main_quit();
}
return(1);
Ok announce is done i' m finishing fixing the atd issues.
As i finish i' ll release the new libschedule and gpe-announce fixed.
I'll let you know byez!