Author Topic: Zaurus Remote And Xmms Tip  (Read 3671 times)

tovarish

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Zaurus Remote And Xmms Tip
« on: February 15, 2007, 05:49:45 am »
All the posts that i have seen regarding using the ce1 remove with xmms involve keeping xmms in the foreground and remapping the remote keycodes to c,v,b,n etc.
What i found that if you bind the remote keys as follows in fluxbox for eg.

None XF86AudioPlay   :ExecCommand /usr/bin/xmms -t
None XF86AudioStop   :ExecCommand /usr/bin/xmms -s
None XF86AudioPrev   :ExecCommand /usr/bin/xmms -r
None XF86AudioNext   :ExecCommand /usr/bin/xmms -f

then xmms need not be in the foreground and you dont need to remap the remote keys in x. I am sure you can do this in other window managers too.
The advantage here is that if xmms is not running then it will be started by the remote key press.
The only disadvantage of this is that you cannot use the remote keys in any other application. They are bound to xmms. Maybe i will write a script that will send the remote button press to mplayer or xmms whichever is running and it will start one of the two depending on user preference.

The volume up and down keys are the only ones left and i am yet to find a mixer application that can increase or decrease volume from key presses. something like $MIXERAPP -increase and $MIXERAPP -decrease. mixmos is not capable of this

tovarish.

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Zaurus Remote And Xmms Tip
« Reply #1 on: February 15, 2007, 10:04:02 pm »
In fact, that's exactly what the default pdaxrom setup does. It's definitely not an improvement, though, because it involves loading a new instance of xmms for every button press registered.

If autorepeat is on for those keys (likely) then holding down a remote button for too long ("too long" being about a second or so...) will cause your Z to spawn lots of xmms instances, it will run out of memory, and it will lock up hard.

I'm working on an app to handle the remote properly; it's currently matchbox only but I intend to make it wm-independent.
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

tovarish

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Zaurus Remote And Xmms Tip
« Reply #2 on: February 16, 2007, 02:02:50 am »
you can force xmms to load only one instance. Such and option is present in the xmms options.

tovarish

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Zaurus Remote And Xmms Tip
« Reply #3 on: February 16, 2007, 05:29:52 am »
If only it was that easy. To implement that flag, the extra instance of XMMS has to be loaded into memory, start up (not bringing up a GUI, but still allocating a bunch of memory), detect the previous instance of XMMS and tell it any remote command passed on the commandline and then shut down.

When 20+ instances of xmms all get spawned simultaneously, this happens:

1) every instance of xmms tries to grab its (big) chunk of memory
2) the Z runs out of memory
3) every instance of xmms halts, waiting for more memory
4) NO instance of xmms ever gets far enough along to shut down and release what it's already grabbed
5) the Z gets stuck.

The only ways to avoid this are by disabling autorepeat on the keys bound to the XMMS controls, or to use a much more lightweight app to capture the keys and communicate with XMMS via it's control API's.
« Last Edit: February 16, 2007, 05:30:57 am by pelrun »
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Zaurus Remote And Xmms Tip
« Reply #4 on: February 16, 2007, 05:52:38 am »
I vaguely remember there to be a  kind of  command-line based remote control for xmms somewhere in the feeds.
I may be wrong, though.
Can't find it right now.

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

zeigerpuppy

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Zaurus Remote And Xmms Tip
« Reply #5 on: February 16, 2007, 08:33:07 am »
this thread may be relevant
It talks about xmmsctrl

https://www.oesf.org/forums/index.php?showtopic=12195

There is also an app floating around called xmms shell but have not seen this on the zaurus.

I noticed that the zaurus wakes to remote key presses (good),
 but is there a way to turn it off from the remote?
Zaurus C3100, CE-RH2, Socket lowpower CF Wifi, Socket CF Bluetooth
pdaXrom r198 - testing!, IceWM, Bluetooth modem: Sony Ericsson v600i with 3G.
see some howtos and tips at http://greenant.net/portal/greenant/wiki/Zaurus3100