Commit Graph

17 Commits

Author SHA1 Message Date
Mark Brown feb36c5f54 Merge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/ak4642', 'asoc/topic/atmel', 'asoc/topic/cs35l34' and 'asoc/topic/cs35l35' into asoc-next 2017-07-03 16:51:31 +01:00
Kuninori Morimoto 907cd8809e ASoC: ak4613: add hw_constraint rule for Sampling Rate
Current ak4613 accepts all range of Sampling Rate, but it depends on
inputed master clock. This patch adds hw constraint rule for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-16 17:56:41 +01:00
Kuninori Morimoto a83ac48609 ASoC: ak4613: add missing 64000 in ak4613_dai_hw_params()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-14 10:56:19 +01:00
Axel Lin b5f2a487f5 ASoC: ak4613: Fix out of bounds array access for ak4613_iface
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-09 18:39:25 +01:00
Ryo Kodama 411652982a ASoC: ak4613: Improve counting DAI number
Add the startup function to count DAI instead of hw_params.
This change matches the number of opened DAIs.
If this change isn't applied, you may get unexpected error due to
mismatching of count. Since the excution number of hw_params and
shutdown may be different, the mismatching happens.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ryo Kodama <ryo.kodama.vz@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-07 20:24:00 +01:00
Kuninori Morimoto ec185f9540 ASoC: ak4613: disable asymmetric audio interface format
Asymmetric audio interface formats exist in ak4613 by same
register settings.

	Capture		Playback
	24bit LEFT_J	16bit RIGHT_J
	24bit LEFT_J	20bit RIGHT_J
	24bit LEFT_J	24bit RIGHT_J
	24bit LEFT_J	24bit LEFT_J
	24bit I2S	24bit I2S

These asymmetric formats makes driver / behavior difficult.
It is not HW limitation, but SW limitation. To makes code reading
easy, this patch removes asymmetric format support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-14 18:38:54 +09:00
Kuninori Morimoto 4898b61e40 ASoC: ak4613: use snd_soc_update_bits() to avoid Reserve bit on I/O CTRL
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-19 17:23:47 +01:00
Kuninori Morimoto beb84f75c4 ASoC: codec duplicated callback function goes to component on ak4613
codec driver and component driver has duplicated callback functions,
and codec side functions are just copied to component side when
register timing. This was quick-hack, but no longer needed.
This patch moves these functions from codec driver to component driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:57:57 +01:00
Geert Uytterhoeven f9ae17ba97 ASoC: ak4613: Implement suspend callback
Add the suspend callback to accompany the existing resume operation.
With the suspend/resume callbacks the regmap (regcache) state handling
can follow the recommended sequence.

Based on commit a2ebd58627 ("ASoC: ak4642: Implement suspend
callback") by Peter Ujfalusi <peter.ujfalusi@ti.com>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-17 12:36:09 +01:00
Geert Uytterhoeven dcd2d1f786 ASoC: ak4613: Enable cache usage to fix crashes on resume
During system resume:

    kernel BUG at drivers/base/regmap/regcache.c:347!
    ...
    PC is at regcache_sync+0x1c/0x128
    LR is at ak4613_resume+0x28/0x34

The ak4613 driver is using a regmap cache sync to restore the
configuration of the chip on resume but does not actually define a
register cache which means that the resume is never going to work and we
trigger asserts in regmap.  Fix this by enabling caching.

Based on commit d3030d1196 ("ASoC: ak4642: Enable cache usage to
fix crashes on resume") by Mark Brown <broonie@kernel.org>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-17 12:36:09 +01:00
Fabio Estevam 99cf4b267e ASoC: ak4613: Remove owner assignment from platform_driver
This platform_driver does not need to set an owner as it will be
populated by the driver core.

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

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-30 16:14:41 +01:00
Kuninori Morimoto 5547ba616b ASoC: ak4613: tidyup vendor prefix from ak4613 to asahi-kasei
a3af0c65("ASoC: ak4613: add single-end optional property for IN/OUT pins")
added IN/OUT pin single-end optional property, but it used "ak4613" as
vendor prefix. This patch fixup to asahi-kasei.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-20 18:06:44 +00:00
Kuninori Morimoto b323dd3071 ASoC: ak4613: don't overwrite CTRL2 register
Current code set DFS settings on CTRL2 register, but it overwrite
default settings. This patch fixup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-17 11:44:35 +00:00
Kuninori Morimoto 35299f1779 ASoC: ak4613: tidyup CTRL1 value selection method
Current CTRL1 selection method didn't care about simultaneous
playback / capture. This patch tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 13:18:28 +00:00
Kuninori Morimoto a3af0c6583 ASoC: ak4613: add single-end optional property for IN/OUT pins
ak4613 IN/OUT pin can be selected as differential/single-end.
Default is differential, because it is register default settings.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 13:18:28 +00:00
Kuninori Morimoto e3a4d958d7 ASoC: ak4613: add Digital Playback Volume support
For L/ROUT1 to L/ROUT6

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-19 07:41:15 -07:00
Kuninori Morimoto b075706284 ASoC: add ak4613 support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-17 12:33:08 +01:00