1. 16 Apr, 2021 2 commits
    • Phil Calvin's avatar
      ALSA: hda/realtek: fix mic boost on Intel NUC 8 · d1ee66c5
      Phil Calvin authored
      Fix two bugs with the Intel HDA Realtek ALC233 sound codec
      present in Intel NUC NUC8i7BEH and probably a few other similar
      NUC models.
      
      These codecs advertise a 4-level microphone input boost amplifier on
      pin 0x19, but the highest two boost settings do not work correctly,
      and produce only low analog noise that does not seem to contain any
      discernible signal. There is an existing fixup for this exact problem
      but for a different PCI subsystem ID, so we re-use that logic.
      
      Changing the boost level also triggers a DC spike in the input signal
      that bleeds off over about a second and overwhelms any input during
      that time. Thankfully, the existing fixup has the side effect of
      making the boost control show up in userspace as a mute/unmute switch,
      and this keeps (e.g.) PulseAudio from fiddling with it during normal
      input volume adjustments.
      
      Finally, the NUC hardware has built-in inverted stereo mics. This
      patch also enables the usual fixup for this so the two channels cancel
      noise instead of the actual signal.
      
      [ Re-ordered the quirk entry point by tiwai ]
      Signed-off-by: default avatarPhil Calvin <phil@philcalvin.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/80dc5663-7734-e7e5-25ef-15b5df24511a@philcalvin.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d1ee66c5
    • Takashi Iwai's avatar
      ALSA: control: Fix racy management of user ctl memory size account · 998f26f4
      Takashi Iwai authored
      We've got a report about the possible race in the user control element
      counts (card->user_ctl_count), and it was confirmed that the race
      wasn't serious in the old code up to 5.12.  There, the value
      modification itself was exclusive and protected via a write semaphore,
      hence it's at most concurrent reads and evaluations before the
      increment.  Since it's only about the soft-limit to avoid the
      exhausting memory usage, one-off isn't a big problem at all.
      
      Meanwhile, the relevant code has been largely modified recently, and
      now card->user_ctl_count was replaced with card->user_ctl_alloc_size,
      and a few more places were added to access this field.  And, in this
      new code, it turned out to be more serious: the modifications are
      scattered in various places, and a few of them are without protection.
      It implies that it may lead to an inconsistent value by racy
      accesses.
      
      For addressing it, this patch extends the range covered by the
      card->controls_rwsem write lock at snd_ctl_elem_add() so that the all
      code paths that modify and refer to card->user_ctl_alloc_size are
      protected by the rwsem properly.
      
      The patch adds also comments in a couple of functions to indicate that
      they are under the rwsem lock.
      
      Fixes: 66c6d1ef ("ALSA: control: Add memory consumption limit to user controls")
      Link: https://lore.kernel.org/r/FEEBF384-44BE-42CF-8FB3-93470933F64F@purdue.edu
      Link: https://lore.kernel.org/r/20210415131856.13113-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      998f26f4
  2. 14 Apr, 2021 2 commits
  3. 13 Apr, 2021 1 commit
  4. 12 Apr, 2021 1 commit
  5. 10 Apr, 2021 1 commit
  6. 09 Apr, 2021 4 commits
  7. 08 Apr, 2021 2 commits
  8. 07 Apr, 2021 4 commits
  9. 06 Apr, 2021 2 commits
  10. 02 Apr, 2021 1 commit
  11. 01 Apr, 2021 5 commits
  12. 31 Mar, 2021 1 commit
    • Bastian Germann's avatar
      ASoC: sunxi: sun4i-codec: fill ASoC card owner · 7c0d6e48
      Bastian Germann authored
      card->owner is a required property and since commit 81033c6b ("ALSA:
      core: Warn on empty module") a warning is issued if it is empty. Add it.
      This fixes following warning observed on Lamobo R1:
      
      WARNING: CPU: 1 PID: 190 at sound/core/init.c:207 snd_card_new+0x430/0x480 [snd]
      Modules linked in: sun4i_codec(E+) sun4i_backend(E+) snd_soc_core(E) ...
      CPU: 1 PID: 190 Comm: systemd-udevd Tainted: G         C  E     5.10.0-1-armmp #1 Debian 5.10.4-1
      Hardware name: Allwinner sun7i (A20) Family
      Call trace:
       (snd_card_new [snd])
       (snd_soc_bind_card [snd_soc_core])
       (snd_soc_register_card [snd_soc_core])
       (sun4i_codec_probe [sun4i_codec])
      
      Fixes: 45fb6b6f ("ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs")
      Related: commit 3c27ea23 ("ASoC: qcom: Set card->owner to avoid warnings")
      Related: commit ec653df2 ("drm/vc4/vc4_hdmi: fill ASoC card owner")
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: alsa-devel@alsa-project.org
      Signed-off-by: default avatarBastian Germann <bage@linutronix.de>
      Link: https://lore.kernel.org/r/20210331151843.30583-1-bage@linutronix.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      7c0d6e48
  13. 30 Mar, 2021 11 commits
  14. 29 Mar, 2021 2 commits
  15. 28 Mar, 2021 1 commit