diff options
author | Cezary Rojewski <cezary.rojewski@intel.com> | 2019-03-27 15:45:04 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2023-01-29 18:55:29 +0100 |
commit | d72da154a377926da6d03bda96427f3756226445 (patch) | |
tree | dee3dff381f2d150e6adf2da8e3dc1653ef01685 | |
parent | 1fc1c1b7dcdcd60ff87737b03dc915eb1a8c2152 (diff) | |
download | alsa-lib-d72da154a377926da6d03bda96427f3756226445.tar.gz |
topology: Parse ignore_suspend flag
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 <piotrx.maziarz@intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r-- | src/topology/pcm.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/topology/pcm.c b/src/topology/pcm.c index 76085d05..b1e5dc59 100644 --- a/src/topology/pcm.c +++ b/src/topology/pcm.c @@ -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); @@ -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); @@ -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); |