summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5616.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: codecs: constify snd_soc_dai_ops structuresArvind Yadav2017-08-181-1/+1
| | | | | | | | | snd_soc_dai_ops are not supposed to change at runtime. All functions working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with const snd_soc_dai_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* 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>
* ASoC: rt5616: Don't use rtd->codecLars-Peter Clausen2016-11-141-2/+1
| | | | | | | | | rtd->codec does not necessarily point to the CODEC instance for which the callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use dai->codec instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/qcom', 'asoc/topic/rockchip' and ↵Mark Brown2016-09-291-5/+4
|\ \ | | | | | | | | | 'asoc/topic/rt5616' into asoc-next
| | * ASoC: rt5616: remove usage of obsoleted TLV-related macroTakashi Sakamoto2016-09-281-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TLV_DB_RANGE_HEAD macro was obsoleted by commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()"). This commit removes usage of the macro, with the obsoleting macro renamed to SNDRV_CTL_TLVD_DECLARE_DB_RANGE(). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: rt5616: add static qualifier for file local symbolsTakashi Sakamoto2016-09-271-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse reports below warnings. rt5616.c:1270:24: warning: symbol 'rt5616_aif_dai_ops' was not declared. Should it be static? rt5616.c:1277:27: warning: symbol 'rt5616_dai' was not declared. Should it be static? These two symbols are just used inner the file, thus it's better to add static qualifier. This commit adds it. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: codec duplicated callback function goes to component on rt5616Kuninori 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: rt5616: add missing mute control for HPVOLJohn Lin2016-03-071-0/+2
| | | | | | | Add missing kcontrol for HPVOL mute control. Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5616: Add support sample rate to 192KHzXing Zheng2016-01-291-1/+1
| | | | | | | | Reference the TRM, the ALC5616 support one 24bit/8KHz ~ 192KHz I2S/PCM Interface for stereo DAC and stereo ADC. Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5616: add the mclk for the codec driverCaesar Wang2016-01-281-0/+34
| | | | | | | | | | | | | | This patch adds the code to enable the clock to the CODEC driver if it needs the clock enabled. In some case, We need to claim the clock which is driving the codec so that when we enable clock gating, we continue to clock the codec when needed. if mclk provided, to enable and disable the clock source. Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5616: trivial: fix the typoCaesar Wang2016-01-281-185/+191
| | | | | | | | | | This patch try to fix the trivial typo. Run "scripts/checkpatch.pl -f --subjective xxx" The enable more subjective tests. Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5616: rename some alsa control namesBard Liao2015-12-231-3/+3
| | | | | | | Rename some alsa control name as what they should be. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5616: add an of_match tableCaesar Wang2015-12-221-0/+9
| | | | | | | | Add a device tree match table. This serves to make the driver's support of device tree more explicit. Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5616: Return error if device ID mismatchAxel Lin2015-12-221-1/+1
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rt5616: add rt5616 codec driverBard Liao2015-12-191-0/+1372
This is the initial codec driver for rt5616. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>