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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87a5fpk1in.wl-tiwai@suse.de>
Date: Mon, 30 Sep 2024 10:07:44 +0200
From: Takashi Iwai <tiwai@...e.de>
To: bo liu <bo.liu@...arytech.com>
Cc: perex@...ex.cz,
	tiwai@...e.com,
	linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	cs@...edo.de,
	songxiebing@...inos.cn,
	wse@...edocomputers.com
Subject: Re: [PATCH] ALSA: hda/conexant: fix Z60MR100 startup pop issue

On Thu, 26 Sep 2024 12:01:35 +0200,
bo liu wrote:
> 
> When Z60MR100 startup, speaker will output a pop. To fix this issue,
> we mute codec in bios when startup, and use GPIO1 to unmute codec in
> codec driver.
> 
> Signed-off-by: bo liu <bo.liu@...arytech.com>
> ---
>  sound/pci/hda/patch_conexant.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
> index e851785ff058..27758822377f 100644
> --- a/sound/pci/hda/patch_conexant.c
> +++ b/sound/pci/hda/patch_conexant.c
> @@ -308,6 +308,7 @@ enum {
>  	CXT_FIXUP_HP_MIC_NO_PRESENCE,
>  	CXT_PINCFG_SWS_JS201D,
>  	CXT_PINCFG_TOP_SPEAKER,
> +	CXT_FIXUP_HP_A_U,
>  };
>  
>  /* for hda_fixup_thinkpad_acpi() */
> @@ -776,6 +777,18 @@ static void cxt_fixup_hp_zbook_mute_led(struct hda_codec *codec,
>  		cxt_setup_mute_led(codec, 0x10, 0x20);
>  }
>  
> +static void cxt_fixup_hp_a_u(struct hda_codec *codec,
> +			const struct hda_fixup *fix, int action)
> +{
> +	if (action == HDA_FIXUP_ACT_INIT) {
> +		snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 0);
> +		snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_MASK, 2);
> +		snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DIRECTION, 2);
> +		snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_STICKY_MASK, 0);
> +	}

The GPIO bits can be manipulated for LEDs, and that would override
this setup.  It'd be better to define something like
spec->gpio_static_mask and set it in cxt_init_gpio_led().


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ