summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l51.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: cs42l51: manage mclk shutdown delayOlivier Moysan2020-10-231-1/+21
| | | | | | | | | | | | | | | A delay must be introduced before the shutdown down of the mclk, as stated in CS42L51 datasheet. Otherwise the codec may produce some noise after the end of DAPM power down sequence. The delay between DAC and CLOCK_SUPPLY widgets is too short. Add a delay in mclk shutdown request to manage the shutdown delay explicitly. From experiments, at least 10ms delay is necessary. Set delay to 20ms as recommended in Documentation/timers/timers-howto.rst when using msleep(). Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20201020150109.482-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add additional ADC volume controlsGuillermo Rodríguez2020-09-211-0/+9
| | | | | | | | | | | Add volume controls for: - Analog programmable gain amplifier (PGA) (-3 .. +12 dB) - ADC attenuator (0 .. -96 dB) Signed-off-by: Guillermo Rodríguez <guille.rodriguez@gmail.com> Acked-by: David Rhodes <David.rhodes@cirrus.com> Link: https://lore.kernel.org/r/20200918134317.22574-1-guille.rodriguez@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: cs*: merge .digital_mute() into .mute_stream()Kuninori Morimoto2020-07-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/87r1tlwiwe.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codecs: cs*: rename to snd_soc_component_read()Kuninori Morimoto2020-06-221-4/+4
| | | | | | | | | | | We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a7134mc4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add dac mux widget in codec routesOlivier Moysan2019-12-091-6/+10
| | | | | | | | | | | Add "DAC mux" DAPM widget in CS42l51 audio codec routes, to support DAC mux control and to remove error trace "DAC Mux has no paths" at widget creation. Note: ADC path of DAC mux is not routed in this patch. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Link: https://lore.kernel.org/r/20191203141627.29471-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner2019-05-301-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ASoC: cs42l51: change mic bias DAPMOlivier Moysan2019-04-051-1/+2
| | | | | | | | Use SND_SOC_DAPM_SUPPLY for mic bias DAPM instead of deprecated SND_SOC_DAPM_MICBIAS. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add adc volume controlOlivier Moysan2019-04-041-0/+3
| | | | | | | Add ADC boost volume control for CS42L51 codec. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add power managementOlivier Moysan2019-04-041-0/+122
| | | | | | | Add sleep PM callbacks to support system low power modes. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add support of master modeOlivier Moysan2019-04-041-3/+27
| | | | | | | Add support of master mode for cs42l51 cirrus audio codec. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add reset managementOlivier Moysan2019-04-041-0/+15
| | | | | | | Manage cs42l51 audio codec reset pin. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add regulator managementOlivier Moysan2019-04-041-1/+43
| | | | | | | | Add cs42l51 audio codec power supply management through regulator framework. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add multi endpoint supportOlivier Moysan2019-04-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support multiple endpoints on cs42L51 codec port when used in of_graph context. This patch allows to share the codec port between two CPU DAIs. Example: STM32MP157C-DK2 board uses CS42L51 audio codec. This codec is connected to two serial audio interfaces, which are configured either as rx or tx. From AsoC point of view the topolgy is the following: // 2 CPU DAIs (SAI2A/B), 1 Codec (CS42L51) Playback: CPU-A-DAI(slave) -> (master)CODEC-DAI/port0 Record: CPU-B-DAI(slave) <- (master)CODEC-DAI/port0 In the DT two endpoints have to be associated to the codec port: cs42l51_port: port { cs42l51_tx_endpoint: endpoint@0 { remote-endpoint = <&sai2a_endpoint>; }; cs42l51_rx_endpoint: endpoint@1 { remote-endpoint = <&sai2b_endpoint>; }; }; However, when the audio graph card parses the codec nodes, it expects to find DAI interface indexes matching the endpoints indexes. The current patch forces the use of DAI id 0 for both endpoints, which allows to share the codec DAI between the two CPU DAIs for playback and capture streams respectively. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: fix mclk supportOlivier Moysan2018-10-191-1/+14
| | | | | | | | | | | | The MCLK clock is made optional for cs42l51 codec. However, ASoC DAPM clock supply widget, expects the clock to be defined unconditionally. Register MCLK DAPM conditionally in codec driver, depending on clock presence in DT. Fixes: 5e8d63a726f8 ("ASoC: cs42l51: add mclk support") Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: add mclk supportOlivier Moysan2018-10-191-0/+8
| | | | | | | | Add MCLK dapm to allow configuration of cirrus CS42l51 codec as a master clock consumer. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l51: replace codec to componentKuninori Morimoto2018-02-121-40/+41
| | | | | | | | | | | | | | Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.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: codec duplicated callback function goes to component on cs42l51Kuninori 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: cs42l51: Fix enum ctl accesses in a wrong typeTakashi Iwai2016-03-011-4/+4
| | | | | | | | | "PCM channel mixer" ctl in cs42l51 codec driver is enum, while the current driver accesses wrongly via value.integer.value[]. They have to be via value.enumerated.item[] instead. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/cs4265', 'asoc/topic/cs4271', ↵Mark Brown2014-12-081-2/+4
|\ \ | | | | | | | | | 'asoc/topic/cs42l51' and 'asoc/topic/cs42l73' into asoc-next
| | * ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm)Lars-Peter Clausen2014-11-211-2/+4
| |/ | | | | | | | | | | | | | | | | The codec field of the snd_soc_widget struct is eventually going to be removed, use snd_soc_dapm_to_codec(w->dapm) instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: cs42l51: re-hook of_match_table pointerThomas Petazzoni2014-11-121-1/+3
|/ | | | | | | | | | | | | | | | | | In commit a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver"), the I2C part of the CS42L51 was moved to a separate file, but the definition of the of_device_id array was left in the driver file itself, no longer connected to the platform_driver structure using the .of_match_table pointer. This commit exports the of_device_id array in cs42l51, and uses it as .of_match_able in cs42l51-i2c.c. This solution was suggested by Brian Austin. Fixes: a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver") Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' ↵Mark Brown2014-05-221-56/+20
|\ \ | | | | | | | | | and 'asoc/topic/davinci' into asoc-next
| * | ASoC: cs42l51: Fix mask for REVIDAxel Lin2014-04-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The REVID mask was changed by commit a1253ef6d3fa "ASoC: cs42l51: split i2c from codec driver". Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: cs42l51: split i2c from codec driverBrian Austin2014-04-161-56/+19
| |/ | | | | | | | | | | | | This patch removes the i2c bus code from the codec driver and creates seperate i2c driver. Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* / ASoC: Add snd_soc_kcontrol_codec() helper functionLars-Peter Clausen2014-04-141-2/+2
|/ | | | | | | | | | | | | | | For CODEC controls snd_kcontrol_chip() currently returns a pointer to the CODEC that registered the control. With the upcoming consolidation of platform and CODEC controls this will change. Prepare for this by introducing the snd_soc_kcontrol_codec() helper function that will hide the implementation details of how the CODEC for a control can be obtained. This will allow us to change this easily in the future. The patch also updates all CODEC drivers to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge tag 'asoc-v3.15-2' into asoc-nextMark Brown2014-03-231-6/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASoC: Updates for v3.15 This is mostly a few additional fixes from Lars-Peter, a new driver and cleaning up a git failure with merging the Intel branch (combined with an xargs failure to pay attention to error codes). The history lists a bunch of additional commits for the branch but the content of those commits is actually present already but not recorded in history due to git failing. Unfortunately xargs is used in the merge script and it doesn't do a good job of noticing errors from the commands it invokes. # gpg: Signature made Thu 13 Mar 2014 14:25:44 GMT using RSA key ID 7EA229BD # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
| * Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown2014-03-131-6/+0
| |\
| | * ASoC: codec: Simplify ASoC probe code.Xiubo Li2014-03-111-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | For some CODEC drivers like who act as the MFDs children are ignored by this patch. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge tag 'asoc-v3.15' into asoc-nextMark Brown2014-03-231-46/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASoC: Updates for v3.15 Quite a busy release for ASoC this time, more on janitorial work than exciting new features but welcome nontheless: - Lots of cleanups from Takashi for enumerations; the original API for these was error prone so he's refactored lots of code to use more modern APIs which avoid issues. - Elimination of the ASoC level wrappers for I2C and SPI moving us closer to converting to regmap completely and avoiding some randconfig hassle. - Provide both manually and transparently locked DAPM APIs rather than a mix of the two fixing some concurrency issues. - Start converting CODEC drivers to use separate bus interface drivers rather than having them all in one file helping avoid dependency issues. - DPCM support for Intel Haswell and Bay Trail platforms. - Lots of work on improvements for simple-card, DaVinci and the Renesas rcar drivers. - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the CSR SiRF SoC. # gpg: Signature made Wed 12 Mar 2014 23:05:45 GMT using RSA key ID 7EA229BD # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
| | \
| | \
| *-. \ Merge remote-tracking branches 'asoc/topic/tlv320aic23', ↵Mark Brown2014-03-121-8/+7
| |\ \ \ | | |_|/ | |/| | | | | | 'asoc/topic/tlv320aic26', 'asoc/topic/tlv320aic32x4', 'asoc/topic/tlv320aic3x', 'asoc/topic/tlv320dac33', 'asoc/topic/twl4030', 'asoc/topic/twl6040', 'asoc/topic/uda1380', 'asoc/topic/wl1273' and 'asoc/topic/wm2200' into asoc-next
| | | * ASoC: wm2200: Use SOC_ENUM_SINGLE_*_DECL()Takashi Iwai2014-02-231-8/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Just replace with the helper macros. No functional change at all. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: cs42l51: Remove unused variableSachin Kamat2014-02-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | ‘cs42l51’ is not used. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: cs42l51: Convert to direct regmap API usageMark Brown2014-02-111-34/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of phasing out the ASoC level register I/O code (which is now just a thin wrapper around regmap anyway) convert the cs42l51 driver to use the regmap API directly. We now no longer initialise the cache from hardware at startup, the regmap caches are smart enough to understand which registers are actually cached and read on demand. This should have no visible effect on the system. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Brian Austin <brian.austin@cirrus.com>
| * | ASoC: cs42l51: Don't log if we fail to allocate memoryMark Brown2014-02-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The VM subsystem already logs quite loudly if we run out of memory so don't bother here. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Brian Austin <brian.austin@cirrus.com>
| * | ASoC: cs42l51: add Device Tree binding to cs42l51Thomas Petazzoni2014-02-111-0/+7
| |/ | | | | | | | | | | | | | | | | This commit adds a trivial Device Tree binding to the I2C-based cs42l51 sound codec, so that it can be used from Device Tree based platforms. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* / ASoC: cs42l51: Fix SOC_DOUBLE_R_SX_TLV shift values for ADC, PCM, and Analog ↵Brian Austin2014-03-191-5/+4
|/ | | | | | | | | | | | | kcontrols The shift values for the ADC,PCM, and Analog kcontrols were wrong causing wrong values for the SOC_DOUBLE_R_SX_TLV macros Fixed the TLV for aout_tlv to show -102dB correctly Fixes: 1d99f2436d (ASoC: core: Rework SOC_DOUBLE_R_SX_TLV add SOC_SINGLE_SX_TLV) Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* ASoC: cs42l51: Use params_width() rather than memory formatMark Brown2014-01-131-9/+5
| | | | Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: cs42l51: Use module_i2c_driverSachin Kamat2012-08-061-18/+1
| | | | | | | | module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: codecs: Remove rtd->codec usage from CODEC driversMark Brown2012-04-041-2/+1
| | | | | | | | | | In order to support CODEC<->CODEC links remove the assumption that there is only a single CODEC on a DAI link by removing the use of the CODEC pointer in the rtd from the CODEC drivers. They are already being passed their DAI whenever they are passed an rtd and can get the CODEC from there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Rework SOC_DOUBLE_R_SX_TLV add SOC_SINGLE_SX_TLVBrian Austin2012-04-031-3/+3
| | | | | | | | | | | | | | | | | Some codecs namely Cirrus Logic Codecs have a way of wrapping the dB scale around 0dB without 0dB being in the middle. Rework of SOC_DOUBLE_R_SX_TLV to be more consistent with other asoc tlv macros. Add single register macro : SOC_SINGLE_SX_TLV. Use snd_soc_info_volsw for .info Use snd_soc_get_volsw_sx, snd_soc_put_volsw_sx for single and double. kcontrols for CS42L51 and CS42L73 are adjusted to these new TLV Macros. The max value is determined by: (number of steps) +1 for 0dB +max from codec datasheet. Signed-off-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert cs42l51 to devm_kzalloc()Axel Lin2012-01-021-6/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert cs42l51 to table based DAPM and control initAxel Lin2011-12-201-9/+8
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove unneeded platform_device.h inclusions from CODECsMark Brown2011-11-271-1/+0
| | | | | | They've not been needed for a long time if they were ever required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-231-1/+1
|\
| * ASoC: cs42l51: Fix off-by-one for reg_cache_sizeAxel Lin2011-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Just checking the code in cs42l51_fill_cache(): The cache pointer points to codec->reg_cache + 1. I think it is because CS42L51_FIRSTREG is 0x01, so codec->reg_cache[0] is not used here. Then we read CS42L51_NUMREGS bytes to cache. So we need reg_cache_size to be CS42L51_NUMREGS + 1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure") introduced the possibility to have constant DAI ops structures, yet this is barley used in both existing drivers and also new drivers being submitted, although none of them modifies its DAI ops structure. The later is not surprising since existing drivers are often used as templates for new drivers. So this patch just constifies all existing snd_soc_dai_ops structs to eliminate the issue altogether. The patch was generated with the following coccinelle semantic patch: // <smpl> @@ identifier ops; @@ -struct snd_soc_dai_ops ops = +const struct snd_soc_dai_ops ops = { ... }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Avoid a redundant read in cs42l51_pdn_eventAxel Lin2011-11-081-8/+5
|/ | | | | | | | snd_soc_update_bits already does read-modify-write, no need to read the register before calling snd_soc_update_bits. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Return early with -EINVAL if invalid dai format is detectedAxel Lin2011-10-061-5/+4
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove unused "control_data" field of struct cs42l51_privateAxel Lin2011-09-281-5/+1
| | | | | | | | | The control_data field is used to initialize the codec's control_data field, but since this is also done by the snd-soc-cache core, the redundant assignment can be removed and the field can be dropped. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>