mbox series

[v2,00/16] Harden SSP boards and add TDM support

Message ID 20231012083514.492626-1-amadeuszx.slawinski@linux.intel.com (mailing list archive)
Headers show
Series Harden SSP boards and add TDM support | expand

Message

Amadeusz Sławiński Oct. 12, 2023, 8:34 a.m. UTC
In quite a few places in code there are checks for number of SSPs
present on system, to reduce maintenance burden introduce helper
functions allowing to get SSP and TDM from machine board configuration.

Current mechanism replaces "%d" present in some routes and widget names
with SSP number. However there are also configurations which make use of
of TDM number, in which case expected behavior would be to have string
in form of SSP:TDM - see implementation of avs_i2s_platform_register()
in sound/soc/intel/avs/pcm.c. Implement custom function, which parses
string and make use of it when parsing topology. While at it make sure
that we generate dynamic names only if there is no multiple SSPs or TDMs
defined.

Migrate all boards to handle TDM if requested.

v2:
 - Fix header functions to be static

Amadeusz Sławiński (16):
  ASoC: Intel: avs: Only create SSP%d snd_soc_dai_driver when requested
  ASoC: Intel: avs: Introduce helper functions for SSP and TDM handling
  ASoC: Intel: avs: Improve topology parsing of dynamic strings
  ASoC: Intel: avs: i2s_test: Validate machine board configuration
  ASoC: Intel: avs: rt274: Validate machine board configuration
  ASoC: Intel: avs: rt5682: Validate machine board configuration
  ASoC: Intel: avs: max98357a: Validate machine board configuration
  ASoC: Intel: avs: rt298: Validate machine board configuration
  ASoC: Intel: avs: da7219: Validate machine board configuration
  ASoC: Intel: avs: es8336: Validate machine board configuration
  ASoC: Intel: avs: max98373: Validate machine board configuration
  ASoC: Intel: avs: max98927: Validate machine board configuration
  ASoC: Intel: avs: nau8825: Validate machine board configuration
  ASoC: Intel: avs: rt286: Validate machine board configuration
  ASoC: Intel: avs: rt5663: Validate machine board configuration
  ASoC: Intel: avs: ssm4567: Validate machine board configuration

 sound/soc/intel/avs/board_selection.c  |   2 +-
 sound/soc/intel/avs/boards/da7219.c    |  17 +++--
 sound/soc/intel/avs/boards/es8336.c    |  18 +++--
 sound/soc/intel/avs/boards/i2s_test.c  |  55 ++++++++-----
 sound/soc/intel/avs/boards/max98357a.c |  18 +++--
 sound/soc/intel/avs/boards/max98373.c  |  18 +++--
 sound/soc/intel/avs/boards/max98927.c  |  18 +++--
 sound/soc/intel/avs/boards/nau8825.c   |  18 +++--
 sound/soc/intel/avs/boards/rt274.c     |  18 +++--
 sound/soc/intel/avs/boards/rt286.c     |  19 +++--
 sound/soc/intel/avs/boards/rt298.c     |  18 +++--
 sound/soc/intel/avs/boards/rt5663.c    |  18 +++--
 sound/soc/intel/avs/boards/rt5682.c    |  18 +++--
 sound/soc/intel/avs/boards/ssm4567.c   |  18 +++--
 sound/soc/intel/avs/pcm.c              |  28 ++++---
 sound/soc/intel/avs/topology.c         | 102 +++++++++++++++++++------
 sound/soc/intel/avs/utils.h            |  65 ++++++++++++++++
 17 files changed, 346 insertions(+), 122 deletions(-)
 create mode 100644 sound/soc/intel/avs/utils.h


base-commit: 7cd4a5a1531109287d8d9d34144020189201c031

Comments

Mark Brown Oct. 12, 2023, 5:42 p.m. UTC | #1
On Thu, 12 Oct 2023 10:34:58 +0200, Amadeusz Sławiński wrote:
> In quite a few places in code there are checks for number of SSPs
> present on system, to reduce maintenance burden introduce helper
> functions allowing to get SSP and TDM from machine board configuration.
> 
> Current mechanism replaces "%d" present in some routes and widget names
> with SSP number. However there are also configurations which make use of
> of TDM number, in which case expected behavior would be to have string
> in form of SSP:TDM - see implementation of avs_i2s_platform_register()
> in sound/soc/intel/avs/pcm.c. Implement custom function, which parses
> string and make use of it when parsing topology. While at it make sure
> that we generate dynamic names only if there is no multiple SSPs or TDMs
> defined.
> 
> [...]

Applied to

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

Thanks!

[01/16] ASoC: Intel: avs: Only create SSP%d snd_soc_dai_driver when requested
        commit: 393648ce731b087f5a685044c9e41afb815421f7
[02/16] ASoC: Intel: avs: Introduce helper functions for SSP and TDM handling
        commit: 7a6debe0478596ac892ecf3cc336aacf09a9e4d8
[03/16] ASoC: Intel: avs: Improve topology parsing of dynamic strings
        commit: e6d50e474e45862096932edc31932fbbd5e8f1c7
[04/16] ASoC: Intel: avs: i2s_test: Validate machine board configuration
        commit: d3decc196afdce9456442e2bdc9033fd5d2d00b3
[05/16] ASoC: Intel: avs: rt274: Validate machine board configuration
        commit: b124d7cc6f3c08e5ae084e446e6ceff6c881c087
[06/16] ASoC: Intel: avs: rt5682: Validate machine board configuration
        commit: 2172c5b90d80aedc7cbe571e353ae45040e03a3b
[07/16] ASoC: Intel: avs: max98357a: Validate machine board configuration
        commit: 863e3f18d08bae9ffc70306e251f75bdee5e0674
[08/16] ASoC: Intel: avs: rt298: Validate machine board configuration
        commit: 060c0fd1afaec1d553fdd123ddd47368bd4b3a81
[09/16] ASoC: Intel: avs: da7219: Validate machine board configuration
        commit: fc332ea1176d72502e81a3e9d4ea3bce05e77398
[10/16] ASoC: Intel: avs: es8336: Validate machine board configuration
        commit: 8d5fed3312ebaa83338cf42746b29a01b9d3d13e
[11/16] ASoC: Intel: avs: max98373: Validate machine board configuration
        commit: a1ec836b17f7dea35f6b4b3a7c2ad4306da804c9
[12/16] ASoC: Intel: avs: max98927: Validate machine board configuration
        commit: ef91ae9e682c85e57861234db7d5ad9d071b889b
[13/16] ASoC: Intel: avs: nau8825: Validate machine board configuration
        commit: 70c101917aa1efa52a89dae5d5deee2a0c74de07
[14/16] ASoC: Intel: avs: rt286: Validate machine board configuration
        commit: cc7ea744970176134d48cc6e004ebe7c9a0bb3da
[15/16] ASoC: Intel: avs: rt5663: Validate machine board configuration
        commit: 797611b5ce62f12a2c0812c0e4e3a2fb6ee9fb47
[16/16] ASoC: Intel: avs: ssm4567: Validate machine board configuration
        commit: 5e07eb3ab981c5752c0e5ac324fbd166a12003ee

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