Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: GitHub pull_request - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: topology: alsatplg: add double-expansion for global defines
Date: Fri,  9 Oct 2026 15:01:02 +0200 (CEST)	[thread overview]
Message-ID: <18dcde02a0542e00-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <alsa-project/alsa-utils/pr/337@alsa-project.org>

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

           reply	other threads:[~2026-10-09 13:01 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <alsa-project/alsa-utils/pr/337@alsa-project.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18dcde02a0542e00-webhooks-bot@alsa-project.org \
    --to=github@alsa-project.org \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox