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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
There is no code enabling DMIC clock in systems that don't provide platform
data for rt5640 after commit 71d97a7943 ("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 <[email protected]>
Cc: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
The patch adds the function "get_clk_info" to RL6231 shared support.
Signed-off-by: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The patch adds the function of the PLL clock calculation to RL6231 shared
support.
Signed-off-by: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Reviewed-by: Stephen Warren <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
We have been using rt5640.c codec driver with RT5642 codec chip before commit
022d21f004 ("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 <[email protected]>
Signed-off-by: Bard Liao <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The patch adds the string "rt5639" to the list of I2C device IDs.
Signed-off-by: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The patch moves the idle_bias_off setting to struct "soc_codec_dev_rt5640".
Signed-off-by: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The patch removes the unused or incorrect setting of clock source.
Signed-off-by: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
In order to identify clearly, the patch renames the function
"check_sysclk1_source" to "is_sys_clk_from_pll".
Signed-off-by: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
In order to prevent the redundant memory usage, the pre-allocated size of
reg_default should be remove.
Signed-off-by: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The patch fixes the defect in case of resume which doesn't sync the cache.
Signed-off-by: Oder Chiou <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Acked-by: Charles Keepax <[email protected]>
Acked-by: Jyri Sarha <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
For some CODEC drivers like who act as the MFDs children are ignored
by this patch.
Signed-off-by: Xiubo Li <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
As SOC_ENUM_SINGLE_DECL() itself contains const modifier now, we can
reduce const from its users.
Signed-off-by: Takashi Iwai <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Acked-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Tested-by: Stephen Warren <[email protected]>
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 <[email protected]>
Tested-by: Stephen Warren <[email protected]>
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
'hp_amp_power_on' is used only in this file. Make it static.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>