aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5640.c
AgeCommit message (Collapse)Author
2015-09-21ASoC: rt5640: fix line out no sound issueJohn Lin
commit 9b850ca4f1c5acd7fcbbd4b38a2d27132801a8d5 upstream. The power for line out was not turned on when line out is enabled. So we add "LOUT amp" widget to turn on the power for line out. Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-04Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-nextMark Brown
2015-01-26ASoC: rt5640: Add RT5642 ACPI ID for Intel BaytrailJarkko Nikula
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>
2015-01-15ASoC: rt5640: Replace w->codec snd_soc_dapm_to_codec(w->dapm)Lars-Peter Clausen
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>
2014-10-06Merge remote-tracking branches 'asoc/topic/fsl-easi', 'asoc/topic/fsl-sai', ↵Mark Brown
'asoc/topic/fsl-ssi' and 'asoc/topic/intel' into asoc-next
2014-10-01ASoC: rt5640: Add function for enabling DMIC from ACPI probed machineJarkko Nikula
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>
2014-08-27ASoC: rt5640: Do not allow regmap to use bulk read-write operationsJarkko Nikula
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
2014-06-21ASoC: rt5640: Remove unneeded goto in rt5640_i2c_probeAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-03Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5677' ↵Mark Brown
into asoc-next
2014-06-01ASoC: rt5640: Add the function "get_clk_info" to RL6231 shared supportOder Chiou
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>
2014-06-01ASoC: rt5640: Add the function of the PLL clock calculation to RL6231 shared ↵Oder Chiou
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>
2014-06-01ASoC: rt5640: Add RL6231 class device shared support for RT5640, RT5645 and ↵Oder Chiou
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>
2014-05-22Merge remote-tracking branches 'asoc/topic/nuc900', 'asoc/topic/omap', ↵Mark Brown
'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/rt5640' and 'asoc/topic/rt5645' into asoc-next
2014-05-22Merge remote-tracking branches 'asoc/topic/headers', 'asoc/topic/intel', ↵Mark Brown
'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/mc13783' and 'asoc/topic/multicodec' into asoc-next
2014-05-12ASoC: rt5640: add default case for unexpected IDBard Liao
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>
2014-04-28ASoC: rt5640: Add the rt5639 support to the OF match tableOder Chiou
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>
2014-04-22ASoC: rt5640: Add minimal support for RT5642Bard Liao
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>
2014-04-14ASoC: rt5640: Replace usage deprecated MUX/ENUM macrosLars-Peter Clausen
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>
2014-04-14ASoC: rt5640: Include of.hSachin Kamat
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>
2014-04-14ASoC: rt5640: Add the string "rt5639" to the list of I2C device IDsOder Chiou
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>
2014-04-14ASoC: rt5640: add rt5639 supportOder Chiou
This patch adds the rt5639 support Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14ASoC: rt5640: Change the setting method of idle_bias_offOder Chiou
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>
2014-04-14ASoC: rt5640: Remove the unnecessary parenthesesOder Chiou
The patch removes the unnecessary parentheses. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14ASoC: rt5640: Remove the unused or incorrect setting of clock sourceOder Chiou
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>
2014-04-14ASoC: rt5640: Rename the function of clock checkingOder Chiou
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>
2014-04-14ASoC: rt5640: Remove the pre-allocated size of reg_defaultOder Chiou
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>
2014-04-14ASoC: rt5640: Use the platform data for DMIC settingsOder Chiou
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>
2014-04-14ASoC: rt5640: Correct the judgement of data lengthOder Chiou
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>
2014-04-14ASoC: rt5640: Move cache sync() to resume()Oder Chiou
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>
2014-03-31ASoC: rt5640: add an of_match tableStephen Warren
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>
2014-03-23Merge remote-tracking branch 'asoc/topic/codecs' into asoc-nextMark Brown
2014-03-18ASoC: codecs: Replace instances of rtd->codec with dai->codecLars-Peter Clausen
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>
2014-03-13Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown
2014-03-12Merge remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown
2014-03-11ASoC: codec: Simplify ASoC probe code.Xiubo Li
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>
2014-02-20ASoC: rt5640: Remove superfluous constTakashi Iwai
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>
2014-02-07ASoC: rt5640: Add ACPI ID for Intel BaytrailJarkko Nikula
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
2013-10-30ASoC: rt5640: Fix ignored error checksTakashi Iwai
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>
2013-10-19ASoC: rt5640: Don't go to standby on resumeMark Brown
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>
2013-10-19ASoC: rt5640: Power down LDO while suspendedMark Brown
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>
2013-09-19ASoC: rt5640: Omit ACPI match table only if !ACPIThierry Reding
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>
2013-09-17ASoC: rt5640: Add ACPI probing support.Liam Girdwood
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>
2013-09-17ASoC: rt5640: Provide more useful hw_params error reasons.Liam Girdwood
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: rt5640: Staticize hp_amp_power_onSachin Kamat
'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>
2013-08-30ASoC: rt5640: change widget sequence for depopBard Liao
Signed-off-by: Bard Liao <bardliao@realtek.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01ASoC: rt5640: remove unused muxBard Liao
Remove unused "INL Mux" and "INR Mux". Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-13ASoC: rt5640: fix sparse warningsStephen Warren
This fixes: 975:9: sparse: Using plain integer as NULL pointer 1917:24: sparse: symbol 'rt5640_aif_dai_ops' was not declared. Should it be static? 1924:27: sparse: symbol 'rt5640_dai' was not declared. Should it be static? 2079:19: sparse: symbol 'rt5640_i2c_driver' was not declared. Should it be static? Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12ASoC: rt5640: add device tree supportStephen Warren
Modify the RT5640 driver to parse platform data from device tree. Write a DT binding document to describe those properties. Slight re-ordering of rt5640_i2c_probe() to better fit the DT parsing. Since ldo1_en is optional, guard usage of it with gpio_is_valid(), rather than open-coding an if (gpio) check. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12ASoC: add RT5640 CODEC driverBard Liao
This patch adds the ALC5640 codec driver. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Bard Liao <bardliao@realtek.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>