Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Speaker/Headphone switch?

    Reply
    vs.taras | # 1 | 2009-02-17, 05:18 | Report

    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?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Thesandlord | # 2 | 2009-02-17, 06:44 | Report

    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...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    codeMonkey | # 3 | 2009-02-17, 09:15 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    pycage | # 4 | 2009-02-17, 10:14 | Report

    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

    Edit | Forward | Quote | Quick Reply | Thanks

     
    dfinch | # 5 | 2009-02-17, 11:30 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Sevanteri | # 6 | 2009-02-17, 11:44 | Report

    Originally Posted by dfinch View Post
    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.
    Ha... Never thought that either. :P

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    vs.taras | # 7 | 2009-02-17, 13:30 | Report

    Originally Posted by codeMonkey View Post
    Definitely possible - I'm sure that someone implemented a daemon to change volume when the head-set is plugged in.
    That would be awesome if you could find that daemon..
    I'm surprised this isn't ever brought up.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    codeMonkey | # 8 | 2009-02-17, 13:42 | Report

    There were discussions here.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to codeMonkey For This Useful Post:
    lm2

     
vBulletin® Version 3.8.8
Normal Logout