]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: tlv320aic3x: Sanitize output controls
authorJarkko Nikula <jhnikula@gmail.com>
Fri, 27 Aug 2010 13:56:50 +0000 (16:56 +0300)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Sat, 28 Aug 2010 09:57:58 +0000 (10:57 +0100)
commit4b459c99bc4d754156fb127b2d2821258cd35f42
tree3be1963f746845ea2b9be9df61e2fe8eb8338410
parent4579875f84a205365e62cbb752707748ca316bbe
ASoC: tlv320aic3x: Sanitize output controls

Currently output controls are not uniform. Some routes are adjusted by
mono controls that don't match to associated mixer switch, many routes are
not covered at all and stereo controls have following variants:

- L-to-L & R-to-R
- R-to-L & R-to-R
- L-to-L & R-to-L

This patch attempts to fix these issues. First, for the convenience, only
direct L-to-L, R-to-R and [L | R]-to-Mono routes are controlled by the
stereo controls. This logic is also used with the output pin mute controls
so all of them except mono output are controlled by stereo switches.

Then rest of the swapped L-to-R and R-to-L routes are controlled by the
mono controls that map to mixer switches with a same name. Mixers can then
associate these switches and volumes together.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/codecs/tlv320aic3x.c