1
0
Fork 0
Commit Graph

19 Commits (c1bbaff6d7dd55314ee453df8dfe00befd7ce1b2)

Author SHA1 Message Date
oder_chiou@realtek.com c1bbaff6d7 ASoC: rt5663: Add the delay time to correct the calibration
The patch adds the delay time to correct the calibration.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 12:32:58 +01:00
oder_chiou@realtek.com 1d5c5b6582 ASoC: rt5663: Correct the mixer switch setting and remove redundant routing path
The patch corrects the mixer siwtch setting that was the mistake in the
previous commitment. And remove the redundant routing paths.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-19 11:55:36 +01:00
oder_chiou@realtek.com d26ed93358 ASoC: rt5663: Modify the default value for ASRC function
The patch modifies the default value for ASRC function. It could prevent
the pop noise and recording no sound with ASRC function.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-18 14:27:36 +01:00
Gustavo A. R. Silva 6ccf3a6d03 ASoC: rt5663: constify snd_soc_dai_ops structure
This structure is only stored in the ops field of a snd_soc_dai_driver
structure. That field is declared const, so snd_soc_dai_ops structures
that have this property can be declared as const also.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 16:49:08 +01:00
oder_chiou@realtek.com 450f0f6a8f ASoC: rt5663: Add the manual offset field to compensate the DC offset
The patch adds the manual offset field in the devicetree to compensate the
DC offset that will be different between the PCB layout. It only can be
measured by the real production.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 12:05:54 +01:00
Colin Ian King 09b8852c75 ASoC: rt5663: add in missing loop counter to avoid infinite loop
The loop counter 'count' is missing an increment, so we could end up
with an infinite loop.  Add in a pre-increment to count to fix this.

Detected by CoverityScan, CID#1450120 ("Logically Dead Code")

Fixes: 1a425dbf1a10 ("ASoC: rt5663: Update the calibration funciton")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 12:05:54 +01:00
oder_chiou@realtek.com 1325734c97 ASoC: rt5663: Modify the power sequence for reducing the pop sound
The patch modifies the power sequence for reducing the pop sound.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 12:05:54 +01:00
oder_chiou@realtek.com 8f24412784 ASoC: rt5663: Optimize the Jack Type detection
The patch optimizes the Jack Type detection.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 12:05:53 +01:00
oder_chiou@realtek.com 7d8e00c789 ASoC: rt5663: Update the calibration funciton
The patch updates the calibration funciton for getting the correct DC
offset of headphone output.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17 12:05:53 +01:00
Oder Chiou 17616ce62c ASoC: rt5663: Check the JD status in the resume function
In the suspend, the IRQ function will not work in some machines. So the JD
status should be checked in the resume function.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13 19:32:08 +01:00
Oder Chiou af2728e4de ASoC: rt5663: Fix the IRQ issue
The patch fixed the IRQ issue.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06 18:04:52 +01:00
Mark Brown b35ddfd41b Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5616', 'asoc/topic/rt5640', 'asoc/topic/rt5660' and 'asoc/topic/rt5663' into asoc-next 2016-12-12 15:53:14 +00:00
Bard Liao 73444723b2 ASoC: rt5663: rename rt5668 as rt5663 v2
The "rt5668" codec supported in this driver is actually a revision
of "rt5663". So the patch is renamed to "rt5663 v2"

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-24 17:50:06 +01:00
Jack Yu 7e7e76bd56 ASoC: Add jd function for rt5663.
Add initial setting for rt5663 jd to irq.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-21 12:03:28 +01:00
Dan Carpenter c975e39cca ASoC: rt5663: fix a debug statement
We increment "i" before printing the debug statement.  That makes it
the wrong sleep_time[] information and Smatch complains that the last
increment could be beyond the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-13 15:01:32 +02:00
kbuild test robot c5f1edd405 ASoC: rt5663: fix platform_no_drv_owner.cocci warnings
sound/soc/codecs/rt5663.c:3203:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-20 12:21:10 +01:00
Wei Yongjun 66d7c2629a ASoC: rt5663: fix sparse warnings
Fixes the following sparse warnings:

sound/soc/codecs/rt5663.c:1367:14: warning: duplicate const
sound/soc/codecs/rt5663.c:1577:5: warning:
 symbol 'rt5663_button_detect' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:2857:24: warning:
 symbol 'rt5663_aif_dai_ops' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:2866:27: warning:
 symbol 'rt5663_dai' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:3193:6: warning:
 symbol 'rt5663_i2c_shutdown' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:3200:19: warning:
 symbol 'rt5663_i2c_driver' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-20 12:21:03 +01:00
Arnd Bergmann 56efaed524 ASoC: rt5663: refine error handling
The newly added rt5663 codec driver introduces a couple of warnings
when built with -Wmaybe-uninitialized:

codecs/rt5663.c: In function 'rt5663_set_tdm_slot':
codecs/rt5663.c:2680:2: error: 'reg' may be used uninitialized in this function [-Werror=maybe-uninitialized]
codecs/rt5663.c: In function 'rt5663_set_dai_pll':
codecs/rt5663.c:2556:12: error: 'shift' may be used uninitialized in this function [-Werror=maybe-uninitialized]
codecs/rt5663.c:2596:2: error: 'mask' may be used uninitialized in this function [-Werror=maybe-uninitialized]

We can avoid those warnings by always returning an error
from the switch() statements instead of falling through
with an uninitialized variable when we hit an unexpected
case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: df7c52168e ("ASoC: add rt5663 codec driver")
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-16 16:47:28 +01:00
Bard Liao df7c52168e ASoC: add rt5663 codec driver
This is the initial codec driver for both rt5663 rt5668 codec.

Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-14 16:22:14 +01:00