Re: [PATCH v3 2/7] soundwire: intel: Allow for dynamic assignment of PDIs
From: Cezary Rojewski
Date: Fri Nov 06 2026 - 07:37:38 EST
On 11/6/2026 1:15 PM, Cezary Rojewski wrote:
> Currently, PDIs are assigned upfront based on the DAI IDs. Some drivers
> do not assign anything upfront and request a free PDI when streaming is
> about to start.
>
> Provide assign/release() functions to allow them to be assigned
> dynamically. This also streamlines the process of assigning/releasing
> PDIs with what is done in HDAudio library (sound/hda) for HDAudio
> streams, see snd_hdac_stream_assign/release().
>
> As resource availability-check is typically done during dai->startup()
> whilst hardware/firmware configuration occurs on dai->hw_params(), add
> sdw_intel_pdi_config() to maintain this logical split - assign on
> start(), configure on hw_params(). Existing code does all of that in
> intel_hw_params() so the logical split is not possible.
>
> Cc: Vinod Koul <vkoul@xxxxxxxxxx>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>
Scratch that, will send v4 soon. While rebasing messed up this commit.