All of lore.kernel.org
 help / color / mirror / Atom feed
* topology: alsatplg: add double-expansion for global defines
       [not found] <alsa-project/alsa-utils/pr/337@alsa-project.org>
@ 2026-10-09 13:01 ` GitHub pull_request - opened
  0 siblings, 0 replies; only message in thread
From: GitHub pull_request - opened @ 2026-10-09 13:01 UTC (permalink / raw)
  To: alsa-devel

alsa-project/alsa-utils pull request #337 was opened from kv2019i:

Add support for following definition for global variables:

  IncludeByKey.SDW_DMIC_PCM_CHANNELS {
    "1" { Define { SDW_DMIC_CHANNEL_CFG $CHANNEL_CONFIG_MONO } }
  }

This doesn't currently work as the pre-processor merges the nested Define into the global define registry as a STRING value ("$CHANNEL_CONFIG_MONO").  Later, during object attribute expansion, pre_process_object_variables_expand_fcn finds the variable in the global defines and returns immediately with that unresolved string.  The caller then passes "$CHANNEL_CONFIG_MONO" to the token encoder, which cannot parse it as an integer and silently substitutes 0.

Add support for double expansion for such global defines. This is similar to how local variables are already handled (see commit 0029ab7cc7c7 ("topology: Expand attribute references inside $[] expressions")), and will help to reduce repeated IncludeByKey statements in topology files.

Request URL   : https://github.com/alsa-project/alsa-utils/pull/337
Patch URL     : https://github.com/alsa-project/alsa-utils/pull/337.patch
Repository URL: https://github.com/alsa-project/alsa-utils

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-09 13:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alsa-project/alsa-utils/pr/337@alsa-project.org>
2026-10-09 13:01 ` topology: alsatplg: add double-expansion for global defines GitHub pull_request - opened

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.