Author Topic: Sound On Resume  (Read 991 times)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Sound On Resume
« 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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Sound On Resume
« Reply #1 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.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Sound On Resume
« Reply #2 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
« Last Edit: January 09, 2007, 08:08:51 am by daniel3000 »
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0