Skip to content

A2DP codec switching

P V requested to merge pvir/pipewire:a2dp-codec-switching into master

Implement A2DP codec switching.

The different codecs are for now exposed in different card profiles, for easier testing, since I think not many UIs support the new pulseaudio codec system yet. This probably could become a separate param in future.

Changing codecs destroys old sinks/sources and creates new ones, similarly as changing profiles.

This MR also contains changes to how pipewire deals with BlueZ changing device profiles. Now, if profiles appear or disappear "late" (after DEVICE_PROFILE_TIMEOUT_SEC) when the pipewire device has already been created, it'll result to an object info update. This change fixes #645 (closed)

In principle, it would be possible to associate remote stream endpoint <-> codec in 1-to-1 relation, which could simplify this a bit. However, in that case, SBC-XQ could not be a separate codec, and it would need to be handled in a different way.

Another potential simplification would be to give up if already the first SetConfiguration fails.

Cf. #478 (closed)

Edited by P V

Merge request reports