summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5640.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/qcom', 'asoc/topic/rcar', ↵Mark Brown2015-06-221-3/+2
|\ \ | | | | | | | | | 'asoc/topic/rt286' and 'asoc/topic/rt5640' into asoc-next
| | * ASoC: rt5640: Constify ACPI device ids and register defaultsMathias Krause2015-06-151-3/+2
| |/ | | | | | | | | | | | | | | | | Constify the ACPI device ID array and the register map, no need to have them writable at runtime. Also drop the unneeded RT5640_INIT_REG_LEN define. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt5640: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen2015-05-201-5/+6
| | | | | | | | | | | | | | | | | | | | The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Move bias level update to the coreLars-Peter Clausen2015-04-271-1/+0
| | | | | | | | | | | | | | | | | | All drivers have the same line at the end of the set_bias_level callback to update the bias_level state. Move this update into snd_soc_dapm_force_bias_level() and remove them from the drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Route all bias level updates through the coreLars-Peter Clausen2015-04-271-2/+2
|/ | | | | | | | | | | Use the new snd_soc_codec_force_bias_level() helper function to invoke the bias_level callback of a driver instead of calling the callback by hand. Currently the effect of this is the same, but having all bias level updates go through a central place will allow us to move more of the bias level management into the DAPM core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-nextMark Brown2015-02-041-5/+6
|\
| * ASoC: rt5640: Replace w->codec snd_soc_dapm_to_codec(w->dapm)Lars-Peter Clausen2015-01-151-5/+6
| | | | | | | | | | | | | | | | 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> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt5640: Add RT5642 ACPI ID for Intel BaytrailJarkko Nikula2015-01-261-0/+1
|/ | | | | | | | | Asus T100TAF uses ACPI ID "10EC5642" for its audio codec. I suppose it is updated ACPI ID for the RT5642 codec since some earlier platforms are using "10EC5640" with the RT5642 too. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/fsl-easi', 'asoc/topic/fsl-sai', ↵Mark Brown2014-10-061-19/+30
|\ \ | | | | | | | | | 'asoc/topic/fsl-ssi' and 'asoc/topic/intel' into asoc-next
| | * ASoC: rt5640: Add function for enabling DMIC from ACPI probed machineJarkko Nikula2014-10-011-19/+30
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no code enabling DMIC clock in systems that don't provide platform data for rt5640 after commit 71d97a794301 ("ASoC: rt5640: Use the platform data for DMIC settings"). I think it's worth to keep this static DMIC clock and alternative data pin setting during probe time. For making possible to use DMIC from ACPI probed machine (prior ACPI 5.1 with _DSD) this patch moves DMIC configuration to new exported rt5640_dmic_enable() that machine drivers can call. Please note, this patch moves DMIC configuration from i2c probe to codec probe in case platform data for rt5640 is set. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: rt5640: Do not allow regmap to use bulk read-write operationsJarkko Nikula2014-08-271-0/+1
|/ | | | | | | | | Debugging showed Realtek RT5642 doesn't support autoincrementing writes so driver should set the use_single_rw flag for regmap. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* ASoC: rt5640: Remove unneeded goto in rt5640_i2c_probeAxel Lin2014-06-211-8/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5677' ↵Mark Brown2014-06-031-94/+14
|\ \ | | | | | | | | | into asoc-next
| * | ASoC: rt5640: Add the function "get_clk_info" to RL6231 shared supportOder Chiou2014-06-011-16/+1
| | | | | | | | | | | | | | | | | | | | | The patch adds the function "get_clk_info" to RL6231 shared support. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: rt5640: Add the function of the PLL clock calculation to RL6231 shared ↵Oder Chiou2014-06-011-60/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support The patch adds the function of the PLL clock calculation to RL6231 shared support. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: rt5640: Add RL6231 class device shared support for RT5640, RT5645 and ↵Oder Chiou2014-06-011-18/+5
| |/ | | | | | | | | | | | | | | | | | | | | RT5651 The patch adds the RL6231 class device shared support for RT5640, RT5645 and RT5651. The function of the DMIC clock calculation can be shared by RL6231 shared support. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/nuc900', 'asoc/topic/omap', ↵Mark Brown2014-05-221-157/+262
|\ \ \ | | |/ | | | | | | 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/rt5640' and 'asoc/topic/rt5645' into asoc-next
| | * ASoC: rt5640: add default case for unexpected IDBard Liao2014-05-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may read an unexpected value when detemining which codec is attached. In that case, either a unsupported codec is attached or something wrong with I2C. The driver will not work properly on both cases. So we return an error for that. Signed-off-by: Bard Liao <bardliao@realtek.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Add the rt5639 support to the OF match tableOder Chiou2014-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | The patch adds the rt5639 support to the OF match table. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Add minimal support for RT5642Bard Liao2014-04-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have been using rt5640.c codec driver with RT5642 codec chip before commit 022d21f004c1 ("ASoC: rt5640: add rt5639 support"). That commits starts using device ID reading in reset register for adding device specific controls and routes runtime. Now since device ID appears to be different between RT5640 and RT5642 the driver doesn't add those controls and routes that are valid also on RT5642. Fix this by adding a device ID found by debugging and minimal code for supporting RT5642. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Add the string "rt5639" to the list of I2C device IDsOder Chiou2014-04-141-2/+3
| | | | | | | | | | | | | | | | | | | | | The patch adds the string "rt5639" to the list of I2C device IDs. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: add rt5639 supportOder Chiou2014-04-141-76/+210
| | | | | | | | | | | | | | | | | | | | | This patch adds the rt5639 support Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Change the setting method of idle_bias_offOder Chiou2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | The patch moves the idle_bias_off setting to struct "soc_codec_dev_rt5640". Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Remove the unnecessary parenthesesOder Chiou2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | The patch removes the unnecessary parentheses. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Remove the unused or incorrect setting of clock sourceOder Chiou2014-04-141-7/+1
| | | | | | | | | | | | | | | | | | | | | The patch removes the unused or incorrect setting of clock source. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Rename the function of clock checkingOder Chiou2014-04-141-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | In order to identify clearly, the patch renames the function "check_sysclk1_source" to "is_sys_clk_from_pll". Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Remove the pre-allocated size of reg_defaultOder Chiou2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In order to prevent the redundant memory usage, the pre-allocated size of reg_default should be remove. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Use the platform data for DMIC settingsOder Chiou2014-04-141-54/+23
| | | | | | | | | | | | | | | | | | | | | The patch uses the platform data for DMIC settings. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Correct the judgement of data lengthOder Chiou2014-04-141-5/+5
| | | | | | | | | | | | | | | | | | | | | The patch corrects the judgement of data length. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: rt5640: Move cache sync() to resume()Oder Chiou2014-04-141-3/+3
| |/ | | | | | | | | | | | | The patch fixes the defect in case of resume which doesn't sync the cache. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/headers', 'asoc/topic/intel', ↵Mark Brown2014-05-221-0/+1
|\ \ \ | | |/ | | | | | | 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/mc13783' and 'asoc/topic/multicodec' into asoc-next
| * | ASoC: rt5640: Include of.hSachin Kamat2014-04-141-0/+1
| |/ | | | | | | | | | | | | of_match_ptr is defined in of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: rt5640: Replace usage deprecated MUX/ENUM macrosLars-Peter Clausen2014-04-141-2/+2
|/ | | | | | | | | SND_SOC_DAPM_VALUE_MUX and SOC_DAPM_VALUE_ENUM are deprecated and merely an alias for SND_SOC_DAPM_MUX and SOC_DAPM_ENUM. Replace the deprecated macros so we can eventually remove their definition. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5640: add an of_match tableStephen Warren2014-03-311-0/+9
| | | | | | | | | | Add a device tree match table. This serves to make the driver's support of device tree more explicit. Perhaps the fallback for DT matching to using the i2c_device_id table will go away one day, since it fails in face of devices from different vendors with the same name. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/codecs' into asoc-nextMark Brown2014-03-231-2/+1
|\
| * ASoC: codecs: Replace instances of rtd->codec with dai->codecLars-Peter Clausen2014-03-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | With CODEC to CODEC links rtd->codec does not necessarily point to the driver's CODEC. CODEC drivers should always use dai->codec and never even look at the PCM runtime. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown2014-03-131-8/+0
|\ \
| * | ASoC: codec: Simplify ASoC probe code.Xiubo Li2014-03-111-8/+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 remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown2014-03-121-41/+34
|\ \
| * | ASoC: rt5640: Remove superfluous constTakashi Iwai2014-02-201-41/+34
| |/ | | | | | | | | | | | | | | | | | | As SOC_ENUM_SINGLE_DECL() itself contains const modifier now, we can reduce const from its users. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: rt5640: Add ACPI ID for Intel BaytrailJarkko Nikula2014-02-071-0/+1
|/ | | | | | | | Realtek RT5640 uses ACPI ID "10EC5640" for Intel Baytrail platforms. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* ASoC: rt5640: Fix ignored error checksTakashi Iwai2013-10-301-3/+4
| | | | | | | | | | The negative error value returned from get_sdp_info() is ignored because it's assigned to unsigned variables. Spotted by coverity CIDs 1042657, 1042658. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5640: Don't go to standby on resumeMark Brown2013-10-191-1/+0
| | | | | | | | | There is no need for the CODEC to go to standby on resume since the core will power it up as needed and in any case it is an idle_bias_off CODEC so would normally sit with bias off while idle. Signed-off-by: Mark Brown <broonie@linaro.org> Tested-by: Stephen Warren <swarren@nvidia.com>
* ASoC: rt5640: Power down LDO while suspendedMark Brown2013-10-191-0/+8
| | | | | | | | | If we have control over the LDO then disable it during suspend; the device is already being put into reset so will be non-functional over suspend anyway and this will save a small amount of power. Signed-off-by: Mark Brown <broonie@linaro.org> Tested-by: Stephen Warren <swarren@nvidia.com>
* ASoC: rt5640: Omit ACPI match table only if !ACPIThierry Reding2013-09-191-0/+2
| | | | | | | | | The ACPI_PTR() macro evaluates to NULL if ACPI is disabled and hence the ACPI match table won't be used, causing the compiler to complain. Avoid this by protecting the table using an #ifdef CONFIG_ACPI. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5640: Add ACPI probing support.Liam Girdwood2013-09-171-0/+8
| | | | | | | Allow the RT5640 to be probed as an ACPI I2C device. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5640: Provide more useful hw_params error reasons.Liam Girdwood2013-09-171-1/+2
| | | | | Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5640: Staticize hp_amp_power_onSachin Kamat2013-09-171-1/+1
| | | | | | | 'hp_amp_power_on' is used only in this file. Make it static. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5640: change widget sequence for depopBard Liao2013-08-301-54/+163
| | | | | | Signed-off-by: Bard Liao <bardliao@realtek.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: rt5640: remove unused muxBard Liao2013-08-011-26/+0
| | | | | | | Remove unused "INL Mux" and "INR Mux". Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
OpenPOWER on IntegriCloud