07-03-2023, 10:07 PM
Apart from rare glitches for some devices (due to dual channel mode instead of joint stereo and high bitrate which, however, should both be supported if the device is truely bluetooth compliant), there is another (maybe minor) issue with the current specifiic implementation in bluealsa.
As far as I have seen in the source code (and backed by a few quick tests), bluealsa limits the sample rate to 44.1 kHz when "--sbc-quality=xq" or "--sbc-quality=xq+" are specified. Not only for SBC (intended for XQ/XQ+ here), but also if another codec is finally used by the device (e.g. aptX), i.e. "--sbc-quality=xq/xq+" effectively implies the switch "--a2dp-force-audio-cd". Otherwise 48 kHz sample rate would be typically preferred over 44.1 kHz when the sample rate is negotiated.
(See https://github.com/arkq/bluez-alsa/blob/...sbc.c#L125
where config.a2dp.force_44100 is a global rather than a SBC specific setting, if I understand the code correctly.)
Since Moode is primarily targeted on music which - in most cases - has a native sample rate of 44.1 kHz, this may even be seen as a feature, since "--a2dp-force-audio-cd" is what you might want to choose anyway. Still I would see this as a rather unexpected side effect.
Best regards
Jens
As far as I have seen in the source code (and backed by a few quick tests), bluealsa limits the sample rate to 44.1 kHz when "--sbc-quality=xq" or "--sbc-quality=xq+" are specified. Not only for SBC (intended for XQ/XQ+ here), but also if another codec is finally used by the device (e.g. aptX), i.e. "--sbc-quality=xq/xq+" effectively implies the switch "--a2dp-force-audio-cd". Otherwise 48 kHz sample rate would be typically preferred over 44.1 kHz when the sample rate is negotiated.
(See https://github.com/arkq/bluez-alsa/blob/...sbc.c#L125
Code:
if (config.sbc_quality == SBC_QUALITY_XQ ||
config.sbc_quality == SBC_QUALITY_XQPLUS) {
info("Activating SBC Dual Channel HD (SBC %s)",
config.sbc_quality == SBC_QUALITY_XQ ? "XQ" : "XQ+");
config.a2dp.force_44100 = true;
}
Since Moode is primarily targeted on music which - in most cases - has a native sample rate of 44.1 kHz, this may even be seen as a feature, since "--a2dp-force-audio-cd" is what you might want to choose anyway. Still I would see this as a rather unexpected side effect.
Best regards
Jens