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]
Message-ID: <b90f4cfc04686a669d145b5c5e7e59e2edf58779.camel@toradex.com>
Date:   Thu, 17 Oct 2019 14:16:09 +0000
From:   Oleksandr Suvorov <oleksandr.suvorov@...adex.com>
To:     "broonie@...nel.org" <broonie@...nel.org>
CC:     "festevam@...il.com" <festevam@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Marcel Ziswiler <marcel.ziswiler@...adex.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        Igor Opaniuk <igor.opaniuk@...adex.com>
Subject: Re: [PATCH 5.3 112/112] ASoC: sgtl5000: add ADC mute control

On Thu, 2019-10-17 at 12:11 +0100, Mark Brown wrote:
> On Thu, Oct 17, 2019 at 09:49:27AM +0000, Oleksandr Suvorov wrote:
> 
> > Mark, obviously this is not a NEW feature. This patch adds LOST
> > standard control.
> 
> It's a new feature for this CODEC to have control over the capture
> mute,
> other devices have of course had control over it for a long time but
> for
> this device it's a new feature.


All versions of driver sgtl5000 (since creating in 2011) has a bug in
sgtl5000_probe():
...
       snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL,
                       SGTL5000_HP_ZCD_EN |
                       SGTL5000_ADC_ZCD_EN);
...
This command rewrites the whole register value instead of just enabling
ZCD feature for headphone and adc.

This register has bits for HP/LineOut/ADC muting, thus sgtl5000_probe()
always unmutes HP/LineOut/ADC.

Because of this bug, HP/LineOut/ADC somehow worked several years: these
blocks unmuted upon the probing of device and never muted again.

And they could not be muted/unmuted - there were no controls for that.

[ IMHO unabling mute/unmute of main codec components is a bug too ].

On 2016, the commit 904a987345258 was introduced and added an ability
to mute/unmute HP/LineOut, but not ADC unfortunately.

On the other hand, the bug in sgtl5000_probe() (HP/LineOut/ADC
unmuting) leads to "pop" sound on driver loading (according to sgtl5000
manual, both HP/LineOut should be muted upon device initialization).

The bugfix 631bc8f0134ae should be applied only after 904a987345258 +
694b14554d75f.

So I see 3 ways:

1. drop this patch and revert 631bc8f0134ae in stable versions 4.19,
5.2, 5.3.
So the bug with unmuting all outputs and ADC on device probing will
still present in all kernel versions that include sgtl500 codec driver.

2. keep 631bc8f0134ae and add 694b14554d75f to 4.19, 5.2 and 5.3.

3. add 631bc8f0134ae to 4.4, 4.9 and 4.14
   add 694b14554d75f to 4.4-5.3
   add 904a987345258 to 4.4
So this bug will be fixed in all supported versions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ