Commit Graph

12 Commits

Author SHA1 Message Date
Takashi Iwai
5a7615cf1f ASoC: rt5640: Fix ignored error checks
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-30 10:11:25 -07:00
Mark Brown
ebce31140c ASoC: rt5640: Don't go to standby on resume
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-19 21:24:31 +01:00
Mark Brown
e58f301ec9 ASoC: rt5640: Power down LDO while suspended
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-10-19 21:24:30 +01:00
Thierry Reding
32fcb97b9f ASoC: rt5640: Omit ACPI match table only if !ACPI
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-19 11:41:03 +01:00
Liam Girdwood
02b80773de ASoC: rt5640: Add ACPI probing support.
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-17 00:40:55 +01:00
Liam Girdwood
9e9cb9b996 ASoC: rt5640: Provide more useful hw_params error reasons.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:40:55 +01:00
Sachin Kamat
89d051300b ASoC: rt5640: Staticize hp_amp_power_on
'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-09-17 00:40:55 +01:00
Bard Liao
246693ba7b ASoC: rt5640: change widget sequence for depop
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-30 16:43:23 +01:00
Bard Liao
868ead653e ASoC: rt5640: remove unused mux
Remove unused "INL Mux" and "INR Mux".

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01 14:45:22 +01:00
Stephen Warren
9be94aeabf ASoC: rt5640: fix sparse warnings
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-13 10:26:57 +01:00
Stephen Warren
dcad9f0312 ASoC: rt5640: add device tree support
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-12 19:25:22 +01:00
Bard Liao
997b05203b ASoC: add RT5640 CODEC driver
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>
2013-06-12 17:46:54 +01:00