mbox series

[0/3] ASoC: topology: allow for partial dailink stream_name match

Message ID 20230526204149.456068-1-pierre-louis.bossart@linux.intel.com
Headers show
Series ASoC: topology: allow for partial dailink stream_name match | expand

Message

Pierre-Louis Bossart May 26, 2023, 8:41 p.m. UTC
The topology file and the machine driver rely on common definitions
for the dailink stream_name.  To avoid any backwards-compatibility
problems, the machine driver stream names are set in stone and cannot
be modified.

This is problematic when we try to name some of the topology widgets
after the stream_name, since the widget name is limited to 44
characters

tools/include/uapi/sound/asound.h:#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44

Existing examples include "Analog Playback and Capture" for HDaudio
dailinks, which leaves less than 20 chars to identify widgets/controls
with a meaningful name.

Since the 44-char limit is part of the UAPI definitions, we assumed
there is no way to increase it.

This patchset suggests instead a partial match which allows topology
files to use a shorter stream_name, which in turn allows for
self-explanatory widget names that comply with the 44-char limit.

This should not break any existing setup but with the introduction of
a partial match new dailinks should be named carefully to avoid
confusions between e.g. 'link1' and 'link10'. The last patch fixes
such an issue in the 'nocodec' test topology used by Intel.

Ranjani Sridharan (3):
  ASoC: topology: Allow partial matching when finding DAI link
  ASoC: SOF: topology: Use partial match for connecting DAI link and DAI
    widget
  ASoC: SOF: Intel: HDA: Limit the number of dai drivers for nocodec
    mode

 sound/soc/soc-topology.c  | 6 +++---
 sound/soc/sof/intel/hda.c | 6 +++++-
 sound/soc/sof/intel/hda.h | 4 +++-
 sound/soc/sof/topology.c  | 2 +-
 4 files changed, 12 insertions(+), 6 deletions(-)

Comments

Mark Brown May 30, 2023, 5:40 p.m. UTC | #1
On Fri, 26 May 2023 15:41:46 -0500, Pierre-Louis Bossart wrote:
> The topology file and the machine driver rely on common definitions
> for the dailink stream_name.  To avoid any backwards-compatibility
> problems, the machine driver stream names are set in stone and cannot
> be modified.
> 
> This is problematic when we try to name some of the topology widgets
> after the stream_name, since the widget name is limited to 44
> characters
> 
> [...]

Applied to

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

Thanks!

[1/3] ASoC: topology: Allow partial matching when finding DAI link
      commit: e018e0b346706d0a0d7d7f884f3850cc0903abc2
[2/3] ASoC: SOF: topology: Use partial match for connecting DAI link and DAI widget
      commit: fe88788779fc30a4117dc2f9db4b50182679bb67
[3/3] ASoC: SOF: Intel: HDA: Limit the number of dai drivers for nocodec mode
      commit: 0f7b6a433097808e7f3e82f837ccc1353f070e4a

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