Skip to content

Commit

Permalink
topology: Parse ignore_suspend flag
Browse files Browse the repository at this point in the history
XXX_VOICE_WAKEUP also known as 'ignore_suspend' is already processed by
kernel in soc-topology, but there is no way of setting it via topology
file like it's the case for other flags. Fix this by adding it to pcm,
dai and link parsing mechanism.

Signed-off-by: Piotr Maziarz <[email protected]>
Signed-off-by: Cezary Rojewski <[email protected]>
Signed-off-by: Amadeusz Sławiński <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
crojewsk-intel authored and perexg committed Jan 29, 2023
1 parent 1fc1c1b commit d72da15
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/topology/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,15 @@ int tplg_parse_pcm(snd_tplg_t *tplg, snd_config_t *cfg,
continue;
}

if (strcmp(id, "ignore_suspend") == 0) {
err = parse_flag(n,
SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP,
&pcm->flag_mask, &pcm->flags);
if (err < 0)
return err;
continue;
}

/* private data */
if (strcmp(id, "data") == 0) {
err = tplg_parse_refs(n, elem, SND_TPLG_TYPE_DATA);
Expand Down Expand Up @@ -1066,6 +1075,15 @@ int tplg_parse_dai(snd_tplg_t *tplg, snd_config_t *cfg,
continue;
}

if (strcmp(id, "ignore_suspend") == 0) {
err = parse_flag(n,
SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP,
&dai->flag_mask, &dai->flags);
if (err < 0)
return err;
continue;
}

/* private data */
if (strcmp(id, "data") == 0) {
err = tplg_parse_refs(n, elem, SND_TPLG_TYPE_DATA);
Expand Down Expand Up @@ -1220,6 +1238,15 @@ int tplg_parse_link(snd_tplg_t *tplg, snd_config_t *cfg,
continue;
}

if (strcmp(id, "ignore_suspend") == 0) {
err = parse_flag(n,
SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP,
&link->flag_mask, &link->flags);
if (err < 0)
return err;
continue;
}

/* private data */
if (strcmp(id, "data") == 0) {
err = tplg_parse_refs(n, elem, SND_TPLG_TYPE_DATA);
Expand Down

0 comments on commit d72da15

Please sign in to comment.