summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt286.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/rockchip', ↵Mark Brown2014-10-061-0/+2
|\ \ | | | | | | | | | 'asoc/topic/rsnd' and 'asoc/topic/rt286' into asoc-next
| | * ASoC: rt286: Fix compilation warning for !PMThierry Reding2014-10-021-0/+2
| |/ | | | | | | | | | | | | | | The rt286_index_sync() function is only called in the resume path. If PM is disabled it becomes unused and shouldn't be built either. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt286: Fix sync functionBard Liao2014-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | We try to write index registers into cache when we write an index register, but we change the reg value before updating the cache. As a result, the cache is never be updated. This patch will fix this issue. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* | ASoC: rt286: Correct default valueBard Liao2014-09-261-3/+2
|/ | | | | | | | This patch corrects some incorrect default value in the cache. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* ASoC: rt286: Fix null pointer issueBard Liao2014-07-291-38/+36
| | | | | | | | | | To make the interrupt safe if it happens to be called before the card is ready, we use regmap read/write in the interrupt handler. Also, we try to prevent the interrupt happen before the card is ready by enabling codec's IRQ in the ASoC probe. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt286: make rt286_i2c_driver staticBard Liao2014-07-141-1/+1
| | | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: RT286: Fix silent at the beginning of streamBard Liao2014-07-071-1/+19
| | | | | | | | This patch fix the issue that the output is almost silent at the beginning of starting a playback. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: RT286: move initial settings to _i2c_probeBard Liao2014-07-071-50/+49
| | | | | | | Move codec initial settings from asoc probe to i2c probe. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: RT286: check ID in i2c levelBard Liao2014-07-071-8/+8
| | | | | | | Move ID check from asoc level to i2c level. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: RT286: remove test codeBard Liao2014-07-071-1/+0
| | | | | | | Remove test code. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: add RT286 CODEC driverBard Liao2014-07-041-0/+1208
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>