alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: simon@lineageos.org, alsa-devel@alsa-project.org,
	b.zolnierkie@samsung.com, patches@opensource.cirrus.com,
	lgirdwood@gmail.com, broonie@kernel.org,
	m.szyprowski@samsung.com
Subject: Re: [PATCH] ASoC: wm8994: Prevent access to invalid VU register bits on WM1811
Date: Mon, 17 Aug 2020 09:45:41 +0000	[thread overview]
Message-ID: <20200817094541.GG10899@ediswmail.ad.cirrus.com> (raw)
In-Reply-To: <20200804141043.11425-1-s.nawrocki@samsung.com>

On Tue, Aug 04, 2020 at 04:10:43PM +0200, Sylwester Nawrocki wrote:
> The ADC2 and DAC2 are not available on WM1811 device. This patch moves
> the ADC2, DAC2 VU bitfields to a separate array so we can skip accessing
> them and avoid unreadable register access on WM1811.
> 
> This allows to get rid of warnings during boot like:
> wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5
> 
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> +static void wm8994_update_vu_bits(struct snd_soc_component *component)
> +{
> +	struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component);
> +	struct wm8994 *control = wm8994->wm8994;
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(wm8994_vu_bits); i++)
> +		snd_soc_component_write(component, wm8994_vu_bits[i].reg,
> +					snd_soc_component_read(component,
> +						       wm8994_vu_bits[i].reg));

Is there a reason to not be using snd_soc_component_update_bits
here?

I think otherwise this looks ok.

Thanks,
Charles

  reply	other threads:[~2020-08-17  9:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200804141056eucas1p176f970fa509a9caa677837118c7ed50c@eucas1p1.samsung.com>
2020-08-04 14:10 ` [PATCH] ASoC: wm8994: Prevent access to invalid VU register bits on WM1811 Sylwester Nawrocki
2020-08-17  9:45   ` Charles Keepax [this message]
2020-08-18 16:55   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200817094541.GG10899@ediswmail.ad.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=m.szyprowski@samsung.com \
    --cc=patches@opensource.cirrus.com \
    --cc=s.nawrocki@samsung.com \
    --cc=simon@lineageos.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).