OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: daniel3000 on January 09, 2007, 05:07:15 am

Title: Sound On Resume
Post by: daniel3000 on January 09, 2007, 05:07:15 am
Hi Meanie,

quoting your post from thread "Pdaxrom For C3000 (based On Beta1/beta3)":

Quote
There is a config file /home/root/Choices/pdaxii13.conf which specifies what happens during startup, ie load torsmo, play welcome sound, play beep during resume. These options can be set to true or false, but they only come into effect after X is restarted.

The volume is preset using mixmos. Just run mixmos and save the volume state after you have set your preferred settings.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=150516\"][{POST_SNAPBACK}][/a][/div]

this is funny, I also had the idea of adding a sound to the beginning of the resume process in order to let the user know that resume is going on, even while the backlight is still off.
However, it caused problems when I tried it. Maybe you have an idea about the reason?

I have created an apm script which does a mixmos -d /dev/dsp -s 4 on suspend and

mixmos -d /dev/dsp -r 1 (profile 1 stored manually before, loud setting)
esdplay /usr/share/sounds/resume.wav
mixmos -d /dev/dsp -r 4

on resume.
Have named the script links this way:

/etc/apm/suspend.d/500resumesound and
/etc/apm/resume.d/10resumesound

However, after suspend / resume the keyboard is dead! The sound works (even if too late for my taste, I hoped to get it almost directly after switching on the Zaurus). But no application gets keyboard input anymore. I have to reboot the Zaurus.

Maybe you know already what the reaons is? Is there a special order in the scripts I have to take care of when playing a sound or using the mixer device?

Thanks!
daniel
Title: Sound On Resume
Post by: Meanie on January 09, 2007, 07:07:56 am
Quote
Hi Meanie,

quoting your post from thread "Pdaxrom For C3000 (based On Beta1/beta3)":

Quote
There is a config file /home/root/Choices/pdaxii13.conf which specifies what happens during startup, ie load torsmo, play welcome sound, play beep during resume. These options can be set to true or false, but they only come into effect after X is restarted.

The volume is preset using mixmos. Just run mixmos and save the volume state after you have set your preferred settings.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=150516\"][{POST_SNAPBACK}][/a][/div]

this is funny, I also had the idea of adding a sound to the beginning of the resume process in order to let the user know that resume is going on, even while the backlight is still off.
However, it caused problems when I tried it. Maybe you have an idea about the reason?

I have created an apm script which does a mixmos -d /dev/dsp -s 4 on suspend and

mixmos -d /dev/dsp -r 1 (profile 1 stored manually before, loud setting)
esdplay /usr/share/sounds/resume.wav
mixmos -d /dev/dsp -r 4

on resume.
Have named the script links this way:

/etc/apm/suspend.d/500resumesound and
/etc/apm/resume.d/10resumesound

However, after suspend / resume the keyboard is dead! The sound works (even if too late for my taste, I hoped to get it almost directly after switching on the Zaurus). But no application gets keyboard input anymore. I have to reboot the Zaurus.

Maybe you know already what the reaons is? Is there a special order in the scripts I have to take care of when playing a sound or using the mixer device?

Thanks!
daniel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=150529\"][{POST_SNAPBACK}][/a][/div]

accessing /dev/dsp after a resume somehow locks the keyboard. i don't know why, but if you disable respawning of esd in /etc/esd.conf, it doesn't happen so frequently.
also, i use the buzzer instead of the esd to have just a simple sound.
Title: Sound On Resume
Post by: daniel3000 on January 09, 2007, 08:07:11 am
aha.. thanks!
How can I control the buzzer?
I prefer a safe solution without the slightest chance to lock the keyboard.  

Or what about directly playing the sound over /dev/dsp without the use of esd?
Do you think that would be safe enough? But it would probably cause problems if another application is active which uses sound (maybe even esd locks /dev/dsp?)

Just trying... hm..
cat SOMEWAVFILE.wav > /dev/dsp sounds strange. Probably wrong format? But at least it sort of works.

daniel