PDA

View Full Version : Controlling Internal Speaker via Software


JAmerican
02-01-2008, 05:14 PM
Does anyone know a way to disable the internal speaker on the Palm TX so that if I am playing music in PTunes, the music is not outputted to the speaker? Also, anyone know if it is possible to detect when the headphones are removed from TX?

JAmerican

ahsirg
02-02-2008, 02:40 AM
AFAIK on Palm PDAs the selection Heaphones-Speaker is made via hardware, and does not provide any event or notification to the system (unlike the Treo)

_Em
02-03-2008, 12:00 AM
I was going to post this, but didn't because of something I've noticed... the PalmOS adjusts the volume when you plug in headphones. If you have the EUAudioFix patch installed, you'll really notice it -- when you plug in headphones it takes a split second for the volume to adjust -- same happens when you unplug. So even though it's done in hardware, there's something undocumented that can be done via software to detect headphones and adjust the volume.

JAmerican
02-03-2008, 09:21 AM
I was going to post this, but didn't because of something I've noticed... the PalmOS adjusts the volume when you plug in headphones. If you have the EUAudioFix patch installed, you'll really notice it -- when you plug in headphones it takes a split second for the volume to adjust -- same happens when you unplug. So even though it's done in hardware, there's something undocumented that can be done via software to detect headphones and adjust the volume.

Yea your right. Right now, I just opened my TX and put black tape over the speaker. I really don't like when my headphones are pulled out and the TX blasts my music. But, sometimes I do like playing music through the speaker so I'm kinda SOL.

JAmerican

dmitrygr
02-03-2008, 02:55 PM
there is a VERY simple hardware way to determine if headphones are plugged in :-)
not even a need for a function call. :-) just need to read one memory location. a certain bit set means no headphones, cleared means headphones inserted


address is 0x90E00100, bit is 11

JAmerican
02-03-2008, 07:09 PM
there is a VERY simple hardware way to determine if headphones are plugged in :-)
not even a need for a function call. :-) just need to read one memory location. a certain bit set means no headphones, cleared means headphones inserted


address is 0x90E00100, bit is 11

How would I access that using HB++. I bet I would need someone to write me a library to access it using HB++.

alt236
02-03-2008, 07:57 PM
Not a full library. An ARMlet should be enough.

dmitrygr
02-03-2008, 08:13 PM
no need even for that
these 8 bytes are enough:

00 00 91 E5 1E FF 2F E1

that IS the armlet you need

for parameter pass it 0x90E00100.

It will return the value there, to check bit 11, AND it with 2048 :)