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: <YXwpXedltzt1ykfc@sirena.org.uk>
Date:   Fri, 29 Oct 2021 18:03:25 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Richard Fitzgerald <rf@...nsource.cirrus.com>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        patches@...nsource.cirrus.com
Subject: Re: [PATCH] ASoC: cs42l42: Add control for audio slow-start switch

On Fri, Oct 29, 2021 at 05:13:05PM +0100, Richard Fitzgerald wrote:
> +static int cs42l42_slow_start_put(struct snd_kcontrol *kcontrol,
> +				  struct snd_ctl_elem_value *ucontrol)
> +{
> +	struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
> +	u8 val;
> +
> +	/* all bits of SLOW_START_EN much change together */
> +	switch (ucontrol->value.integer.value[0]) {
> +	case 0:
> +		val = 0;
> +		break;
> +	case 1:
> +		val = CS42L42_SLOW_START_EN_MASK;
> +		break;
> +	default:
> +		return -EINVAL;
> +	}
> +
> +	snd_soc_component_update_bits(component, CS42L42_SLOW_START_ENABLE,
> +				      CS42L42_SLOW_START_EN_MASK, val);
> +
> +	return 0;

This should return 1 if the value changed.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ