Skip to content

si-linkables: add int format-preference-priority SI audio adapter property

This property influences how the SI standard link picks a format during negotiations. An adapter with a higher priority is preferred then, that is, its format has priority over the other adapter's.

The minimum valid priority is 0. The value 0 is the default. 0 means that there is no priority for this adapter format. If both adapters have priority 0, the behavior is as it was before this commit.

If an adapter's priority is greater than 0, the following changes in behavior occur:

  1. In si_audio_adapter_find_format (), new formats are always picked over a format that is already in use. Normally, the new format would only be picked over the one in use if the new format has a greater number of channels.
  2. si_audio_adapter_configure_node () is called immediately when the adapter is activated. Normally, this is only done in certain cases, like when the stream.dont-remix property is true.
  3. In the SI link, the adapter is configured even if the unpositioned flags of one or both adapters are set to true.

The intent of this property is to be used when "upstream" (that is, the media source) wants to enforce its format "downstream". Normally, for example, audio sinks tend to open an audio output device with the maximum amount of channels it can handle, and then keep it open with that amount, even if incoming streams have fewer channels (the extra channels then remain unused). By using these format priorities, a different behavior can be configured where the output device reconfigures the audio hardware to use the amount of channels from upstream.

Edited by Carlos Rafael Giani

Merge request reports

Loading