diff options
author | 이경택 <gt82.lee@samsung.com> | 2020-03-31 10:55:16 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-03-31 21:23:55 +0300 |
commit | 3bbbb7728fc853d71dbce4073fef9f281fbfb4dd (patch) | |
tree | 01faa143e636980230c43bc6b5f092bf340292a7 /sound | |
parent | 7f2430cda819a9ecb1df5a0f3ef4f1c20db3f811 (diff) | |
download | linux-3bbbb7728fc853d71dbce4073fef9f281fbfb4dd.tar.xz |
ASoC: dapm: connect virtual mux with default value
Since a virtual mixer has no backing registers
to decide which path to connect,
it will try to match with initial state.
This is to ensure that the default mixer choice will be
correctly powered up during initialization.
Invert flag is used to select initial state of the virtual switch.
Since actual hardware can't be disconnected by virtual switch,
connected is better choice as initial state in many cases.
Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
Link: https://lore.kernel.org/r/01a301d60731$b724ea10$256ebe30$@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-dapm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 04da7928c873..679ed60d850e 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -802,7 +802,13 @@ static void dapm_set_mixer_path_status(struct snd_soc_dapm_path *p, int i, val = max - val; p->connect = !!val; } else { - p->connect = 0; + /* since a virtual mixer has no backing registers to + * decide which path to connect, it will try to match + * with initial state. This is to ensure + * that the default mixer choice will be + * correctly powered up during initialization. + */ + p->connect = invert; } } |