summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4613.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-10ASoC: codecs: add const to snd_soc_codec_driver structuresBhumika Goyal1-1/+1
Declare snd_soc_codec_driver structures as const as they are only passed as an argument to the function snd_soc_register_codec. This argument is of type const, so declare the structures with this property as const. In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in a copy operation along with getting passed to snd_soc_register_codec. So, it can be made const too. Done using Coccinelle: @match disable optional_qualifier@ identifier s; position p; @@ static struct snd_soc_codec_driver s@p={...}; @good1@ identifier match.s; position p; @@ snd_soc_register_codec(...,&s@p,...) @bad@ identifier match.s; position p!={match.p,good1.p}; @@ s@p @depends on !bad disable optional_qualifier@ identifier match.s; @@ static +const struct snd_soc_codec_driver s={...}; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-03Merge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/ak4642', ↵Mark Brown1-15/+78
'asoc/topic/atmel', 'asoc/topic/cs35l34' and 'asoc/topic/cs35l35' into asoc-next
2017-06-16ASoC: ak4613: add hw_constraint rule for Sampling RateKuninori Morimoto1-0/+61
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-14ASoC: ak4613: add missing 64000 in ak4613_dai_hw_params()Kuninori Morimoto1-0/+1
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-09ASoC: ak4613: Fix out of bounds array access for ak4613_ifaceAxel Lin1-1/+1
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-07ASoC: ak4613: Improve counting DAI numberRyo Kodama1-1/+12
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-05-14ASoC: ak4613: disable asymmetric audio interface formatKuninori Morimoto1-14/+4
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-04-19ASoC: ak4613: use snd_soc_update_bits() to avoid Reserve bit on I/O CTRLKuninori Morimoto1-2/+8
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: codec duplicated callback function goes to component on ak4613Kuninori Morimoto1-6/+8
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-06-17ASoC: ak4613: Implement suspend callbackGeert Uytterhoeven1-1/+11
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 a2ebd58627e9aa48 ("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-17ASoC: ak4613: Enable cache usage to fix crashes on resumeGeert Uytterhoeven1-0/+1
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 d3030d11961a8c10 ("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-05-30ASoC: ak4613: Remove owner assignment from platform_driverFabio Estevam1-1/+0
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>
2015-11-20ASoC: ak4613: tidyup vendor prefix from ak4613 to asahi-kaseiKuninori Morimoto1-2/+2
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-17ASoC: ak4613: don't overwrite CTRL2 registerKuninori Morimoto1-1/+2
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-16ASoC: ak4613: tidyup CTRL1 value selection methodKuninori Morimoto1-36/+54
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-16ASoC: ak4613: add single-end optional property for IN/OUT pinsKuninori Morimoto1-0/+29
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-09-19ASoC: ak4613: add Digital Playback Volume supportKuninori Morimoto1-0/+28
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-17ASoC: add ak4613 supportKuninori Morimoto1-0/+469
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>