[1/3] ASoC: dapm: connect virtual mux with default value
diff mbox series

Message ID 000e01d60665$d48444b0$7d8cce10$@samsung.com
State New
Headers show
Series
  • fixes for topology
Related show

Commit Message

Gyeongtaek Lee March 30, 2020, 7:35 a.m. UTC
Since a virtual mixer has no backing registers
to decide which path to connect,
it will try to match with initial value 0.
This is to ensure that the default mixer choice will be
correctly powered up during initialization.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
---
 sound/soc/soc-dapm.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Mark Brown March 30, 2020, 5:05 p.m. UTC | #1
On Mon, Mar 30, 2020 at 04:35:47PM +0900, 이경택 wrote:

> +++ b/sound/soc/soc-dapm.c
> @@ -802,7 +802,16 @@ static void dapm_set_mixer_path_status(struct
> snd_soc_dapm_path *p, int i,

It looks like your client corrupted this by at least word wrapping it,
can you resend please?

Patch
diff mbox series

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 9fb54e6fe254..fc55a0534252 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -802,7 +802,16 @@  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 value 0.  This is to ensure
+		 * that the default mixer choice will be
+		 * correctly powered up during initialization.
+		 */
+		val = 0;
+		if (invert)
+			val = max - val;
+		p->connect = !!val;
 	}
 }