summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4613.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: codecs: add const to snd_soc_codec_driver structuresBhumika Goyal2017-08-101-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>
*-. Merge remote-tracking branches 'asoc/topic/ak4613', 'asoc/topic/ak4642', ↵Mark Brown2017-07-031-15/+78
|\ \ | | | | | | | | | 'asoc/topic/atmel', 'asoc/topic/cs35l34' and 'asoc/topic/cs35l35' into asoc-next
| * | ASoC: ak4613: add hw_constraint rule for Sampling RateKuninori Morimoto2017-06-161-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>
| * | ASoC: ak4613: add missing 64000 in ak4613_dai_hw_params()Kuninori Morimoto2017-06-141-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: ak4613: Improve counting DAI numberRyo Kodama2017-06-071-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>
| * | ASoC: ak4613: disable asymmetric audio interface formatKuninori Morimoto2017-05-141-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>
* | ASoC: ak4613: Fix out of bounds array access for ak4613_ifaceAxel Lin2017-06-091-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>
* ASoC: ak4613: use snd_soc_update_bits() to avoid Reserve bit on I/O CTRLKuninori Morimoto2017-04-191-2/+8
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codec duplicated callback function goes to component on ak4613Kuninori Morimoto2016-08-081-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>
* ASoC: ak4613: Implement suspend callbackGeert Uytterhoeven2016-06-171-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>
* ASoC: ak4613: Enable cache usage to fix crashes on resumeGeert Uytterhoeven2016-06-171-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>
* ASoC: ak4613: Remove owner assignment from platform_driverFabio Estevam2016-05-301-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>
* ASoC: ak4613: tidyup vendor prefix from ak4613 to asahi-kaseiKuninori Morimoto2015-11-201-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>
* ASoC: ak4613: don't overwrite CTRL2 registerKuninori Morimoto2015-11-171-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>
* ASoC: ak4613: tidyup CTRL1 value selection methodKuninori Morimoto2015-11-161-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>
* ASoC: ak4613: add single-end optional property for IN/OUT pinsKuninori Morimoto2015-11-161-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>
* ASoC: ak4613: add Digital Playback Volume supportKuninori Morimoto2015-09-191-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>
* ASoC: add ak4613 supportKuninori Morimoto2015-09-171-0/+469
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud