Commit 44b54f54 authored by Ondrej Jirman's avatar Ondrej Jirman Committed by Mark Brown

ASoC: rt5640: Allow configuration of LOUT to mono differential mode

LOUT output can produce either single-ended stereo signals, or mono
differential signal. Some applications are wired to use LOUT in mono
differential mode. Allow to configure it via device property.
Signed-off-by: default avatarOndrej Jirman <megi@xff.cz>
Signed-off-by: default avatarJarrah Gosbell <kernel@undef.tools>
Link: https://lore.kernel.org/r/20221209105621.39237-1-kernel@undef.toolsSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a5c26ee5
...@@ -2717,6 +2717,10 @@ static int rt5640_probe(struct snd_soc_component *component) ...@@ -2717,6 +2717,10 @@ static int rt5640_probe(struct snd_soc_component *component)
snd_soc_component_update_bits(component, RT5640_IN1_IN2, snd_soc_component_update_bits(component, RT5640_IN1_IN2,
RT5640_IN_DF2, RT5640_IN_DF2); RT5640_IN_DF2, RT5640_IN_DF2);
if (device_property_read_bool(component->dev, "realtek,lout-differential"))
snd_soc_component_update_bits(component, RT5640_DUMMY1,
RT5640_EN_LOUT_DF, RT5640_EN_LOUT_DF);
if (device_property_read_u32(component->dev, "realtek,dmic1-data-pin", if (device_property_read_u32(component->dev, "realtek,dmic1-data-pin",
&val) == 0 && val) { &val) == 0 && val) {
dmic1_data_pin = val - 1; dmic1_data_pin = val - 1;
......
...@@ -1978,6 +1978,8 @@ ...@@ -1978,6 +1978,8 @@
#define RT5640_ZCD_HP_EN (0x1 << 15) #define RT5640_ZCD_HP_EN (0x1 << 15)
/* General Control 1 (0xfa) */ /* General Control 1 (0xfa) */
#define RT5640_EN_LOUT_DF (0x1 << 14)
#define RT5640_EN_LOUT_DF_SFT 14
#define RT5640_M_MONO_ADC_L (0x1 << 13) #define RT5640_M_MONO_ADC_L (0x1 << 13)
#define RT5640_M_MONO_ADC_L_SFT 13 #define RT5640_M_MONO_ADC_L_SFT 13
#define RT5640_M_MONO_ADC_R (0x1 << 12) #define RT5640_M_MONO_ADC_R (0x1 << 12)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment