Codebase list alsa-lib / 7036ea0
ucm: include - fix compound_merge for arrays There is a case where the original array has already new indexes (the merged array is placed before the original nodes). Set the temporary index string identifiers to unique strings. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Jaroslav Kysela 3 years ago
1 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
148148 }
149149
150150 idx = 0;
151
152 /* for array, use a temporary non-clashing identifier */
153 if (array > 0) {
154 snd_config_for_each(i, next, dst) {
155 n = snd_config_iterator_entry(i);
156 snprintf(tmpid, sizeof(tmpid), "_tmp_%d", idx++);
157 err = snd_config_set_id(n, tmpid);
158 if (err < 0)
159 return err;
160 }
161 }
162
151163 snd_config_for_each(i, next, src) {
152164 n = snd_config_iterator_entry(i);
153165 err = snd_config_remove(n);