We have moved to a new Sailfish OS Forum. Please start new discussions there.
163

[Feature-request] Support for wired headset buttons[released] [released]

asked 2013-12-26 17:48:15 +0200

pazix gravatar image

updated 2014-06-21 12:42:14 +0200

zlatko gravatar image

I have standard one button Android ear plugs and the button of ear plugs is not working? Mic is working fine. Is there coming Jolla handsfree set or are Android sets fine with Jolla?

If your are planning Jolla set, hard plastic is much better.

I think that Jolla should support following functions with one button handsfree set.

  • answering phone calls
  • disconnecting phone calls
  • redial(quick double press)
  • pausing media app
  • playing media app
edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by r0kk3rz
close date 2015-01-21 19:05:14.536875

Comments

What is the exact type of ear plugs you have? Which bluetooth profiles does it support?

Kontio ( 2013-12-26 17:58:34 +0200 )edit

I have wired headset Philips she2105wt/00.

http://www.philips.co.in/c/headphones/white-she2105wt_00/prd/

pazix ( 2013-12-26 18:08:41 +0200 )edit

I have the Nokia headset http://www.amazon.co.uk/gp/product/B007GMNWQ4/ref=ohdetailso00s00i00 and here also the button does not work for some reason.

lkraav ( 2013-12-26 19:50:57 +0200 )edit
11

I would like to see also extra support in Media player: Press headset button two times to skip track. This is supported by some Android phones, but not all.

hana ( 2013-12-28 11:03:12 +0200 )edit

Marshall Major - the same problem.

cropas ( 2013-12-28 18:09:04 +0200 )edit

5 Answers

Sort by » oldest newest most voted
8

answered 2014-02-10 12:11:13 +0200

xenoide gravatar image

In this https://together.jolla.com/question/6716/headphone-nokia-n9-and-jolla/#post-id-6721 thread, it was already clarified, which headset standard Jolla uses. It is the TRRS-AHJ type of wiring.

So basically this defines the pinout and electrical characteristics.

However, support for hardware buttons (call management, volume, etc.) needs to be compatible to phone software AND hardware. Until now I could not find any detailed technical information on this at Jolla.

Maybe one of the Jolla team could clarify, if the current Jolla phone would ever be able to support headset buttons at all (because it needs to be desiged to do so and this function can not be adapted by a future SW patch if the necessary HW is missing)..

edit flag offensive delete publish link more

Comments

5

I can see kernel messages when I press the button on my Sennheiser MM 70s earbuds, so I think there is hardware and basic software support for Android-compatible wired headsets with a single button. It's then a matter of creating support for it in Sailfish OS and apps like Phone and Media player.

I used this command for monitoring what happens when I press the button (requires devel-su in Terminal).

watch -n 0,2 "dmesg | tail -20"

End monitoring by pressing CTRL+C.

hana ( 2014-02-12 03:58:05 +0200 )edit

I Can confirm: when I "watch" that event log I can see events when I press the middle button in the headphones. Volume did not output anything. And I cannot change the volume with the buttons.

Headphones are "Apple EarPods with Remote and Mic".

Juuba ( 2014-03-12 09:19:47 +0200 )edit

Had hoped for this to be solved in 1.0.4.20, but, still not working. Keep voting the issue up

mikael ( 2014-03-19 01:56:38 +0200 )edit

Also a compatibility list would be handsome if this ever gets working.

Macilaci457 ( 2014-03-24 18:26:50 +0200 )edit

Hmm, I'm pretty sure I have the right standard (since audio works without adapter and on the N900 I needed an adapter), but the watch command did not give me any specific messages when I pressed the one and only take-call/pause/play button (yes, I was root).

Larswad ( 2014-04-16 17:51:09 +0200 )edit
4

answered 2014-05-02 21:07:44 +0200

Zer0C001 gravatar image

updated 2014-05-03 01:13:12 +0200

I've started writing a simple python script to implement this.

Currently it works, provided you patch /usr/lib/qt5/qml/com/jolla/mediaplayer/AudioPlayer.qml ( a new patchfile is in the repo ), but you will need to run it in fingerterm/ssh after each reboot.

You can find it here:

https://github.com/Zer0C001/jolla_headset_button

edit flag offensive delete publish link more

Comments

2

can't you integrate this into patchmanager app format?

dsilveira ( 2014-05-15 17:29:06 +0200 )edit

so first of all jolla implemented dbus for media player, so there is nothing to be done now, second for this script dbus-python is a dependency so it needs to be installed. now since jolla already implemented pause feature it "interferes" with this script. so what i've done is i commented out the count to one and the feature to pause and i changed the input device to the correct one, it appears jolla changed this too. now everything works fine :) although one side-effect is at skipping songs to the previous one it gets paused, but sfos starts the playback of the new song anyway, so this is acceptable. https://drive.google.com/open?id=0B7vmMR4ej6VXTnAwbjlIN3Z2UWs

smatkovi ( 2017-12-07 17:42:24 +0200 )edit
3

answered 2014-04-30 21:40:40 +0200

Zer0C001 gravatar image

updated 2014-04-30 23:24:17 +0200

I got my Jolla phone yesterday and only now started to investigate the OS, but here's what I found about this:

  1. button support :
    You can read keypresses from /dev/input/event5 or it's symlink /dev/input/by-path/platform-soc-audio.0-event-headset-button .
    So hardware and kernel support is here ( at least with the current version ), and this functionality could be implemented a userspace application.
  2. media player control:
    The stock media player ( in 1.0.5.19 ) can not be controlled by another application, since it is missing a dbus interface. To fix this oversight you would need to apply this patch https://github.com/ruedigergad/SkippingStones/blob/master/audioplayer_dbus.patch , or just install the SkippingStones application.
edit flag offensive delete publish link more
3

answered 2014-06-19 23:13:55 +0200

gehowa gravatar image

Although it was nice that 1.0.7.16 introduced support for wired headset buttons I wasn't too happy with the default behaviour of one-buttoned headsets (play/pause). Therefore, I created a modified version of AudioPlayer.qml, which uses short press for play/pause, and long press for next song. Just replace /usr/lib/qt5/qml/com/jolla/mediaplayer/AudioPlayer.qml with this.

edit flag offensive delete publish link more

Comments

i think with sfos 2.0 they changed something on the structure of this file or the whole mediaplayer, because it doesn't start after replacing it, i try to find out what you changed and if it is possible to do that on the new file too

smatkovi ( 2017-11-01 22:08:59 +0200 )edit
2

answered 2014-06-10 09:44:31 +0200

icebox gravatar image

I updated to 1.0.7.16, Saapunki which should include support for "Accept/end calls using wired headset keys" but it doesn't work (at least using a pair of Samsung stock headphones)

edit flag offensive delete publish link more

Comments

Works with HTC One headset for me.

zlatko ( 2014-06-10 10:12:35 +0200 )edit
2

Accepting a call does not work for me (with a JVC ha-fr65s headset). Ending a call or controling media player to pause/resume the music does work with the same headset, so this seems like a software bug.

vbregier ( 2014-06-10 11:20:43 +0200 )edit

I tried play/pause and it doesn't work either with the stock samsung headsets.

icebox ( 2014-06-10 12:32:42 +0200 )edit

As I understand only Answer/Reject calls is implemented so far.

zlatko ( 2014-06-10 15:58:46 +0200 )edit

Yes, but @vbregier reported that it works for him with the JVC. What I meant is that it doesn't work either as answer/end call either for media play/pause

icebox ( 2014-06-10 16:06:18 +0200 )edit

Question tools

Follow
27 followers

Stats

Asked: 2013-12-26 17:48:15 +0200

Seen: 3,927 times

Last updated: Jun 21 '14