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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 18 Oct 2011 09:43:12 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	linux-kernel@...r.kernel.org,
	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
	Liam Girdwood <lrg@...com>, alsa-devel@...a-project.org
Subject: Re: [PATCH 2/2] ASoC: wm9081: Use snd_soc_update_bits for read-modify-write

2011/10/18 Mark Brown <broonie@...nsource.wolfsonmicro.com>:
> On Mon, Oct 17, 2011 at 12:36:52PM +0800, Axel Lin wrote:
>> Use snd_soc_update_bits for read-modify-write register access instead of
>> open-coding it using snd_soc_read and snd_soc_write
>
> Something in here is breaking audio through the WM9081 on Speyside.  I
> can't immediately spot anything wrong but the behaviour is quite obvious
> in the system.
>
hi Mark,
Thanks for testing.
I think the suspect part is here:

                        /* VMID 2*4k; Soft VMID ramp enable */
-                       reg = snd_soc_read(codec, WM9081_VMID_CONTROL);
-                       reg |= WM9081_VMID_RAMP | 0x6;
-                       snd_soc_write(codec, WM9081_VMID_CONTROL, reg);
-
+                       snd_soc_update_bits(codec, WM9081_VMID_CONTROL,
+                                           WM9081_VMID_RAMP | 0x6,
+                                           WM9081_VMID_RAMP | 0x6);
                        mdelay(100);

                        /* Normal bias enable & soft start off */
-                       reg |= WM9081_BIAS_ENA;
-                       reg &= ~WM9081_VMID_RAMP;
-                       snd_soc_write(codec, WM9081_VMID_CONTROL, reg);
+                       snd_soc_update_bits(codec, WM9081_VMID_CONTROL,
+                                           WM9081_VMID_RAMP | WM9081_BIAS_ENA,
+                                           WM9081_BIAS_ENA);

Original code does not change VMID_SEL[1:0] bits in the second write for
Normal bias enable & soft start off.

Maybe I should not convert it to snd_soc_update_bits for this case.

Regards,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ