MLK-12057 ASoC: imx-wm8960: add headphone/micphone/headset jack support
authorZidan Wang <zidan.wang@freescale.com>
Tue, 22 Dec 2015 06:04:04 +0000 (14:04 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:35 +0000 (14:49 -0500)
commita7f779a25dba8ef550f0f937ba5018834f212b31
tree0a52e067ce370c397b7798ec53fe42f71c6b4cb7
parent0bec797d525d65a7ee3a62fb1cac66947fdb8434
MLK-12057 ASoC: imx-wm8960: add headphone/micphone/headset jack support

Add headphone/micphone/headset jack support for different board.

There are headphone detect gpio and microphone detect gpio which
can be configured from device tree.
If headphone and microphone using the same gpio for jack detect,
it suppose to be a headset and will register a headphone jack for it.
If headphone and microphone using different gpio for jack detect,
it suppose not to be a headset, and will register headphone jack
and microphone jack respectively.

Is't not appropriate to set the adc data output in machine driver.
It will not be compatibly when we change hardware connection.
wm8960 codec driver has added "ADC Data Output Select" kcontrol,
so that we can set the ADC data output from user space.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit 92f65b4bee51fabdfa3a3c191f511c2ec7cb18a1)
sound/soc/fsl/imx-wm8960.c