alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: libin.yang@linux.intel.com, perex@perex.cz, alsa-devel@alsa-project.org
Cc: libin.yang@intel.com
Subject: Re: [alsa-devel] [alsa-lib][RFC PATCH] ucm: reset config id of condition items
Date: Thu, 23 Apr 2020 08:06:16 -0500	[thread overview]
Message-ID: <4b5a1e72-9d8c-221d-f0ea-df44f1ffb1d5@linux.intel.com> (raw)
In-Reply-To: <1587607135-20106-1-git-send-email-libin.yang@linux.intel.com>



On 4/22/20 8:58 PM, libin.yang@linux.intel.com wrote:
> From: Libin Yang <libin.yang@intel.com>
> 
> UCMv2 supports "If" statement and will merge the same items with
> compound_merge(). If the items have the same id, it will fail to
> add the config items. And the id of the item in an array is
> automatically generated with the increased number. It is probably
> that some items to be merged have the same id. Let's add prefix
> in the id to avoid such situation.
> 
> For example:
> 
> If.seq1 {
> 	Condition {
> 		Type ControlExists
> 		Control "name='PGA1.0 1 Master Playback Volume'"
> 	}
> 	True {
> 		EnableSequence [
> 			cset "name='PGA1.0 1 Master Playback Volume' 50"
> 		]
> 	}
> }
> 
> If.seq2 {
> 	Condition {
> 		Type ControlExists
> 		Control "name='PGA2.0 2 Master Playback Volume'"
> 	}
> 	True {
> 		EnableSequence [
> 			cset "name='PGA2.0 2 Master Playback Volume' 50"
> 		]
> 	}
> }
> 
> If.seq3 {
> 	Condition {
> 		Type ControlExists
> 		Control "name='PGA3.0 3 Master Playback Volume'"
> 	}
> 	True {
> 		EnableSequence [
> 			cset "name='PGA3.0 3 Master Playback Volume' 50"
> 		]
> 	}
> }
> 
> If seq1, seq2 and seq3 conditions are true, UCM will fail to initialize.
> 
> This patch rename the config id to avoid the same id conflict.

The example confuses me completely, I checked three times and the seq1, 
seq2 and seq3 parts configure different controls.

Can you clarify what the conflict is and what id you were referring to?



  reply	other threads:[~2020-04-23 16:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  1:58 [alsa-devel] [alsa-lib][RFC PATCH] ucm: reset config id of condition items libin.yang
2020-04-23 13:06 ` Pierre-Louis Bossart [this message]
2020-04-23 17:36   ` Jaroslav Kysela
2020-04-23 18:27     ` Pierre-Louis Bossart
2020-04-24  3:22     ` Yang, Libin
2020-04-29 13:47       ` Jaroslav Kysela
2020-05-01 13:44         ` Yang, Libin
2020-05-08 10:47           ` Jaroslav Kysela
2020-05-09  8:43             ` Yang, Libin

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=4b5a1e72-9d8c-221d-f0ea-df44f1ffb1d5@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=libin.yang@intel.com \
    --cc=libin.yang@linux.intel.com \
    --cc=perex@perex.cz \
    /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;
as well as URLs for NNTP newsgroup(s).