mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
ucm: substitute component sequence string
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
991990cdf2
commit
df498d89c7
1 changed files with 9 additions and 4 deletions
|
|
@ -570,17 +570,22 @@ struct use_case_device *find_component_dev(snd_use_case_mgr_t *uc_mgr,
|
|||
* disable sequence is needed by its parenet device.
|
||||
*/
|
||||
static int parse_component_seq(snd_use_case_mgr_t *uc_mgr,
|
||||
snd_config_t *n, int enable,
|
||||
struct component_sequence *cmpt_seq)
|
||||
snd_config_t *n, int enable,
|
||||
struct component_sequence *cmpt_seq)
|
||||
{
|
||||
const char *val;
|
||||
char *val;
|
||||
int err;
|
||||
|
||||
err = snd_config_get_string(n, &val);
|
||||
if (uc_mgr->conf_format < 3) {
|
||||
err = parse_string(n, &val);
|
||||
} else {
|
||||
err = parse_string_substitute(uc_mgr, n, &val);
|
||||
}
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
cmpt_seq->device = find_component_dev(uc_mgr, val);
|
||||
free(val);
|
||||
if (!cmpt_seq->device) {
|
||||
uc_error("error: Cannot find component device %s", val);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue