蓝牙耳机暂停/播放按钮不起作用

蓝牙耳机暂停/播放按钮不起作用

我一直在尝试在运行 Manjaro 17.1.10 的笔记本电脑上使用耳机上的暂停/播放按钮 (Plantronics BackBeat Pro 2)。他们还有“下一个”和“上一个”按钮,运行得非常好。我在 Spotify、Clementine 和 VLC 中尝试过它们,结果相同。

我读过 Arch wiki 页面:

从我发现的情况看来,我需要加载uinput内核模块。我读过的指南说它们应该放在两个不同的地方,但没有人解释要放入什么。

/etc/rc.conf

/etc/modules-load.d/uinput.conf \<-- (我认为这是用于旧方法?)

这是我在尝试寻找它时得到的结果:

[ibro@ibro-pc ~]$ lsmo |grep uinput
bash: lsmo: command not found
[ibro@ibro-pc ~]$ lsmod |grep uinput
uinput                 20480  1
[ibro@ibro-pc ~]$ grep uinput /proc/modules
uinput 20480 1 - Live 0xffffffffc048d000
[ibro@ibro-pc ~]$ grep uinput /proc/$(uname -r)/modules.builtin
grep: /proc/4.14.40-1-MANJARO/modules.builtin: No such file or directory
[ibro@ibro-pc ~]$ pulseaudio --version
pulseaudio 11.1

因此,假设这是问题,我需要弄清楚在哪里添加以及如何添加uinput 如果不是其他任何问题的解决方案

我想在 Linux 中添加两个额外的耳机功能支持。

  • 取下时智能暂停,戴上后继续播放
  • 主动聆听模式:检测到声音时暂停音乐。

当我跑步时,这两个都有与暂停/播放按钮非常相似的输出xev

KeyPress event, serial 35, synthetic NO, window 0x8800001,
    root 0x16a, subw 0x0, time 13766406, (-871,191), root:(420,262),
    state 0x0, keycode 209 (keysym 0x1008ff31, XF86AudioPause), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x8800001,
    root 0x16a, subw 0x0, time 13766437, (-871,191), root:(420,262),
    state 0x0, keycode 209 (keysym 0x1008ff31, XF86AudioPause), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 35, synthetic NO, window 0x8800001,
    root 0x16a, subw 0x0, time 13767016, (-871,191), root:(420,262),
    state 0x0, keycode 208 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XKeysymToKeycode returns keycode: 172
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x8800001,
    root 0x16a, subw 0x0, time 13767047, (-871,191), root:(420,262),
    state 0x0, keycode 208 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XKeysymToKeycode returns keycode: 172
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

这是实际的键盘暂停/播放按钮

FocusIn event, serial 34, synthetic NO, window 0x8800001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

FocusOut event, serial 34, synthetic NO, window 0x8800001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 34, synthetic NO, window 0x8800001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 34, synthetic NO, window 0x8800001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

相关内容