Author Topic: Playing Mp3s Volume & Screen Blanking  (Read 5302 times)

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Playing Mp3s Volume & Screen Blanking
« on: April 18, 2006, 01:45:37 pm »
I'm using mpd & ncmpc to play mp3s which is working pretty well. Only problems are:

The matchbox volume applet doesn't control volume. I have to run alsamixer to adjust volume. Is there a better way?

Also, I'm looking for a way to prevent auto suspend when I close the screen on my 3100. Is there a way to blank the screen & keep the Z from suspending so it can be put in your pocket while it's functioning as an mp3 player?

TIA

Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Playing Mp3s Volume & Screen Blanking
« Reply #1 on: April 19, 2006, 05:03:47 am »
Quote
Also, I'm looking for a way to prevent auto suspend when I close the screen on my 3100. Is there a way to blank the screen & keep the Z from suspending so it can be put in your pocket while it's functioning as an mp3 player?

I understand that this functionality has been added in the latest incarnation of zaurusd.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Playing Mp3s Volume & Screen Blanking
« Reply #2 on: April 19, 2006, 01:26:12 pm »
Quote
I understand that this functionality has been added in the latest incarnation of zaurusd.


[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

Hmm, in looking at the scripts in /etc/zaurusd/scripts, notably zaurus-hinge, I see where if it detect the hinge state is "closed" it issues a apm -s. I'd like to change that to turn off the backlight instead.

Is there a way to do this? Lardman will your bl binary be able to do this? [a href=\"http://people.bath.ac.uk/enpsgp/Zaurus/bl/bl_0.0-r0_armv5te.ipk]http://people.bath.ac.uk/enpsgp/Zaurus/bl/...-r0_armv5te.ipk[/url]

I assume I could set it to 0, but how to cancel when hinge is open...
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

JohnX

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • http://
Playing Mp3s Volume & Screen Blanking
« Reply #3 on: April 19, 2006, 02:30:33 pm »
Since I didn't know about the new zaurusd I hacked up my zaurus-hinge script the other day to provide this funcionality.

Here are the parts I changed:
Code: [Select]
if [ $STATE = "3" ]; then
    echo 0 > /sys/class/backlight/corgi-bl/brightness
fi

and at the top of the "landscape" section (under "if [ $STATE = "0" ]; then" )
I added:
Code: [Select]
echo 30 > /sys/class/backlight/corgi-bl/brightness
Brightness is 0 (off) to 47 (full bright). Poke around at the other files in /sys/class/backlight/corgi-bl/ to find fun stuff like max_brightness, etc. Anyways, this little hack should get you by until the new zaurusd comes out.

BTW, if you close the Zaurus, then suspend it, then open it, then resume it (in that order), you'll end up with the Zaurus resumed with the backlight off. In that case close the lid, wait a couple seconds and re-open it to make the backlight come on again. You might find other problems with the way I did this since it was just a quick hack to let me listen to music on the go rather than a real fix.
« Last Edit: April 19, 2006, 02:32:14 pm by JohnX »
Zaurus SL-C1000 - Linux 2.6.22 - Angstrom/Debian dual boot - Ambicom 802.11b - 1GB Corsair SD
Nokia N800 - 2GB PQI SD card
Zaurus SL-5500 - OZ 3.5.3/Hentges T2/Opie - 64MB Lexar SD card

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Playing Mp3s Volume & Screen Blanking
« Reply #4 on: April 20, 2006, 04:37:04 am »
Quote
Is there a way to do this? Lardman will your bl binary be able to do this?

My bl modification was just a temporary hack to get the backlight power management working correctly under GPE. I'm hopeful that this is no longer necessary (though I've not tried letting the machine auto suspend so I'm not sure.)

I remember hrw bringing up this zaurusd issue with RP (that of suspending when closing the lid) and he said he'd make it optional - I guess the new script is available in the OE metadata now and will be installed in any new images (alternatively ask hrw to provide that package in the upgrades thread.)


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

telemetric_au

  • Sr. Member
  • ****
  • Posts: 327
    • View Profile
    • http://www.tyrannozaurus.com/feed/contribs/telemetric/index.htm
Playing Mp3s Volume & Screen Blanking
« Reply #5 on: April 20, 2006, 04:47:43 am »
is there a package for opie that can lock the screen and or blank it ??
Collie w/ pdaxrom & Puppy OS w/ cross-sdk
Hawking HCF686TX 10/100, Ambicom 802.11b (WL1100C-CF), Xircom 56K Global CF
Kingston CF Elite Pro & SD 1Gb & 128mb for flashing
$2 screen protector, collie.pdaxrom.feed : my collie pdaxrom site

starkruzr

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Playing Mp3s Volume & Screen Blanking
« Reply #6 on: May 17, 2006, 08:41:39 pm »
Quote
I'm using mpd & ncmpc to play mp3s which is working pretty well. Only problems are:

The matchbox volume applet doesn't control volume. I have to run alsamixer to adjust volume. Is there a better way?

---

TIA

Jerry
[div align=\"right\"][a href=\"index.php?act=findpost&pid=123665\"][{POST_SNAPBACK}][/a][/div]

Is there a bug on this somewhere?  I wouldn't even know what "package" to say the bug was in.

I should note that GPE-mixer - the mixer application in the "Other" folder in matchbox - DOES work to adjust volume, but strangely.  Volume seems to bottom out to nothing at 80%.  alsamixer does this too.
SL-C1000 Akita running OZ 3.5.4.1 with GPE
Ambicom WL1100C-CE Wifi Card
Sandisk 1GB SD Card

Looking for advice as to how to get snes9x and dgen-sdl running!

starkruzr

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Playing Mp3s Volume & Screen Blanking
« Reply #7 on: September 21, 2006, 12:19:27 am »
Quote
Since I didn't know about the new zaurusd I hacked up my zaurus-hinge script the other day to provide this funcionality.

Here are the parts I changed:
Code: [Select]
if [ $STATE = "3" ]; then
    echo 0 > /sys/class/backlight/corgi-bl/brightness
fi

and at the top of the "landscape" section (under "if [ $STATE = "0" ]; then" )
I added:
Code: [Select]
echo 30 > /sys/class/backlight/corgi-bl/brightness
Brightness is 0 (off) to 47 (full bright). Poke around at the other files in /sys/class/backlight/corgi-bl/ to find fun stuff like max_brightness, etc. Anyways, this little hack should get you by until the new zaurusd comes out.

BTW, if you close the Zaurus, then suspend it, then open it, then resume it (in that order), you'll end up with the Zaurus resumed with the backlight off. In that case close the lid, wait a couple seconds and re-open it to make the backlight come on again. You might find other problems with the way I did this since it was just a quick hack to let me listen to music on the go rather than a real fix.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=123798\"][{POST_SNAPBACK}][/a][/div]

This should really be made part of the default build.
SL-C1000 Akita running OZ 3.5.4.1 with GPE
Ambicom WL1100C-CE Wifi Card
Sandisk 1GB SD Card

Looking for advice as to how to get snes9x and dgen-sdl running!

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Playing Mp3s Volume & Screen Blanking
« Reply #8 on: September 21, 2006, 04:52:19 am »
You could add it to the bugtracker as an "enhancement" type bug.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva