Closed ranj063 closed 3 years ago
It's valid array:
mixer.0 {
name "mixer 1"
}
# equal to
mixer [
name "mixer 1"
]
It's valid array:
mixer.0 { name "mixer 1" } # equal to mixer [ name "mixer 1" ]
@perex is there a way for me to avoid a config like this being called an array mixer.0 { name "mixer 1" }
so when I merge the the config below with snd_config_merge() mixer.0 { max 32 },
I get the compound with an integer and a string config as below: mixer.0 { name "mixer 1" max 32 }
instead of an array with 2 strings? mixer [ name "mixer 1" max 32 ]
Just add a dummy id to the mixer compound:
mixer.comment "Something"
mixer.0.name "mixer 1"
mixer.0.max 32
Just add a dummy id to the mixer compound:
mixer.comment "Something" mixer.0.name "mixer 1" mixer.0.max 32
Thanks @perex. I got around the problem by starting my mixer ID's with a 1 instead of starting with a 0.
Yes, it's another option.
Apart from checking the index, also check if the node is not compound to qualify a config as an array.
For ex:
mixer [ "mixer1" ]
is an array but
mixer.0 { name "mixer 1" }
is not an array even though the id is 0.
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com