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

Control audio volume from external sources (headphones, bluetooth speakers, pebble, headsets, carkits)

asked 2015-01-09 14:05:24 +0300

the_mgt gravatar image

updated 2016-02-19 16:29:10 +0300

Currently, it is only possible to adjust the volume via the rockers on the phone, all other controls get ignored. Please add:

  1. Headphones/Headsets Volume buttons, it is an industry standard, from what I understood.
  2. Bluetooth devices with audio output should control the phones volume: Car stereo systems, speakers, etc. Pay attention to stupid bt devices, which would use the level of the Jolla phone instead using a sane default, so that the bt device does not start up with a Jolla set to 100%. Might be irritating to the listener or damaging to the speaker.
  3. Make it possible to use Pebble and other smartwatches to control audio. It can control the played track via MPRIS, dunno what is needed for audio.
  4. Add an option to lock the onboard volume rocker, if a device with external audio control is connected, so we can also tackle this "bug": https://together.jolla.com/question/8239/bug-volume-adjustment-works-while-phone-is-locked-independent-of-any-application/

The current situation is annoying, since I always need to adjust two devices in order to produce a nice volume level with external speakers that have their own volume adjustable.

Update: I found some hints on the internet: http://theheadphonelist.com/wireless-fidelity-making-sense-bluetooth-headphone-technology/#profiles

AVRCP (Audio/Video Remote Control Profile) – provides remote control of media playback (e.g. play/pause and skip/previous track functions); used in conjunction with A2DP. The latest AVRCP versions (1.4 and 1.5) allow direct control of device volume as well. With previous versions, volume controls affected headset volume independently of the connected device.

Edit: Corrected a typo

edit retag flag offensive close delete

Comments

search for volume control please - the bug you mention is fixed apart of android keeping an active audio-sink sometimes but that is actually an aliendalvik thing and not a volumerocker thing as android says "hey I do playback" so the rocker stays active

chemist ( 2015-01-09 18:46:16 +0300 )edit
1

@chemist I have searched for various combinations of "volume" and X before I asked this question, but not a single question related to this once came up. And I am not talking about Android here. I am talking about normal headsets with buttons for volume control, like my Denon ones or the Apple headset. I am talking about my Philips Shoq Box, my JBL OnBeat Venture LT, the Car Kit in our car and my Pebble watch. They all share one common feature: They do not sync volume with Jolla. Either they only adjust their own volume (all of the BT devices) or they do not adjust volume at all (Pebble and the Denon headset.)

Please provide a link to a duplicate or else I will reopen this question tomorrow. The only related things "volume control" showed were:

https://together.jolla.com/question/70748/bluetooth-headphone-connected-but-buttons-dont-work/ were a guy claims "volume controls" are working. I guess it is the same scenario as with my BT devices, it only changes the volume of the BT device and you can adjust Jolla handset volume seperately.

https://together.jolla.com/question/33095/bug-bluetooth-headset-volume-stuck/ were some guy claims it worked once but is now stuck.

the_mgt ( 2015-01-10 01:19:15 +0300 )edit

Just because your headsets did not get mentioned does not mean that these things are not filed as bug or feature request already. The dead on music-volume-control is not mentioned in the searches for volume control either so what do we do with a topic that is mentioned in bits and pieces all over the place and jolla aware of it? I'd rather start a wiki listing what did not work a year ago and is still not working... I reopen and remove the tag but volume-control is part of many other questions... ah and before I forget it, search does only show headers while typing, you need to hit enter to get actual results

chemist ( 2015-01-10 13:15:40 +0300 )edit
1

It is not about my headsets or devices, it is a general problem. I was surprised not to find a single bug about it when searching, but since you can not provide a link to one either, it seems not to be documented.

Other slightly related bugs are: https://together.jolla.com/question/2771/feature-request-support-for-wired-headset-buttonsreleased/ This is about media control, which actually works with my headphone, my bluetooth devices and even with my Pebble. Still, none of these devices have audio control. Do you get the difference?

https://together.jolla.com/question/45017/feature-request-configurable-headset-buttons/ This works exactly the same with my handsfree set in the car. I am ok with that, still, volume is not synced. This is a device I forgot in my initial list.

All other questions related to "volume" and "headset" are talking about wrong audio levels and/or not being able to adjust the volume at all, even with the onboard rocker.

the_mgt ( 2015-01-10 13:31:52 +0300 )edit

I think all those bugs are related to what you are asking for so even my own bugreport https://together.jolla.com/question/33095/bug-bluetooth-headset-volume-stuck/ is about the same issue to some degree (I cannot control the volume from external source - the not working at all is solved by now but still no control from the headset side)

chemist ( 2015-01-12 00:03:10 +0300 )edit

2 Answers

Sort by » oldest newest most voted
4

answered 2015-06-09 19:56:57 +0300

smoku gravatar image

It is possible to programatically control volume. This is what pebbled is doing since version 1.0.

See: https://github.com/smokku/pebble/blob/master/daemon/musicmanager.cpp#L156

edit flag offensive delete publish link more

Comments

Any chance this could be moved to a dedicated daemon? I'd love this to be a systemwide feature, so to change volume during calls and while listening music with audio players. I'm so surprised this feature is not implemented out of the box.

spidernik84 ( 2015-07-05 11:03:35 +0300 )edit
4

answered 2015-12-17 18:17:00 +0300

N-Mi gravatar image

upvoted on this question

Someone gave me a selfie stick, which triggers the camera using a button that generate a "Volume UP" signal on the headphone socket (there is a pluggable jack). This gadget is unusable for me as Volume UP/DOWN are not supported. This gadget works fine on some Android and iOS phone I've tested.

It's not that I'm loving selfie (actually I think I never used the front camera), but as a geek it tickles me when I see something that doesn't work like expected, so I HAVE to find a solution :)

I installed evtest to monitor input events on the phone. Seems headphone buttons are handled by /dev/input/event5 Here is what I have when trying successively a one-button headphone (which triggers BTN_0), and then plugging the selfie stick, whose button events are not detected :

[root@jolla ~]# evtest 
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:  touch_synaptics
/dev/input/event1:  capkey_synaptics
/dev/input/event10: tsl2772_proximity
/dev/input/event11: tsl2772_als
/dev/input/event12: gpio-keys
/dev/input/event2:  pm8xxx_vib_ffmemless
/dev/input/event3:  pmic8xxx_pwrkey
/dev/input/event4:  toh-event
/dev/input/event5:  msm8930-sitar-snd-card Button Jack
/dev/input/event6:  msm8930-sitar-snd-card Headset Jack
/dev/input/event7:  bma2x2
/dev/input/event8:  bmm050
/dev/input/event9:  l3gd20_gyr
Select the device event number [0-12]: 5
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "msm8930-sitar-snd-card Button Jack"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 256 (BTN_0)
    Event code 257 (BTN_1)
    Event code 258 (BTN_2)
    Event code 259 (BTN_3)
    Event code 260 (BTN_4)
    Event code 261 (BTN_5)
    Event code 262 (BTN_6)
    Event code 263 (BTN_7)
Properties:
Testing ... (interrupt to exit)
Event: time 195911.067311, -------------- SYN_REPORT ------------
Event: time 195916.591250, -------------- SYN_REPORT ------------
Event: time 195919.472289, type 1 (EV_KEY), code 256 (BTN_0), value 1
Event: time 195919.472350, -------------- SYN_REPORT ------------
Event: time 195920.589174, type 1 (EV_KEY), code 256 (BTN_0), value 0
Event: time 195920.589205, -------------- SYN_REPORT ------------
Event: time 195922.171807, type 1 (EV_KEY), code 256 (BTN_0), value 1
Event: time 195922.171838, -------------- SYN_REPORT ------------
Event: time 195922.711895, type 1 (EV_KEY), code 256 (BTN_0), value 0
Event: time 195922.711957, -------------- SYN_REPORT ------------
Event: time 195923.901915, type 1 (EV_KEY), code 256 (BTN_0), value 1
Event: time 195923.901946, -------------- SYN_REPORT ------------
Event: time 195924.444506, type 1 (EV_KEY), code 256 (BTN_0), value 0
Event: time 195924.444537, -------------- SYN_REPORT ------------
Event: time 195928.637090, -------------- SYN_REPORT ------------
Event: time 195937.810933, -------------- SYN_REPORT ------------
Event: time 195938.813069, -------------- SYN_REPORT ------------
Event: time 195939.794778, -------------- SYN_REPORT ------------
Event: time 195940.794432, -------------- SYN_REPORT ------------
^C

I'd like to know also if this a lack of support in the hardware, the kernel, or just the software.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
8 followers

Stats

Asked: 2015-01-09 14:05:24 +0300

Seen: 9,173 times

Last updated: Feb 19 '16