07-07-2023, 09:45 PM
(This post was last modified: 07-07-2023, 09:46 PM by jenzd.
Edit Reason: typo
)
Thanks for adding the switch! 
It seems that I was wrong to suspect that sample rate would be fixed for other codecs as well. I probablly didn't understand the source code correctly (which is quite long and distributed over many files).
Even better so - no side effects. In case somebody really wants to use 44.1 kHz there is still the switch "--a2dp-force-audio-cd" which could be used.
By the way: "bluealsa-cli --verbose list-pcms" shows the codec details as well. They are, however, less readable as they are given by a hexadecimal number after the codec name, e.g. "Selected codec: SBC:21150228", and you need to refer to the source code of bluealsa to decode it (https://github.com/arkq/bluez-alsa/blob/...ecs.h#L515).
In this example the flags say:
'2': sampling frequency 44.1 kHz,
'1': joint stereo
'1': block length 16,
'5': subbands 8 & allocation loudness,
'02': min bitpool = 2
'28': max bitpool = 40
Cheers
Jens

It seems that I was wrong to suspect that sample rate would be fixed for other codecs as well. I probablly didn't understand the source code correctly (which is quite long and distributed over many files).
Even better so - no side effects. In case somebody really wants to use 44.1 kHz there is still the switch "--a2dp-force-audio-cd" which could be used.
By the way: "bluealsa-cli --verbose list-pcms" shows the codec details as well. They are, however, less readable as they are given by a hexadecimal number after the codec name, e.g. "Selected codec: SBC:21150228", and you need to refer to the source code of bluealsa to decode it (https://github.com/arkq/bluez-alsa/blob/...ecs.h#L515).
In this example the flags say:
'2': sampling frequency 44.1 kHz,
'1': joint stereo
'1': block length 16,
'5': subbands 8 & allocation loudness,
'02': min bitpool = 2
'28': max bitpool = 40
Cheers
Jens