Speaker/Headphone switch?
Some of you have probably experienced this problem:
You're listening to music with your tablet, and the headphone jack comes out. Voila, now the library, your class, or just the general public are forced upon your blaring and horrendous music taste. Is there any way to spare this incident from occuring again? Maybe an applet for switching between headphones and speakers? Or a hack to pause the music if you headphones come out, like the iPod? I really don't want to have to get another music player, and will have to if I can't solve this. Any ideas out there guys? |
Re: Speaker/Headphone switch?
I know this is possible. Don't have the skill to make it.
Is this already done somewhere? For example, the FM radio apps can select between speakers and headphones... |
Re: Speaker/Headphone switch?
Definitely possible - I'm sure that someone implemented a daemon to change volume when the head-set is plugged in.
I think someone implemented something similar with powerlaunch, too. |
Re: Speaker/Headphone switch?
You could monitor /sys/devices/platform/gpio-switch/headphone/state for detecting plugging in the headset. It also generates some D-Bus event, IIRC.
Here's some code for headset stuff: https://garage.maemo.org/plugins/scm...ox&view=markup |
Re: Speaker/Headphone switch?
Depending upon how you are using the tablet, can you loop the cable around the stand one time to provide a strain relief?
A more elegant solution would be a strip of (soft side) self adhesive velcro on the back of the tablet. Then plug in, pass the cable over the soft velcro and hold in place with the grippy velcro strip. This would put a 180 deg bend in the cable (make the loop gentle) and any tug would not pull the plug. Not quite the solution you were after but simple, quick and certainly do-able. |
Re: Speaker/Headphone switch?
Quote:
I also had the same idea some time ago. But I too don't have the skill to do even that simple app. I can make an app that checks the /sys/devices/platform/gpio-switch/headphone/state but... how do I make it mute my tablet and other way; how to make an background app; and how to make it start when the tablet starts. |
Re: Speaker/Headphone switch?
Quote:
I'm surprised this isn't ever brought up. |
Re: Speaker/Headphone switch?
There were discussions here.
|
| All times are GMT. The time now is 07:54. |
vBulletin® Version 3.8.8