Sample Header Ad - 728x90

amixer relationship(s) with pipewire

0 votes
1 answer
359 views
I have two computers (call them System A & System B); both are running a "headless" version of Debian 'bookworm'. I use both of them to play music through two Bluetooth speakers - one speaker to each computer. They both play reliably since installing pipewire. Both have Debian's latest 'stable' version of pipewire installed: 1.2.4. And if it makes any difference, I'm using mpg123 as the *player* on System A, and cmus on System B.
$ pipewire --version
pipewire
Compiled with libpipewire 1.2.4
Linked with libpipewire 1.2.4
I wanted to adjust the volume from the CLI - rather than fiddling with the volume controls on the BT speakers themselves. I looked into doing that with pipewire, but [it seemed *arcane*](https://bbs.archlinux.org/viewtopic.php?id=276379) to me. Instead, I found [this blog post from Baeldung](https://www.baeldung.com/linux/volume-level-command-line) that made sense, and it [*mostly* worked well](https://unix.stackexchange.com/q/785314/286615) on System A. When I tried it on System B however, it did not seem to work at all. 'System A' and 'System B' are not identical systems, but they are quite similar; i.e. A is a Raspberry Pi Zero 2W; B is a Raspberry Pi 3A+. REF: [Hardware Summaries](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html) | command | System A | System B | | ------- | -------- | -------- | | $ mixer | Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 26215 [40%] [on]
| Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback -1988 [78%] [-19.88dB] [on]
| | $ amixer info | Card default 'pipewire'/'PipeWire'
Mixer name : 'PipeWire'
Components : ''
Controls : 4
Simple ctrls : 2 | Card default 'Headphones'/'bcm2835 Headphones'
Mixer name : 'Broadcom Mixer'
Components : ''
Controls : 2
Simple ctrls : 1 | | $ amixer sset Master 90% | **SPEAKER VOLUME INCREASES!**
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 58982 [90%] [on]
Front Right: Playback 58982 [90%] [on]
| amixer: Unable to find simple control 'Master',0 | | $ amixer sset PCM 10% | amixer: Unable to find simple control 'PCM',0 | **NO CHANGE IN SPEAKER VOLUME**
Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback -9175 [10%] [-91.75dB] [on]
And so there are several things I don't understand: * Why was pipewire chosen for the default card on System A, and the (Broadcomm) Headphones for System B? * Why is the Mixer control called 'Master' on System A, and 'PCM' on System B? * Why does the sset volume control have no effect on System B, yet seems to work quite well on System A? I looked at [another Q&A here on SE](https://unix.stackexchange.com/a/765342/286615) re "Selecting a card for amixer": * On System A:
$ cat /proc/asound/cards
   --- no soundcards --- 
   
   # and ...
   
   $ cat /etc/asound.conf
   cat: /etc/asound.conf: No such file or directory 

   # and ...

   $ cat /etc/alsa/conf.d/50-pipewire.conf 
   # Add a specific named PipeWire pcm

   defaults.pipewire.server "pipewire-0"
   defaults.pipewire.node "-1"
   defaults.pipewire.exclusive false
   defaults.pipewire.role ""
   defaults.pipewire.rate 0
   defaults.pipewire.format ""
   defaults.pipewire.channels 0
   defaults.pipewire.period_bytes 0
   defaults.pipewire.buffer_bytes 0

   pcm.pipewire {

   # ... etc, etc
* On System B:
$ cat /proc/asound/cards
     0 [Headphones     ]: bcm2835_headpho - bcm2835 Headphones
                          bcm2835 Headphones
     1 [vc4hdmi        ]: vc4-hdmi - vc4-hdmi
                          vc4-hdmi
   
   # and ...
   
   $ cat /etc/asound.conf
   cat: /etc/asound.conf: No such file or directory

   # and ...

   $ less /etc/alsa/conf.d/50-pipewire.conf
   /etc/alsa/conf.d/50-pipewire.conf: No such file or directory
All that said, I am trying to gain a better understanding of how these different pieces of the *sound puzzle* fit together, and a method I can use to control volume from the CLI. *Of course it would be preferable to have the **same** volume control method on both systems.*
Asked by Seamus (3772 rep)
Oct 22, 2024, 07:47 AM
Last activity: Oct 22, 2024, 06:07 PM