mbox series

[0/9] ASoC: SOF: ipc4-topology: Improve the audio format selection logic

Message ID 20230515103336.16132-1-peter.ujfalusi@linux.intel.com (mailing list archive)
Headers show
Series ASoC: SOF: ipc4-topology: Improve the audio format selection logic | expand

Message

Peter Ujfalusi May 15, 2023, 10:33 a.m. UTC
Hi,

Improve the logic to account for the current restrictions in topology while
making it extensible for future topology modifications.

The current topology definitions assume that input/output formats come in pairs.
For example even if there's only 1 output format for a module, we add 3 output
formats to match that of the input format count with the same parameters.
This is unnecessary but we have to deal with it until the topologies are
modified.

Additionally, choosing the input/output audio format should depend only on the
pipeline params or the runtime FE hw_params depending on where the module is in
the pipeline.
This PR modifies the logic for selection based on this and removes unnecessary
dependencies between the input and output formats.

Regards,
Peter
---
Ranjani Sridharan (9):
  ASoC: SOF: ipc4-topology: Handle input/output audio format special
    case
  ASoC: SOF: ipc4-topology: Add a helper function for output format
    selection
  ASoC: SOF: ipc4-topology: Move the call to init output format
  ASoC: SOF: ipc4-topology: Rename sof_ipc4_init_audio_fmt()
  ASoC: SOF: ipc4-topology: Handle output format special case
  ASoC: SOF: ipc4-topology: Add a new helper function to get the valid
    bits
  ASoC: SOF: ipc4-topology: Modify the output format selection logic
  ASoC: SOF: ipc4-topology: New helper to check if all output formats
    are the same
  ASoC: SOF: ipc4-topology: Modify input audio format selection logic

 sound/soc/sof/ipc4-topology.c | 358 ++++++++++++++++++++++------------
 1 file changed, 237 insertions(+), 121 deletions(-)

Comments

Mark Brown May 15, 2023, 3:31 p.m. UTC | #1
On Mon, 15 May 2023 13:33:27 +0300, Peter Ujfalusi wrote:
> Improve the logic to account for the current restrictions in topology while
> making it extensible for future topology modifications.
> 
> The current topology definitions assume that input/output formats come in pairs.
> For example even if there's only 1 output format for a module, we add 3 output
> formats to match that of the input format count with the same parameters.
> This is unnecessary but we have to deal with it until the topologies are
> modified.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/9] ASoC: SOF: ipc4-topology: Handle input/output audio format special case
      commit: 4c7873d60958ed1895b6552fb1e15fa2bbf06cad
[2/9] ASoC: SOF: ipc4-topology: Add a helper function for output format selection
      commit: 523042f63febca24cbf9cf83729044c3dbaa9706
[3/9] ASoC: SOF: ipc4-topology: Move the call to init output format
      commit: a2e07c3319f79f7305641b98d32765dc5b607873
[4/9] ASoC: SOF: ipc4-topology: Rename sof_ipc4_init_audio_fmt()
      commit: ae45aebe45600a85c410280badec6b209979cf7c
[5/9] ASoC: SOF: ipc4-topology: Handle output format special case
      commit: f1ceebdbe8d8915edb64045853ab23db8ddade60
[6/9] ASoC: SOF: ipc4-topology: Add a new helper function to get the valid bits
      commit: 35171c1a907cb1226ba190685c38f62ef02bbed8
[7/9] ASoC: SOF: ipc4-topology: Modify the output format selection logic
      commit: 1af13f221ac331e2d493896df5315fb8b211b4aa
[8/9] ASoC: SOF: ipc4-topology: New helper to check if all output formats are the same
      commit: f37b702cb6f76963013af951737e49e61bf35771
[9/9] ASoC: SOF: ipc4-topology: Modify input audio format selection logic
      commit: 5a56c5335d36decbdcb80900c665360fbbd1042a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark