lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <05d2e44c-fa39-4622-ac4f-da9da2f02535@gmail.com>
Date: Tue, 20 Aug 2024 11:43:00 +0200
From: Konrad Dybcio <konradybcio@...il.com>
To: Adam Skladowski <a39.skl@...il.com>,
 Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
 Banajit Goswami <bgoswami@...cinc.com>, Liam Girdwood <lgirdwood@...il.com>,
 Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
 Takashi Iwai <tiwai@...e.com>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>,
 Stephan Gerhold <stephan@...hold.net>
Cc: alsa-devel@...a-project.org, linux-arm-msm@...r.kernel.org,
 linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org, Vladimir Lypak <vladimir.lypak@...il.com>
Subject: Re: [PATCH v3 8/8] ASoC: msm8916-wcd-analog: add lineout output

On 31.07.2024 5:25 PM, Adam Skladowski wrote:
> From: Vladimir Lypak <vladimir.lypak@...il.com>
> 
> Add descriptions and controls to toggle lineout output
> 
> Signed-off-by: Vladimir Lypak <vladimir.lypak@...il.com>
> Signed-off-by: Adam Skladowski <a39.skl@...il.com>
> ---
>  sound/soc/codecs/msm8916-wcd-analog.c | 64 +++++++++++++++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
> 
> diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
> index b9325290c28d..38949556f7d9 100644
> --- a/sound/soc/codecs/msm8916-wcd-analog.c
> +++ b/sound/soc/codecs/msm8916-wcd-analog.c
> @@ -233,6 +233,8 @@
>  #define RX_EAR_CTL_PA_SEL			BIT(7)
>  
>  #define CDC_A_RX_EAR_STATUS		(0xf1A1)
> +#define CDC_A_RX_LO_DAC_CTL		(0xf1AC)
> +#define CDC_A_RX_LO_EN_CTL		(0xf1AD)
>  
>  #define CDC_A_SPKR_DAC_CTL		(0xf1B0)
>  #define SPKR_DAC_CTL_DAC_RESET_MASK	BIT(4)
> @@ -327,6 +329,8 @@ static const struct soc_enum hph_enum = SOC_ENUM_SINGLE_VIRT(
>  static const struct snd_kcontrol_new ear_mux = SOC_DAPM_ENUM("EAR_S", hph_enum);
>  static const struct snd_kcontrol_new hphl_mux = SOC_DAPM_ENUM("HPHL", hph_enum);
>  static const struct snd_kcontrol_new hphr_mux = SOC_DAPM_ENUM("HPHR", hph_enum);
> +static const struct snd_kcontrol_new lineout_mux = SOC_DAPM_ENUM("LINEOUT",
> +								 hph_enum);
>  
>  /* ADC2 MUX */
>  static const struct soc_enum adc2_enum = SOC_ENUM_SINGLE_VIRT(
> @@ -630,6 +634,46 @@ static int pm8916_wcd_analog_enable_adc(struct snd_soc_dapm_widget *w,
>  	return 0;
>  }
>  
> +static int pm8916_wcd_analog_enable_lineout_dac(struct snd_soc_dapm_widget *w,
> +					 struct snd_kcontrol *kcontrol,
> +					 int event)
> +{
> +	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
> +
> +	switch (event) {
> +	case SND_SOC_DAPM_PRE_PMU:
> +		snd_soc_component_update_bits(component, CDC_A_RX_LO_EN_CTL,
> +				0x20, 0x20);

Using BIT(n) here would be nicer, but this looks reasonable otherwise

Konrad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ