[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221214130912.GN105268@ediswmail.ad.cirrus.com>
Date: Wed, 14 Dec 2022 13:09:12 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: Lukasz Majewski <lukma@...x.de>
CC: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Stephen Kitt <steve@....org>,
<patches@...nsource.cirrus.com>, <alsa-devel@...a-project.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] ASoC: wm8940: Mute also the speaker output
On Wed, Dec 14, 2022 at 01:37:42PM +0100, Lukasz Majewski wrote:
> Without this change the BTL speaker produces some
> "distortion" noise when test program
> (speaker-test -t waw) is ended with ctrl+c.
>
> As our design uses speaker outputs to drive BTL speaker,
> it was necessary to also mute the speaker via the codec
> internal WM8940_SPKVOL register with setting
> WM8940_SPKMUTE bit.
>
> Signed-off-by: Lukasz Majewski <lukma@...x.de>
> ---
> + spkvol_reg &= ~WM8940_SPKMUTE;
> + if (mute) {
> mute_reg |= 0x40;
> + spkvol_reg |= WM8940_SPKMUTE;
> + }
> +
> + ret = snd_soc_component_write(component, WM8940_SPKVOL, spkvol_reg);
> + if (ret)
> + return ret;
This bit is also controlled by the "Speaker Playback Switch" so
you probably need some locking between them to stop them
clobbering each other.
Thanks,
Charles
Powered by blists - more mailing lists