Skip to content

Commit 3bbbb77

Browse files
gt82leebroonie
authored andcommitted
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]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 7f2430c commit 3bbbb77

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sound/soc/soc-dapm.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,13 @@ static void dapm_set_mixer_path_status(struct snd_soc_dapm_path *p, int i,
802802
val = max - val;
803803
p->connect = !!val;
804804
} else {
805-
p->connect = 0;
805+
/* since a virtual mixer has no backing registers to
806+
* decide which path to connect, it will try to match
807+
* with initial state. This is to ensure
808+
* that the default mixer choice will be
809+
* correctly powered up during initialization.
810+
*/
811+
p->connect = invert;
806812
}
807813
}
808814

0 commit comments

Comments
 (0)