Skip to content
Permalink
David-Hennings…
Switch branches/tags

Commits on Apr 18, 2021

  1. sound: rawmidi: Add framing mode

    This commit adds a new framing mode that frames all MIDI data into
    32-byte frames with a timestamp.
    
    The main benefit is that we can get accurate timestamps even if
    userspace wakeup and processing is not immediate.
    
    Testing on a Celeron N3150 with this mode has a max jitter of 2.8 ms,
    compared to the in-kernel seq implementation which has a max jitter
    of 5 ms during idle and much worse when running scheduler stress tests
    in parallel.
    
    Signed-off-by: David Henningsson <coding@diwic.se>
    diwic authored and intel-lab-lkp committed Apr 18, 2021

Commits on Apr 17, 2021

  1. ALSA: usb-audio: Add support for many Roland devices' implicit feedba…

    …ck quirks
    
    It makes USB audio capture and playback possible and pristine on my Roland
    INTEGRA-7, Boutique D-05, and R-26, along with many more I've encountered
    people having had issues with over the last decade or so.
    
    Signed-off-by: Lucas Endres <jaffa225man@gmail.com>
    Link: https://lore.kernel.org/r/CAOsVg8rA61B=005_VyUwpw3piVwA7Bo5fs1GYEB054efyzGjLw@mail.gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    jaffa225man authored and tiwai committed Apr 17, 2021

Commits on Apr 16, 2021

  1. ALSA: hda/hdmi: fix race in handling acomp ELD notification at resume

    When snd-hda-codec-hdmi is used with ASoC HDA controller like SOF (acomp
    used for ELD notifications), display connection change done during suspend,
    can be lost due to following sequence of events:
    
      1. system in S3 suspend
      2. DP/HDMI receiver connected
      3. system resumed
      4. HDA controller resumed, but card->deferred_resume_work not complete
      5. acomp eld_notify callback
      6. eld_notify ignored as power state is not CTL_POWER_D0
      7. HDA resume deferred work completed, power state set to CTL_POWER_D0
    
    This results in losing the notification, and the jack state reported to
    user-space is not correct.
    
    The check on step 6 was added in commit 8ae743e ("ALSA: hda - Skip
    ELD notification during system suspend"). It would seem with the deferred
    resume logic in ASoC core, this check is not safe.
    
    Fix the issue by modifying the check to use "dev.power.power_state.event"
    instead of ALSA specific card power state variable.
    
    BugLink: thesofproject#2825
    Suggested-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    Link: https://lore.kernel.org/r/20210416131157.1881366-1-kai.vehmanen@linux.intel.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    kv2019i authored and tiwai committed Apr 16, 2021
  2. ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G7

    The HP ProBook 445 G7 (17T32ES) uses ALC236. Like ALC236_FIXUP_HP_GPIO_LED,
    COEF index 0x34 bit 5 is used to control the playback mute LED, but the
    microphone mute LED is controlled using pin VREF instead of a COEF index.
    
    AlsaInfo: https://alsa-project.org/db/?f=0d3f4d1af39cc359f9fea9b550727ee87e5cf45a
    Signed-off-by: Jonas Witschel <diabonas@archlinux.org>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20210416105852.52588-1-diabonas@archlinux.org
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    diabonas authored and tiwai committed Apr 16, 2021
  3. ALSA: hda/realtek: Add quirk for Lenovo Ideapad S740

    Lenovo Ideapad S740 requires quite a few COEF setups to make its
    speakers working.  The verb table was provided from Ryan Prescott as
    the result of investigation via qemu:
      https://github.com/ryanprescott/realtek-verb-tools/wiki/How-to-sniff-verbs-from-a-Windows-sound-driver
    
    BugLink: thesofproject#2748
    Tested-by: Ryan Prescott <ryan@cousinscomputers.net>
    Link: https://lore.kernel.org/r/20210416081211.20059-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 16, 2021
  4. ALSA: hda/realtek: fix mic boost on Intel NUC 8

    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: Phil Calvin <phil@philcalvin.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/80dc5663-7734-e7e5-25ef-15b5df24511a@philcalvin.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    pnc authored and tiwai committed Apr 16, 2021
  5. ALSA: control: Fix racy management of user ctl memory size account

    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: 66c6d1e ("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.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 16, 2021

Commits on Apr 14, 2021

  1. ALSA: usb-audio: Apply implicit feedback mode for BOSS devices

    During the recent rewrite of the implicit feedback support, we've
    tested to apply the implicit fb on BOSS devices, but it failed, as the
    capture stream didn't start without the playback.  As the end result,
    it got another type of quirk for tying both streams but starts
    playback always (commit 6234fdc "ALSA: usb-audio: Quirk for BOSS
    GT-001").
    
    Meanwhile, Mike Oliphant has tested the real implicit feedback mode
    for the playback again with the latest code, and found out that it
    actually works if the initial feedback sync is skipped; that is, on
    those BOSS devices, the playback stream has to be started at first
    without waiting for the capture URB completions.  Otherwise it gets
    stuck.  In the rest operations after the capture stream processed, we
    can take them as the implicit feedback source.
    
    This patch is an attempt to improve the support for BOSS devices with
    the implicit feedback mode in the way described above.  It adds a new
    flag to snd_usb_audio, playback_first, indicating that the playback
    stream starts without sync with the initial capture completion.  This
    flag is set in the quirk table with the new IMPLICIT_FB_BOTH type.
    
    Reported-and-tested-by: Mike Oliphant <oliphant@nostatic.org>
    Link: https://lore.kernel.org/r/20210414083255.9527-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 14, 2021
  2. ALSA: control_led - fix the stack usage (control element ops)

    It's a bad idea to allocate big structures on the stack.
    Mark the variables as static and add a note for the locking.
    
    Fixes: 22d8de6 ("ALSA: control - add generic LED trigger module as the new control layer")
    Cc: Nathan Chancellor <nathan@kernel.org>
    Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>
    Link: https://lore.kernel.org/r/20210414105858.1937710-1-perex@perex.cz
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    perexg authored and tiwai committed Apr 14, 2021

Commits on Apr 13, 2021

  1. ALSA: usb-audio: Explicitly set up the clock selector

    In the current code, we have some assumption that the audio clock
    selector has been set up implicitly and don't want to touch it unless
    it's really needed for the fallback autoclock setup.  This works for
    most devices but some seem having a problem.  Partially this was
    covered for the devices with a single connector at the initialization
    phase (commit 086b957 "ALSA: usb-audio: Skip the clock selector
    inquiry for single connections"), but also there are cases where the
    wrong clock set up is kept silently.  The latter seems to be the cause
    of the noises on Behringer devices.
    
    In this patch, we explicitly set up the audio clock selector whenever
    the appropriate node is found.
    
    Reported-by: Geraldo Nascimento <geraldogabriel@gmail.com>
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199327
    Link: https://lore.kernel.org/r/CAEsQvcvF7LnO8PxyyCxuRCx=7jNeSCvFAd-+dE0g_rd1rOxxdw@mail.gmail.com
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20210413084152.32325-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 13, 2021

Commits on Apr 12, 2021

  1. ALSA: virtio: use module_virtio_driver() to simplify the code

    module_virtio_driver() makes the code simpler by eliminating
    boilerplate code.
    
    Signed-off-by: Chen Huang <chenhuang5@huawei.com>
    Reviewed-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
    Link: https://lore.kernel.org/r/20210408125429.1158703-1-chenhuang5@huawei.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Chen Huang authored and tiwai committed Apr 12, 2021

Commits on Apr 10, 2021

  1. ALSA: HDA: Add access description in __snd_hda_add_vmaster

    Add description for access parameter in __snd_hda_add_vmaster()
    to prevent the compilation warning:
    warning: Function parameter or member 'access' not described in '__snd_hda_add_vmaster'
    
    Fixes: e65bf99 ("ALSA: HDA - remove the custom implementation for the audio LED trigger")
    Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Link: https://lore.kernel.org/r/20210409214616.1539685-1-ranjani.sridharan@linux.intel.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    ranj063 authored and tiwai committed Apr 10, 2021

Commits on Apr 9, 2021

  1. ALSA: control - double free in snd_ctl_led_init()

    "group - 1" was intended here instead of "group".  The current error
    handling will double free the first item in the array and leak the last
    item.
    
    Fixes: cb17fe0 ("ALSA: control - add sysfs support to the LED trigger module")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: Jaroslav Kysela <perex@perex.cz>
    Link: https://lore.kernel.org/r/YHBJ4frGxErWB182@mwanda
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    error27 authored and tiwai committed Apr 9, 2021
  2. ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX

    ToneLab EX guitar pedal device requires the same quirk like ToneLab ST
    for supporting the MIDI.
    
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212593
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20210407144549.1530-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 9, 2021
  3. ALSA: usb-audio: Skip probe of UA-101 devices

    UA-101 device and co are supported by another driver, snd-ua101, but
    the USB audio class driver (snd-usb-audio) catches all and this
    resulted in the lack of functionality like missing MIDI devices.
    
    This patch introduces a sort of deny-listing for those devices to just
    return -ENODEV at probe in snd-usb-audio driver, so that it falls back
    to the probe by snd-ua101.
    
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212477
    Link: https://lore.kernel.org/r/20210408075656.30184-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 9, 2021
  4. Merge branch 'for-linus' into for-next

    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 9, 2021

Commits on Apr 8, 2021

  1. ALSA: control: Add memory consumption limit to user controls

    ALSA control interface allows users to add arbitrary control elements
    (called "user controls" or "user elements"), and its resource usage is
    limited just by the max number of control sets (currently 32).  This
    limit, however, is quite loose: each allocation of control set may
    have 1028 elements, and each element may have up to 512 bytes (ILP32) or
    1024 bytes (LP64) of value data. Moreover, each control set may contain
    the enum strings and TLV data, which can be up to 64kB and 128kB,
    respectively.  Totally, the whole memory consumption may go over 38MB --
    it's quite large, and we'd rather like to reduce the size.
    
    OTOH, there have been other requests even to increase the max number
    of user elements; e.g. ALSA firewire stack require the more user
    controls, hence we want to raise the bar, too.
    
    For satisfying both requirements, this patch changes the management of
    user controls: instead of setting the upper limit of the number of
    user controls, we check the actual memory allocation size and set the
    upper limit of the total allocation in bytes.  As long as the memory
    consumption stays below the limit, more user controls are allowed than
    the current limit 32. At the same time, we set the lower limit (8MB)
    as default than the current theoretical limit, in order to lower the
    risk of DoS.
    
    As a compromise for lowering the default limit, now the actual memory
    limit is defined as a module option, 'max_user_ctl_alloc_size', so that
    user can increase/decrease the limit if really needed, too.
    
    Link: https://lore.kernel.org/r/s5htur3zl5e.wl-tiwai@suse.de
    Co-developed-by: Takashi Iwai <tiwai@suse.de>
    Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Link: https://lore.kernel.org/r/20210408103149.40357-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    takaswie authored and tiwai committed Apr 8, 2021
  2. ALSA: hda/realtek: Fix speaker amp setup on Acer Aspire E1

    We've got a report about Acer Aspire E1 (PCI SSID 1025:0840) that
    loses the speaker output after resume.  With the comparison of COEF
    dumps, it was identified that the COEF 0x0d bits 0x6000 corresponds to
    the speaker amp.
    
    This patch adds the specific quirk for the device to restore the COEF
    bits at the codec (re-)initialization.
    
    BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1183869
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20210407095730.12560-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 8, 2021

Commits on Apr 7, 2021

  1. Merge tag 'asoc-fix-v5.12-rc6' of https://git.kernel.org/pub/scm/linu…

    …x/kernel/git/broonie/sound into for-linus
    
    ASoC: Fixes for v5.12
    
    A fairly small batch of driver specific fixes, mainly for various x86
    systems with the biggest set being fixes to power down DSPs properly on
    x86 SOF systems.
    tiwai committed Apr 7, 2021
  2. ALSA: usb-audio: Drop implicit fb quirk entries dubbed for capture

    The implicit feedback quirk table contains the entries that also
    appear in the capture quirks, and those are all handled to be
    skipped.  For the code simplicity, drop the duped entries in the
    playback quirk table, and check the match with the capture quirk table
    instead.
    
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212519
    Link: https://lore.kernel.org/r/20210406113837.32041-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 7, 2021
  3. ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls

    There are a few calls of usb_driver_claim_interface() but all of those
    miss the proper error checks, as reported by Coverity.  This patch
    adds those missing checks.
    
    Along with it, replace the magic pointer with -1 with a constant
    USB_AUDIO_IFACE_UNUSED for better readability.
    
    Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
    Addresses-Coverity-ID: 1475943 ("Error handling issues")
    Addresses-Coverity-ID: 1475944 ("Error handling issues")
    Addresses-Coverity-ID: 1475945 ("Error handling issues")
    Fixes: b1ce7ba ("ALSA: usb-audio: claim autodetected PCM interfaces all at once")
    Fixes: e577999 ("ALSA: usb-audio: refactor code")
    Link: https://lore.kernel.org/r/202104051059.FB7F3016@keescook
    Link: https://lore.kernel.org/r/20210406113534.30455-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 7, 2021
  4. ALSA: aloop: Fix initialization of controls

    Add a control to the card before copying the id so that the numid field
    is initialized in the copy. Otherwise the numid field of active_id,
    format_id, rate_id and channels_id will be the same (0) and
    snd_ctl_notify() will not queue the events properly.
    
    Signed-off-by: Jonas Holmberg <jonashg@axis.com>
    Reviewed-by: Jaroslav Kysela <perex@perex.cz>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20210407075428.2666787-1-jonashg@axis.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Jonas Holmberg authored and tiwai committed Apr 7, 2021

Commits on Apr 6, 2021

  1. ALSA: hda/conexant: Apply quirk for another HP ZBook G5 model

    There is another HP ZBook G5 model with the PCI SSID 103c:844f that
    requires the same quirk for controlling the mute LED.  Add the
    corresponding entry to the quirk table.
    
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212407
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20210401171314.667-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 6, 2021
  2. ALSA: control - off by one in store_mode()

    If count is 16 then this will put the NUL terminator one element beyond
    the end of the array.
    
    Fixes: cb17fe0 ("ALSA: control - add sysfs support to the LED trigger module")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: Jaroslav Kysela <perex@perex.cz>
    Link: https://lore.kernel.org/r/YGcDOtrimR46vr0k@mwanda
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    error27 authored and tiwai committed Apr 6, 2021

Commits on Apr 2, 2021

  1. ASoC: fsl_esai: Fix TDM slot setup for I2S mode

    When using the driver in I2S TDM mode, the fsl_esai_startup()
    function rewrites the number of slots previously set by the
    fsl_esai_set_dai_tdm_slot() function to 2.
    To fix this, let's use the saved slot count value or, if TDM
    is not used and the number of slots is not set, the driver will use
    the default value (2), which is set by fsl_esai_probe().
    
    Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
    Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
    Link: https://lore.kernel.org/r/20210402081405.9892-1-shc_work@mail.ru
    Signed-off-by: Mark Brown <broonie@kernel.org>
    shcgit authored and broonie committed Apr 2, 2021

Commits on Apr 1, 2021

  1. ASoC: codecs: lpass-rx-macro: set npl clock rate correctly

    NPL clock rate is twice the MCLK rate, so set this correctly to
    avoid soundwire timeouts.
    
    Fixes: af3d54b ("ASoC: codecs: lpass-rx-macro: add support for lpass rx macro")
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20210331171235.24824-2-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Srinivas-Kandagatla authored and broonie committed Apr 1, 2021
  2. ASoC: codecs: lpass-tx-macro: set npl clock rate correctly

    NPL clock rate is twice the MCLK rate, so set this correctly to
    avoid soundwire timeouts.
    
    Fixes: c39667d ("ASoC: codecs: lpass-tx-macro: add support for lpass tx macro")
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20210331171235.24824-1-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Srinivas-Kandagatla authored and broonie committed Apr 1, 2021
  3. Merge branch 'topic/mute-led' into for-next

    Pull mute-LED helper fixes from Jaroslav.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Apr 1, 2021
  4. ALSA: control led - improve the set_led_id() parser

    It may be possible that the string pointer does not move
    when parsing. Add a code which detects this state and
    simply break the parser loop in this case.
    
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>
    Link: https://lore.kernel.org/r/20210331180725.663623-1-perex@perex.cz
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    perexg authored and tiwai committed Apr 1, 2021
  5. ALSA: control - add the missing prev_lops2 initialization

    As static analysis reported, the prev_lops2 should contain
    the previous lops2 pointer in snd_ctl_disconnect_layer().
    
    Link: https://lore.kernel.org/alsa-devel/96e9bd5c-c8db-0db8-b393-fbf4a047dc80@canonical.com/
    Fixes: 3f0638a ("ALSA: control - add layer registration routines")
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>
    Link: https://lore.kernel.org/r/20210331180702.663489-1-perex@perex.cz
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    perexg authored and tiwai committed Apr 1, 2021

Commits on Mar 31, 2021

  1. ASoC: sunxi: sun4i-codec: fill ASoC card owner

    card->owner is a required property and since commit 81033c6 ("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: 45fb6b6 ("ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs")
    Related: commit 3c27ea2 ("ASoC: qcom: Set card->owner to avoid warnings")
    Related: commit ec653df ("drm/vc4/vc4_hdmi: fill ASoC card owner")
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: alsa-devel@alsa-project.org
    Signed-off-by: Bastian Germann <bage@linutronix.de>
    Link: https://lore.kernel.org/r/20210331151843.30583-1-bage@linutronix.de
    Signed-off-by: Mark Brown <broonie@kernel.org>
    bgermann authored and broonie committed Mar 31, 2021

Commits on Mar 30, 2021

  1. Merge tag 'tags/mute-led-rework' into for-next

    ALSA: control - add generic LED API
    
    This patchset tries to resolve the diversity in the audio LED
    control among the ALSA drivers. A new control layer registration
    is introduced which allows to run additional operations on
    top of the elementary ALSA sound controls.
    
    A new control access group (three bits in the access flags)
    was introduced to carry the LED group information for
    the sound controls. The low-level sound drivers can just
    mark those controls using this access group. This information
    is not exported to the user space, but user space can
    manage the LED sound control associations through sysfs
    (last patch) per Mark's request. It makes things fully
    configurable in the kernel and user space (UCM).
    
    The actual state ('route') evaluation is really easy
    (the minimal value check for all channels / controls / cards).
    If there's more complicated logic for a given hardware,
    the card driver may eventually export a new read-only
    sound control for the LED group and do the logic itself.
    
    The new LED trigger control code is completely separated
    and possibly optional (there's no symbol dependency).
    The full code separation allows eventually to move this
    LED trigger control to the user space in future.
    Actually it replaces the already present functionality
    in the kernel space (HDA drivers) and allows a quick adoption
    for the recent hardware (ASoC codecs including SoundWire).
    
    snd_ctl_led            24576  0
    
    The sound driver implementation is really easy:
    
    1) call snd_ctl_led_request() when control LED layer should be
       automatically activated
       / it calls module_request("snd-ctl-led") on demand /
    2) mark all related kcontrols with
            SNDRV_CTL_ELEM_ACCESS_SPK_LED or
            SNDRV_CTL_ELEM_ACCESS_MIC_LED
    
    Link: https://lore.kernel.org/r/20210317172945.842280-1-perex@perex.cz
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    tiwai committed Mar 30, 2021
  2. ALSA: led control - add sysfs kcontrol LED marking layer

    We need to manage the kcontrol entries association for the LED trigger
    from the user space. This patch adds a layer to the sysfs tree like:
    
    /sys/devices/virtual/sound/ctl-led/mic
       + card0
       |  + attach
       |  + detach
       |  ...
       + card1
          + attach
          ...
    
    Operations:
    
      attach and detach
        - amixer style ID is accepted and easy strings for numid and
          simple names
      reset
        - reset all associated kcontrol entries
      list
        - list associated kcontrol entries (numid values only)
    
    Additional symlinks:
    
    /sys/devices/virtual/sound/ctl-led/mic/card0/card ->
      /sys/class/sound/card0
    
    /sys/class/sound/card0/controlC0/led-mic ->
      /sys/devices/virtual/sound/ctl-led/mic/card0
    
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>
    Link: https://lore.kernel.org/r/20210317172945.842280-7-perex@perex.cz
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    perexg authored and tiwai committed Mar 30, 2021
  3. ALSA: control - add sysfs support to the LED trigger module

    Create SYSFS/devices/virtual/sound/ctl-led tree
    (with SYSFS/class/sound/ctl-led symlink).
    
      speaker/
        +-- mode
        +-- brightness
      mic/
        +-- mode
        +-- brightness
    
    Copy the idea from the HDA driver and allow to set the audio
    LEDs based on the various modes:
    
    - follow mute
    - follow moute (inverted to follow mute)
    - off
    - on
    
    Also, the actual LED state is exposed.
    
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>
    Link: https://lore.kernel.org/r/20210317172945.842280-6-perex@perex.cz
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    perexg authored and tiwai committed Mar 30, 2021
  4. ALSA: HDA - remove the custom implementation for the audio LED trigger

    With the new snd-ctl-led module, we have a generic way
    to trigger audio LEDs based on the sound control changes.
    
    Remove the custom implementation from the HDA driver.
    
    Move the LED initialization before snd_hda_gen_parse_auto_config()
    call in all drivers to create marked controls there.
    
    Signed-off-by: Jaroslav Kysela <perex@perex.cz>
    Link: https://lore.kernel.org/r/20210317172945.842280-5-perex@perex.cz
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    perexg authored and tiwai committed Mar 30, 2021
Older