ASoC: dapm: Implement stereo mixer control support
authorChen-Yu Tsai <wens@csie.org>
Wed, 2 Nov 2016 07:35:59 +0000 (15:35 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 2 Nov 2016 15:55:28 +0000 (09:55 -0600)
commite7aa450fe17890e59db7d3c2d8eff5b6b41fc531
tree99b0da04c4b6894ac85fcd8b5a17f917ccb584d5
parente411b0b5eb9b65257a050eac333d181d6e00e2c6
ASoC: dapm: Implement stereo mixer control support

While DAPM is mono or single channel, its controls can be shared between
widgets, such as sharing one stereo mixer control between the left and
right channel widgets. An example such as the following routes

    [Line In Left]----------<Line In Playback Switch>-------[Left Mixer]
                                          ^
          ^           ^                   |                      ^
       (inputs)    (paths)   <shared stereo mixer control>   (outputs)
          v           v                   |                      v
                                          v
    [Line In Right]---------<Line In Playback Switch>-------[Right Mixer]

where we have separate widgets and paths for the left and right channels
from "Line In" to "Mixer", but a shared stereo mixer control for the
2 paths.

This patch introduces support for such shared mixer controls, allowing
more than 1 path to be attached to a single stereo control, and being
able to control left/right channels independently.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c