ASoC: dapm: connect virtual mux with default value
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): CGME20200414015005epcas2p36cd86ae99991dae7022ebd6c052c9786@epcas2p3.samsung.com
PATCH 2/4 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 <[email protected]>
Signed-off-by Mark Brown <[email protected]>
--- sound/soc/soc-dapm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
sound/soc/soc-dapm.c +7 -1
@@ -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; } }
Signature · 1 line
2.21.0