mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
ASoC: dapm: connect virtual mux with default value
commit 3bbbb7728f
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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
803db8a078
commit
af0b76f9f6
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user