Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alsa and/or Bluetooth setup differences between models 3A+ & Zero 2W #6432

Open
seamusdemora opened this issue Oct 23, 2024 · 1 comment
Open

Comments

@seamusdemora
Copy link

Describe the bug

The default installation of alsa & bluetooth is very different on my 3A+ than it is on my Zero 2W, despite the fact that the same OS was installed on both: 'bookworm', Raspberry Pi OS (64-bit), and both use the same version of pipewire.

Steps to reproduce the behaviour

Install RPi OS 64-bit on 3A+, and on Zero 2W

Device (s)

Raspberry Pi 3 Mod. A+

System

FOR Zero 2W:

$ cat /etc/rpi-issue
Raspberry Pi reference 2024-07-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 48efb5fc5485fafdc9de8ad481eb5c09e1182656, stage2
...
$ vcgencmd version
Aug 30 2024 19:19:11
Copyright (c) 2012 Broadcom
version 2808975b80149bbfe86844655fe45c7de66fc078 (clean) (release) (start) 
...
$ uname -a
Linux rpi2w 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux

FOR 3A+

$ cat /etc/rpi-issue
Raspberry Pi reference 2024-07-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 48efb5fc5485fafdc9de8ad481eb5c09e1182656, stage2
...
$ vcgencmd version
Aug 30 2024 19:19:11
Copyright (c) 2012 Broadcom
version 2808975b80149bbfe86844655fe45c7de66fc078 (clean) (release) (start)
...
$ uname -a
Linux rpi3a 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux

Logs

No response

Additional context

FOR Zero 2W:

pi@rpi2w:~ $ amixer
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]
  Front Right: Playback 26215 [40%] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 26215 [40%] [on]
  Front Right: Capture 26215 [40%] [on] 

...

pi@rpi2w:~ $ amixer controls
numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'

...

pi@rpi2w:~ $ amixer info
Card default 'pipewire'/'PipeWire'
  Mixer name	: 'PipeWire'
  Components	: ''
  Controls      : 4
  Simple ctrls  : 2 

...

pi@rpi2w:~ $ 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 {
	@args [ SERVER NODE EXCLUSIVE ROLE RATE FORMAT CHANNELS PERIOD_BYTES BUFFER_BYTES ]
	@args.SERVER {
		type string
		default {
			@func refer
			name defaults.pipewire.server
		}
	}
	@args.NODE {
		type string
		default {
			@func refer
			name defaults.pipewire.node
		}
	}
	@args.EXCLUSIVE {
		type integer
		default {
			@func refer
			name defaults.pipewire.exclusive
		}
	}
	@args.ROLE {
		type string
		default {
			@func refer
			name defaults.pipewire.role
		}
	}
	@args.RATE {
		type integer
		default {
			@func refer
			name defaults.pipewire.rate
		}
	}
	@args.FORMAT {
		type string
		default {
			@func refer
			name defaults.pipewire.format
		}
	}
	@args.CHANNELS {
		type integer
		default {
			@func refer
			name defaults.pipewire.channels
		}
	}
	@args.PERIOD_BYTES {
		type integer
		default {
			@func refer
			name defaults.pipewire.period_bytes
		}
	}
	@args.BUFFER_BYTES {
		type integer
		default {
			@func refer
			name defaults.pipewire.buffer_bytes
		}
	}

	type pipewire
	server $SERVER
	playback_node $NODE
	capture_node $NODE
	exclusive $EXCLUSIVE
	role $ROLE
	rate $RATE
	format $FORMAT
	channels $CHANNELS
	period_bytes $PERIOD_BYTES
	buffer_bytes $BUFFER_BYTES
	hint {
		show on
		description "PipeWire Sound Server"
	}
}

ctl.pipewire {
        @args.SERVER {
                type string
                default {
                        @func refer
                        name defaults.pipewire.server
                }
        }
        type pipewire
        server $SERVER
}

FOR 3A+

pi@rpi3a:~ $ amixer
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 scontrols
Simple mixer control 'PCM',0 

...

pi@rpi3a:~ $ amixer info
Card default 'Headphones'/'bcm2835 Headphones'
  Mixer name	: 'Broadcom Mixer'
  Components	: ''
  Controls      : 2
  Simple ctrls  : 1

...

pi@rpi3a:~ $ cat /etc/alsa/conf.d/50-pipewire.conf
cat: /etc/alsa/conf.d/50-pipewire.conf: No such file or directory

I could go on as there are several/many other differences. My question/bug report is WHY are the configurations SO DIFFERENT?

  • both systems use a single Bluetooth speaker as the sole sound output
  • both systems report pipewire, Compiled (and linked) with libpipewire 1.2.4
  • one system (Zero 2W) uses mpg123 for the player; the other (3A+) has mpg123 and cmus installed
  • both systems play sound reliably
  • I've just learned that on the Zero 2W, I can adjust the volume using amixer sset Master <XX>%, but on the 3A+, a similar command is accepted without error, but the volume DOES NOT CHANGE?!
@popcornmix
Copy link
Collaborator

This is not a linux (kernel) issue so this is the wrong place.

But before I close it,. what happens if you swap the sdcards over?

Is the behaviour linked to the board or the sdcard?
My guess is that it's the sdcard, and for some reason one of them has pipewire installed and the other does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants