Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Stopping music/media player when headset unplugged

    Reply
    Page 7 of 13 | Prev |   5     6   7   8     9   | Next | Last
    slender | # 61 | 2010-01-21, 09:21 | Report

    Could soneone test this.
    - phone rangs
    -- disconnect headphones and answer
    - end call
    - music plays from speakers?

    Maybe this just user error but happened me once.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mike2k4 | # 62 | 2010-01-22, 00:03 | Report

    Originally Posted by slender View Post
    Could soneone test this.
    - phone rangs
    -- disconnect headphones and answer
    - end call
    - music plays from speakers?

    Maybe this just user error but happened me once.
    This has happened to me since the first firmware update, while at work too I didnt even have this app at all either.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mike2k4 | # 63 | 2010-01-22, 19:02 | Report

    Originally Posted by thp View Post
    You can check out the code from https://garage.maemo.org/projects/headphoned and add the code

    If you send me some a2dp hardware, I can try to implement it
    I can't seem to figure out how to determine when a bluetooth headset is disconnected. It seems to work different from the way headphones are unplugged since they use a "state" file. When I disconnect my car stereo's bluetooth, the following line shows up in dbus-monitor:

    Code:
    signal sender=:1.3 -> dest=(null destination) serial=220 path=/org/maemo/Playback/Manager; interface=org.maemo.Playback.Manager; member=BluetoothOverride
    int32 -1
    I do not know if this will help. If not, is there a way to see if the bluetooth headset is currently enabled in the status-menu?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    andrei1089 | # 64 | 2010-01-27, 17:05 | Report

    Originally Posted by slender View Post
    Could soneone test this.
    - phone rangs
    -- disconnect headphones and answer
    - end call
    - music plays from speakers?

    Maybe this just user error but happened me once.
    exactly the same happened to me today

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Alan_Peery | # 65 | 2010-01-27, 19:10 | Report

    Originally Posted by mike2k4 View Post

    I do not know if this will help. If not, is there a way to see if the bluetooth headset is currently enabled in the status-menu?
    I am guessing by analogy here: is there something like /proc/usb called /proc/bluetooth that you could inspect once you've seen one of those events?

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

     
    qwerty12 | # 66 | 2010-01-27, 20:12 | Report

    Yes, you can listen for D-Bus signals saying that the headphones have been removed (mike2k4, sniff the system bus, instead), but there's an easier way: Don't use GIOChannels to monitor the state file, but use libhal to listen for computer_logicaldev_input_1 being removed. This way, you kill two birds with one stone: Removing a wired or a bluetooth headset causes the same event to be broadcast by HAL - "computer_logicaldev_input_1 removed".

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
    Alan_Peery, mike2k4, thp

     
    ziller | # 67 | 2010-01-27, 20:23 | Report

    Originally Posted by slender View Post
    Could soneone test this.
    - phone rangs
    -- disconnect headphones and answer
    - end call
    - music plays from speakers?

    Maybe this just user error but happened me once.
    Happened a couple of times here too, but I've so far not been able to replicate it under "controlled" conditions. But I seem to be having the same behaviour with disconnected skype calls only. Though still not every time.

    headphoned would really need a bugtracker....

    Edit | Forward | Quote | Quick Reply | Thanks

     
    thp | # 68 | 2010-01-27, 20:50 | Report

    Originally Posted by ziller View Post
    Happened a couple of times here too, but I've so far not been able to replicate it under "controlled" conditions. But I seem to be having the same behaviour with disconnected skype calls only. Though still not every time.
    I've experienced this too at times. Feels like some audio (ring)buffer being played once more - probably an issue with some ,,lower layer`` (PA, GStreamer, ALSA?).

    Originally Posted by ziller View Post
    headphoned would really need a bugtracker....
    https://garage.maemo.org/tracker/?group_id=1092

    Edit | Forward | Quote | Quick Reply | Thanks

     
    qwerty12 | # 69 | 2010-01-28, 17:22 | Report

    Originally Posted by qwerty12 View Post
    Yes, you can listen for D-Bus signals saying that the headphones have been removed (mike2k4, sniff the system bus, instead), but there's an easier way: Don't use GIOChannels to monitor the state file, but use libhal to listen for computer_logicaldev_input_1 being removed. This way, you kill two birds with one stone: Removing a wired or a bluetooth headset causes the same event to be broadcast by HAL - "computer_logicaldev_input_1 removed".
    OK, decided to give this a go and came up with http://slexy.org/view/s2HFCPBXm5 - this is unofficial, of course.

    I'm incompetent, tired, and working with a 15" monitor so I ended up removing the parts of the code that make no sense under Fremantle just so that I could read the code without giving myself a headache (not in the sense that thp's code is awful but, rather, in the sense that I couldn't be arsed to keep scrolling up). Not to mention that I much prefer using the GLib bindings to D-Bus (I was sorely tempted to do so until I saw thp was already using libdbus and that I could get a DBusConnection from the osso_context_t)...

    This works for me using the wired headset that came with my N810 and with an el-cheapo, £11 iTech Bluetooth headset I got from eBay. A compiled binary is attached. I'd be curious to know if it works for anyone else. "It" being having the Media Player paused when a Bluetooth headset is disconnected.

    Edit | Forward | Quote | Quick Reply | Thanks
    Attached Files
    File Type: gz headphoned.gz (2.9 KB, 105 views)

    Last edited by qwerty12; 2010-01-28 at 17:28.
    The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
    Alan_Peery, Flandry, thp

     
    unkno | # 70 | 2010-01-30, 05:19 | Report

    Originally Posted by slender View Post
    Could soneone test this.
    - phone rangs
    -- disconnect headphones and answer
    - end call
    - music plays from speakers?

    Maybe this just user error but happened me once.
    This has to do with the way Maemo works. Normally, when a call comes in, the media player is paused and will automatically resume when the call is ended. Since the phone rings with the headphone plugged, unplugging the headphones will pause the already paused music; but when the call is over, maemo will signal the media player to resume playing. I don't think it's possible to fix this given the way it is designed.

    Edit: one more vote and it'll be in extras

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by unkno; 2010-01-30 at 09:04.
    The Following User Says Thank You to unkno For This Useful Post:
    reinob

     
    Page 7 of 13 | Prev |   5     6   7   8     9   | Next | Last
vBulletin® Version 3.8.8
Normal Logout