Commit 17988b6a authored by 이경택's avatar 이경택 Committed by Kleber Sacilotto de Souza

ASoC: dapm: connect virtual mux with default value

BugLink: https://bugs.launchpad.net/bugs/1875905

commit 3bbbb772 upstream.

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: default avatarGyeongtaek Lee <gt82.lee@samsung.com>
Link: https://lore.kernel.org/r/01a301d60731$b724ea10$256ebe30$@samsung.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 8fdd9476
...@@ -751,7 +751,13 @@ static void dapm_set_mixer_path_status(struct snd_soc_dapm_path *p, int i) ...@@ -751,7 +751,13 @@ static void dapm_set_mixer_path_status(struct snd_soc_dapm_path *p, int i)
val = max - val; val = max - val;
p->connect = !!val; p->connect = !!val;
} else { } 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;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment