View previous topic :: View next topic |
Author |
Message |
f1tz Tux's lil' helper
Joined: 27 Aug 2020 Posts: 88
|
Posted: Wed Nov 11, 2020 8:01 am Post subject: [SOLVED] Touch control Sony WH-1000X M3 - AVRCP/Dbus? |
|
|
Dear gentoo people,
has somebody got the touch control (next/previous song) on the WH-1000X M3 headphones got working?
Our wiki says "The touch interface on the right speaker works.".
In this thread from 2014 it is recommended to add Code: | Enable=Control,Gateway,Headset,Media,Sink,Socket,Source | to inside
Which doesnt exist here. I only got: Code: | input.conf, main.conf, network.conf |
Has anybody added this line into his bluetooth config file? If yes, to which file was it? input main or network.conf? Or is this "Enable=..." line obsolete in the meantime?
Didnt log any events, whilst swiping on the touchpad.
There seems to be some solutions with Dbus, will further research that, in case somebody has experience there, thanks for sharing.
Thanks for your advice.
Regards,
f1tz
Last edited by f1tz on Sat Nov 14, 2020 6:36 pm; edited 1 time in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
f1tz Tux's lil' helper
Joined: 27 Aug 2020 Posts: 88
|
Posted: Fri Nov 13, 2020 2:08 pm Post subject: |
|
|
Dear Jaglover,
thanks for your answer.
Yes, I added this line into main.conf which didnt change anything. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
f1tz Tux's lil' helper
Joined: 27 Aug 2020 Posts: 88
|
Posted: Sat Nov 14, 2020 10:06 am Post subject: |
|
|
audio.conf does not exist, or would you create it? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
f1tz Tux's lil' helper
Joined: 27 Aug 2020 Posts: 88
|
Posted: Sat Nov 14, 2020 6:47 pm Post subject: |
|
|
The solution was easy, the bluetooth headset uses X86 mediakeys.
Using the touchpad while having a terminal on with executed
showed that it uses XF86AudioPrev and XF86AudioNext
The package media-sound/playerctl can easily redirect X86 keys via DBus to Spotify.
On reddit the developer of mpris-ctl helped me on this and said he would be happy to have mpris-ctl as an ebuild in the gentoo repos. I thought I might give this a try to get some understanding of portage.
Another, more hard-coded variant (works only for Spotify) which worked was to modify .bash_profile so that the window manager on startup (sway in my case) gets started with dbus-launch ahead.
Code: | exec dbus-launch --sh-syntax --exit-with-session sway |
Without this line, I got the error ".service not found" while trying to send Dbus commands to spotify.
After that it was just adding some minor dotfile keybinding:
Code: | bindsym XF86AudioPlay exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
bindsym XF86AudioPause exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
bindsym XF86AudioNext exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
bindsym XF86AudioPrev exec dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous |
But with playerctl or mpris-ctl it is more flexible as it allows to control other media players. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
|