ASoC: add RT286 CODEC driver
authorBard Liao <bardliao@realtek.com>
Fri, 20 Jun 2014 06:41:13 +0000 (14:41 +0800)
committerMark Brown <broonie@linaro.org>
Fri, 4 Jul 2014 17:50:51 +0000 (18:50 +0100)
commit07cf7cbadb4d97a78be61119a406de8fe446467e
treef237a61b13b5fc250909720a30b3e5eb2ba62b72
parent7171511eaec5bf23fb06078f59784a3a0626b38f
ASoC: add RT286 CODEC driver

This patch adds Realtek ALC286 codec driver.

ALC286 is a dual mode codec, which can run as HD-A or I2S mode.
It is controlled by HD-A verb commands via I2C protocol.
The following is the I/O difference between ALC286 and general I2S codecs.
1. A HD-A verb command contains three parts, NID, VID, and PID.
   And an I2S command contains only two parts: address and data.
2. Not only the register address is written, but the read command also
   includes the entire write command.
3. rt286 uses different registers for read and write the same bits.

We map verb command to regmap structure. However, we read most registers from
cache to prevent the asymmetry read/write issue in rt286.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
include/sound/rt286.h [new file with mode: 0644]
sound/soc/codecs/Kconfig
sound/soc/codecs/Makefile
sound/soc/codecs/rt286.c [new file with mode: 0644]
sound/soc/codecs/rt286.h [new file with mode: 0644]