linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Cc: "festevam@gmail.com" <festevam@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Igor Opaniuk <igor.opaniuk@toradex.com>
Subject: Re: [PATCH 5.3 112/112] ASoC: sgtl5000: add ADC mute control
Date: Thu, 17 Oct 2019 17:39:05 +0100	[thread overview]
Message-ID: <20191017163905.GH4976@sirena.co.uk> (raw)
In-Reply-To: <b90f4cfc04686a669d145b5c5e7e59e2edf58779.camel@toradex.com>

[-- Attachment #1: Type: text/plain, Size: 2890 bytes --]

On Thu, Oct 17, 2019 at 02:16:09PM +0000, Oleksandr Suvorov wrote:

> 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.

Yes, or at the very least this is a badly documented bit of intentional
code.  I suspect it may be the latter but at this point we can't tell.

> 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.

This patch here being adding the userspace control of the switch and
631bc8f0134ae being the patch that made the ZC change only update the
specific bits rather than write an absolute value to the register.  This
means that we end up with the audio unmuted but no user control over
this at runtime.  From a user perspective I think this is fine, it's not
ideal that there's no control but they can still record.

Please include human readable descriptions of things like commits and
issues being discussed in e-mail in your mails, this makes them much
easier for humans to read.

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

This means the patch that makes ZC only update the ZC bits and also the
patch that makes the mutes user controllable, the default being muted.
As I pointed out up thread this would mean that someone upgrading to a
newer stable may need to change their userspace to do the unmute instead
of having things unconditionally unmuted by the driver.  This is not
really what people expect from stable updates, we want them to be able
to pull these in without thinking about it.  i

To backport the addition of the controls to stable we'd need an
additional change which sets the default for this control to unmuted,
there's a case for having such a change upstream regardless but it's
still not clear if any of these changes are really fixes in the sense
that we mean for stable.

> 3. add 631bc8f0134ae to 4.4, 4.9 and 4.14
>    add 694b14554d75f to 4.4-5.3
>    add 904a987345258 to 4.4

This is basically the same as 2 except it adds some more user
controllable mute controls with 904a987345258 and does different things
in different versions for reasons I'm not clear on.  It has the same
issue.

> So this bug will be fixed in all supported versions.

It is not clear that this is even a bug in the first place, it's not
full functionality but that doesn't mean that it's a bug it just means
that there's some missing functionality.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-10-17 16:39 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 21:49 [PATCH 5.3 000/112] 5.3.7-stable review Greg Kroah-Hartman
2019-10-16 21:49 ` [PATCH 5.3 001/112] panic: ensure preemption is disabled during panic() Greg Kroah-Hartman
2019-10-16 21:49 ` [PATCH 5.3 002/112] USB: rio500: Remove Rio 500 kernel driver Greg Kroah-Hartman
2019-10-16 21:49 ` [PATCH 5.3 003/112] USB: yurex: Dont retry on unexpected errors Greg Kroah-Hartman
2019-10-16 21:49 ` [PATCH 5.3 004/112] USB: yurex: fix NULL-derefs on disconnect Greg Kroah-Hartman
2019-10-16 21:49 ` [PATCH 5.3 005/112] USB: usb-skeleton: fix runtime PM after driver unbind Greg Kroah-Hartman
2019-10-16 21:49 ` [PATCH 5.3 006/112] USB: usb-skeleton: fix NULL-deref on disconnect Greg Kroah-Hartman
2019-10-16 21:49 ` [PATCH 5.3 007/112] xhci: Fix false warning message about wrong bounce buffer write length Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 008/112] xhci: Prevent device initiated U1/U2 link pm if exit latency is too long Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 009/112] xhci: Check all endpoints for LPM timeout Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 010/112] xhci: Fix USB 3.1 capability detection on early xHCI 1.1 spec based hosts Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 011/112] usb: xhci: wait for CNR controller not ready bit in xhci resume Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 012/112] xhci: Prevent deadlock when xhci adapter breaks during init Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 013/112] xhci: Increase STS_SAVE timeout in xhci_suspend() Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 014/112] xhci: Fix NULL pointer dereference in xhci_clear_tt_buffer_complete() Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 015/112] USB: adutux: fix use-after-free on disconnect Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 016/112] USB: adutux: fix NULL-derefs " Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 017/112] USB: adutux: fix use-after-free on release Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 018/112] USB: iowarrior: fix use-after-free on disconnect Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 019/112] USB: iowarrior: fix use-after-free on release Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 020/112] USB: iowarrior: fix use-after-free after driver unbind Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 021/112] USB: usblp: fix runtime PM " Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 022/112] USB: chaoskey: fix use-after-free on release Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 023/112] USB: ldusb: fix NULL-derefs on driver unbind Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 024/112] serial: uartlite: fix exit path null pointer Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 025/112] serial: uartps: Fix uartps_major handling Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 026/112] USB: serial: keyspan: fix NULL-derefs on open() and write() Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 027/112] USB: serial: ftdi_sio: add device IDs for Sienna and Echelon PL-20 Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 028/112] USB: serial: option: add Telit FN980 compositions Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 029/112] USB: serial: option: add support for Cinterion CLS8 devices Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 030/112] USB: serial: fix runtime PM after driver unbind Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 031/112] USB: usblcd: fix I/O after disconnect Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 032/112] USB: microtek: fix info-leak at probe Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 033/112] USB: dummy-hcd: fix power budget for SuperSpeed mode Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 034/112] usb: renesas_usbhs: gadget: Do not discard queues in usb_ep_set_{halt,wedge}() Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 035/112] usb: renesas_usbhs: gadget: Fix usb_ep_set_{halt,wedge}() behavior Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 036/112] usb: typec: tcpm: usb: typec: tcpm: Fix a signedness bug in tcpm_fw_get_caps() Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 037/112] usb: typec: ucsi: ccg: Remove run_isr flag Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 038/112] usb: typec: ucsi: displayport: Fix for the mode entering routine Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 039/112] USB: legousbtower: fix slab info leak at probe Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 040/112] USB: legousbtower: fix deadlock on disconnect Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 041/112] USB: legousbtower: fix potential NULL-deref " Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 042/112] USB: legousbtower: fix open after failed reset request Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 043/112] USB: legousbtower: fix use-after-free on release Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 044/112] mei: me: add comet point (lake) LP device ids Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 045/112] mei: avoid FW version request on Ibex Peak and earlier Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 046/112] gpio: eic: sprd: Fix the incorrect EIC offset when toggling Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 047/112] staging/fbtft: Depend on OF Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 048/112] staging: bcm2835-audio: Fix draining behavior regression Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 049/112] Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 050/112] staging: rtl8188eu: fix HighestRate check in odm_ARFBRefresh_8188E() Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 051/112] staging: vt6655: Fix memory leak in vt6655_probe Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 052/112] iio: adc: hx711: fix bug in sampling of data Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 053/112] iio: adc: ad799x: fix probe error handling Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 054/112] iio: adc: axp288: Override TS pin bias current for some models Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 055/112] iio: adc: stm32-adc: move registers definitions Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 056/112] iio: adc: stm32-adc: fix a race when using several adcs with dma and irq Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 057/112] iio: light: opt3001: fix mutex unlock race Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 058/112] iio: light: add missing vcnl4040 of_compatible Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 059/112] iio: accel: adxl372: Fix/remove limitation for FIFO samples Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 060/112] iio: accel: adxl372: Fix push to buffers lost samples Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 061/112] iio: accel: adxl372: Perform a reset at start up Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 062/112] efivar/ssdt: Dont iterate over EFI vars if no SSDT override was specified Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 063/112] efi/tpm: Dont access event->count when it isnt mapped Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 064/112] efi/tpm: Dont traverse an event log with no events Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 065/112] efi/tpm: Only set efi_tpm_final_log_size after successful event log parsing Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 066/112] perf llvm: Dont access out-of-scope array Greg Kroah-Hartman
2019-10-16 21:50 ` [PATCH 5.3 067/112] perf inject jit: Fix JIT_CODE_MOVE filename Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 068/112] drm/i915: Perform GGTT restore much earlier during resume Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 069/112] blk-wbt: fix performance regression in wbt scale_up/scale_down Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 070/112] selinux: fix context string corruption in convert_context() Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 071/112] CIFS: Gracefully handle QueryInfo errors during open Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 072/112] CIFS: Force revalidate inode when dentry is stale Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 073/112] CIFS: Force reval dentry if LOOKUP_REVAL flag is set Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 074/112] cifs: use cifsInodeInfo->open_file_lock while iterating to avoid a panic Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 075/112] kernel/sysctl.c: do not override max_threads provided by userspace Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 076/112] mm/z3fold.c: claim page in the beginning of free Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 077/112] mm/page_alloc.c: fix a crash in free_pages_prepare() Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 078/112] mm/vmpressure.c: fix a signedness bug in vmpressure_register_event() Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 079/112] IB/core: Fix wrong iterating on ports Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 080/112] firmware: google: increment VPD key_len properly Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 081/112] gpio: fix getting nonexclusive gpiods from DT Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 082/112] gpiolib: dont clear FLAG_IS_OUT when emulating open-drain/open-source Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 083/112] btrfs: relocation: fix use-after-free on dead relocation roots Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 084/112] btrfs: allocate new inode in NOFS context Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 085/112] btrfs: fix balance convert to single on 32-bit host CPUs Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 086/112] Btrfs: fix memory leak due to concurrent append writes with fiemap Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 087/112] btrfs: fix incorrect updating of log root tree Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 088/112] btrfs: fix uninitialized ret in ref-verify Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 089/112] NFS: Fix O_DIRECT accounting of number of bytes read/written Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 090/112] MIPS: Disable Loongson MMI instructions for kernel build Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 091/112] MIPS: elf_hwcap: Export userspace ASEs Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 092/112] RDMA/vmw_pvrdma: Free SRQ only once Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 093/112] ACPI/PPTT: Add support for ACPI 6.3 thread flag Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 094/112] arm64: topology: Use PPTT to determine if PE is a thread Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 095/112] iio: light: fix vcnl4000 devicetree hooks Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 096/112] Fix the locking in dcache_readdir() and friends Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 097/112] drm/i915: Bump skl+ max plane width to 5k for linear/x-tiled Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 098/112] drm/i915: Whitelist COMMON_SLICE_CHICKEN2 Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 099/112] drm/i915: Mark contents as dirty on a write fault Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 100/112] drm/msm: Use the correct dma_sync calls harder Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 101/112] media: stkwebcam: fix runtime PM after driver unbind Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 102/112] arm64/sve: Fix wrong free for task->thread.sve_state Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 103/112] tracing/hwlat: Report total time spent in all NMIs during the sample Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 104/112] tracing/hwlat: Dont ignore outer-loop duration when calculating max_latency Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 105/112] ftrace: Get a reference counter for the trace_array on filter files Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 106/112] tracing: Get trace_array reference for available_tracers files Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 107/112] hwmon: Fix HWMON_P_MIN_ALARM mask Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 108/112] mtd: rawnand: au1550nd: Fix au_read_buf16() prototype Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 109/112] x86/asm: Fix MWAITX C-state hint value Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 110/112] io_uring: only flush workqueues on fileset removal Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 111/112] efi/tpm: Fix sanity check of unsigned tbl_size being less than zero Greg Kroah-Hartman
2019-10-16 21:51 ` [PATCH 5.3 112/112] ASoC: sgtl5000: add ADC mute control Greg Kroah-Hartman
2019-10-16 22:00   ` Mark Brown
2019-10-16 22:10     ` Greg Kroah-Hartman
2019-10-16 22:35       ` Mark Brown
2019-10-16 23:23         ` Greg Kroah-Hartman
2019-10-17  9:20           ` Richard Leitner
     [not found]             ` <AM6PR05MB653568E379699EE907E146BDF96D0@AM6PR05MB6535.eurprd05.prod.outlook.com>
2019-10-17  9:49               ` Fw: " Oleksandr Suvorov
2019-10-17 11:11                 ` Mark Brown
2019-10-17 14:16                   ` Oleksandr Suvorov
2019-10-17 16:39                     ` Mark Brown [this message]
2019-10-18  9:55                       ` Oleksandr Suvorov
2019-10-17 11:46             ` Greg Kroah-Hartman
2019-10-17  4:42 ` [PATCH 5.3 000/112] 5.3.7-stable review kernelci.org bot
2019-10-17 15:13 ` shuah
2019-10-17 15:55   ` Greg Kroah-Hartman
2019-10-17 17:21 ` Naresh Kamboju
2019-10-17 20:35   ` Greg Kroah-Hartman
2019-10-17 18:04 ` Guenter Roeck
2019-10-17 18:21   ` Greg Kroah-Hartman
2019-10-17 18:30 ` Didik Setiawan
2019-10-17 20:35   ` Greg Kroah-Hartman
2019-10-18  8:01 ` Jon Hunter
2019-10-18 10:12   ` Greg Kroah-Hartman

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=20191017163905.GH4976@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=igor.opaniuk@toradex.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=oleksandr.suvorov@toradex.com \
    --cc=stable@vger.kernel.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).