Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using pnmixer, can I control BlueTooth audio devices?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1557
Location: Adelaide/Australia

PostPosted: Fri Jul 08, 2022 9:08 am    Post subject: Using pnmixer, can I control BlueTooth audio devices? Reply with quote

I have Apple Airpods and some Sony WH 1000 XM3 headphones.

I use either on my Gentoo box watching Youtube using Chrome or Firefox.

The Youtube volume control works.

The Sony slide up and down on the right ear cup changes the volume.

But pnmixer in my icons tray of Fluxbox, which works if I am using speakers and the on-board sound chip, works, but does not work with the BlueTooth devices.

I have the volume control command set to
Code:
/usr/bin/amixer -D pulse sset Master playback


Can I control my Bluetooth devices volume using pnmixer?

I note, in my system log, when I connect the devices, the following:-
Code:
Jul  8 18:11:36 Lyalls-PC pulseaudio[21754]: [pulseaudio] bluez5-util.c: org.freedesktop.DBus.Properties.Get /org/bluez/hci1/dev_7C_C1_80_0D_D9_C9/fd41 Volume property not (yet) available
so, maybe I don't have an appropriate kernel module installed.
_________________
...Lyall
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Sat Jul 16, 2022 3:44 pm    Post subject: Reply with quote

hello,

please read the wiki (again), your device is even listed to work and also there's a tip regarding your problem at the end.

why not use pactl as mixer?!

https://wiki.gentoo.org/wiki/Bluetooth_headset

from wiki:

Quote:
Audio device not visible using PulseAudio volume control (but working with ALSA)

Quote:
According to this forum post, add the following to /etc/pulse/default.pa (and possibly /etc/pulse/system.pa):

Code:
/etc/pulse/default.pa

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluez5-device.so
load-module module-bluez5-device
.endif

.ifexists module-bluez5-discover.so
load-module module-bluez5-discover
.endif

Quote:
Ensure that the pulseaudio and bluetooth USE flags are enabled


for example, i have this in my sway config:

Code:
# Pulseaudio wob

    bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +1% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK
    bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -1% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK

    bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
    bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle


it's not an bluetooth device, but i think it'll work anyway if your BT device is configured correctly.

greetings
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1557
Location: Adelaide/Australia

PostPosted: Sun Jul 17, 2022 4:13 am    Post subject: Reply with quote

pacmd works for me.
The following script, does indeed control my bluetooth headphones (found on forums)
Code:
#!/bin/bash

VOLUME="$*"   # '+10%' '-10%'
for SINK in $(pacmd list-sinks | grep 'index:' | cut -b12-)
do
  pactl set-sink-volume $SINK $VOLUME
done


However, I use pnmixer in my Fluxbox systray and it does not control the Bluetooth headset volume, even if I update the mixer setting to use the above script.

I already use pavucontrol, which does work, but I was hoping to have a systray app that works, because pavucontrol is too complicated for my use case.
_________________
...Lyall
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum