Skip to content
  1. Jul 29, 2022
  2. Jul 28, 2022
  3. Jul 25, 2022
  4. Jul 22, 2022
  5. Jul 16, 2022
    • Takashi Iwai's avatar
      Revert "ALSA: hda: Fix page fault in snd_hda_codec_shutdown()" · 53f07e9b
      Takashi Iwai authored
      This reverts commit 980b3a87.
      
      The commit didn't consider the fact that ASoC hdac-hda driver
      initializes the HD-audio stuff without calling
      snd_hda_codec_device_init().  Hence this caused a regression leading
      to Oops.
      
      Revert the commit to restore the behavior.
      
      Fixes: 980b3a87
      
       ("ALSA: hda: Fix page fault in snd_hda_codec_shutdown()")
      Link: https://lore.kernel.org/r/3c40df55-3aee-1e08-493b-7b30cd84dc00@linux.intel.com
      Link: https://lore.kernel.org/r/20220715182903.19594-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      53f07e9b
    • Takashi Iwai's avatar
      Revert "ALSA: hda: cs35l41: Allow compilation test on non-ACPI configurations" · d59d2277
      Takashi Iwai authored
      Since the recent change in CS35L41 codec requires the reference of
      acpi_dev handle, the current Kconfig may lead to a build breakage.
      
      Revert the Kconfig change and re-introduce the hard dependency on
      CONFIG_ACPI again as a temporary workaround.
      
      Fixes: eef37596
      
       ("ALSA: hda: cs35l41: Support reading subsystem id from ACPI")
      Link: https://lore.kernel.org/r/20220715182427.18891-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d59d2277
  6. Jul 15, 2022
    • Cezary Rojewski's avatar
      ALSA: hda: Skip event processing for unregistered codecs · e7255c00
      Cezary Rojewski authored
      
      
      When codec is unbound but not yet removed, in the eyes of
      snd_hdac_bus_process_unsol_events() it is still a valid target to
      delegate work to. Such behaviour may lead to use-after-free errors.
      Address by verifying if codec is actually registered.
      
      Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
      Link: https://lore.kernel.org/r/20220706120230.427296-6-cezary.rojewski@intel.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e7255c00
    • Stefan Binding's avatar
      ALSA: hda: cs35l41: Add module parameter to control firmware load · 622f2199
      Stefan Binding authored
      
      
      By default, the driver will automatically load DSP firmware
      for the amps, if available. Adding this option allows the
      autoload to be optional, which allows for different configurations.
      
      Signed-off-by: default avatarStefan Binding <sbinding@opensource.cirrus.com>
      Signed-off-by: default avatarVitaly Rodionov <vitalyr@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20220630002335.366545-15-vitalyr@opensource.cirrus.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      622f2199
    • Stefan Binding's avatar
      ALSA: hda: cs35l41: Support Firmware switching and reloading · 47ceabd9
      Stefan Binding authored
      
      
      This is required to support CS35L41 calibration.
      
      By default, speaker protection firmware will be loaded, if
      available. However, different firmware is required to run
      the calibration sequence, so it is necessary to add support
      to be able to unload, switch and reload firmware.
      
      This patch adds 2 ALSA Controls for each amp:
      "DSP1 Firmware Load"
      "DSP1 Firmware Type"
      
      "DSP1 Firmware Load" can be used to unload and
      load the firmware.
      "DSP1 Firmware Type"  can be used to switch the
      target firmware to be loaded by "DSP1 Firmware Load"
      
      Since loading firmware can add new ALSA controls, it is
      necessary to ensure the firmware loading is run asynchronously
      from the ALSA control itself to prevent deadlocks.
      
      Note: When switching between firmwares, an ALSA control is
      only added if it has not previously existed. If it had existed
      previously, it will be re-enabled instead.
      
      Signed-off-by: default avatarStefan Binding <sbinding@opensource.cirrus.com>
      Signed-off-by: default avatarVitaly Rodionov <vitalyr@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20220630002335.366545-14-vitalyr@opensource.cirrus.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      47ceabd9
    • Stefan Binding's avatar
      ALSA: hda: cs35l41: Add defaulted values into dsp bypass config sequence · 4fa58b1d
      Stefan Binding authored
      
      
      The config sequences for running with and without firmware and DSP
      are different. The original behavior assumed that we would only
      run without DSP only in the case where firmware load failed.
      This meant the non-firmware sequence was written with the assumtion
      that various registers would be set to their default value.
      However, to support the ability to unload the firmware, the
      non-firmware register sequence must be updated to update all
      required registers, including values that would be defaulted,
      in case the firmware sequence, which could have already run,
      has changed their value.
      
      Signed-off-by: default avatarStefan Binding <sbinding@opensource.cirrus.com>
      Signed-off-by: default avatarVitaly Rodionov <vitalyr@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20220630002335.366545-13-vitalyr@opensource.cirrus.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4fa58b1d
    • Stefan Binding's avatar
      ALSA: hda: hda_cs_dsp_ctl: Add fw id strings · 291e7c22
      Stefan Binding authored
      
      
      This will be used to define the firmware names.
      
      Signed-off-by: default avatarStefan Binding <sbinding@opensource.cirrus.com>
      Signed-off-by: default avatarVitaly Rodionov <vitalyr@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20220630002335.366545-12-vitalyr@opensource.cirrus.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      291e7c22
    • Stefan Binding's avatar
      ALSA: hda: cs35l41: Read Speaker Calibration data from UEFI variables · 3e34e2ae
      Stefan Binding authored
      
      
      Speaker Calibration data, specific to an individual speaker is
      stored inside UEFI variables during calibration, and can be
      used by the DSP.
      
      Signed-off-by: default avatarStefan Binding <sbinding@opensource.cirrus.com>
      Signed-off-by: default avatarVitaly Rodionov <vitalyr@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20220630002335.366545-11-vitalyr@opensource.cirrus.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3e34e2ae
    • Stefan Binding's avatar
      ALSA: hda: cs35l41: Support Hibernation during Suspend · 1873ebd3
      Stefan Binding authored
      
      
      CS35L41 supports hibernation during suspend when using
      DSP firmware.
      When the driver suspends it will hibernate the part, if
      firmware is running, and resume will wake from hibernation.
      CS35L41 driver will suspend/resume when requested by
      hda driver.
      Note that suspend/resume and hibernation is only supported
      when firmware is running.
      
      Signed-off-by: default avatarStefan Binding <sbinding@opensource.cirrus.com>
      Signed-off-by: default avatarVitaly Rodionov <vitalyr@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20220630002335.366545-10-vitalyr@opensource.cirrus.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1873ebd3
    • Takashi Iwai's avatar
      Merge tag 'asoc-v5.20' of... · 29a249d7
      Takashi Iwai authored
      Merge tag 'asoc-v5.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
      
      ASoC: Updates for v5.20
      
      This is a big release thus far and there will probably be more changes
      to come, it's a combination of a larger than usual crop of new drivers
      and some subsysetm wide cleanups from Charles rather than anything
      structural.  The SOF and Intel DSP code both also continue to be very
      actively developed.
      
       - Restructing of the set_fmt() callbacks to be specified in terms of
         the device rather than with semantics depending on if the device is
         supposed to be a CODEC or SoC, making things clearer in situations
         like CODEC to CODEC links.
       - Clean up of the way we flag which DAI naming scheme we use to reflect
         the progress that's been made modernising things.
       - Merge of more of the Intel AVS driver stack, including some board
         integrations.
       - New version 4 mechanism for communication with SOF DSPs.
       - Suppoort for dynamically selecting the PLL to use at runtime on i.MX
         platforms.
       - Improvements for CODEC to CODEC support in the generic cards.
       - Support for AMD Jadeite and various machines, Intel MetorLake DSPs,
         Mediatek MT8186 DSPs and MT6366, nVidia Tegra MDDRC, OPE and PEQ, NXP
         TFA9890, Qualcomm SDM845, WCD9335 and WAS883x, and Texas Instruments
         TAS2780.
      29a249d7
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v5.19-rc4-2' of... · cf33ce6f
      Takashi Iwai authored
      Merge tag 'asoc-fix-v5.19-rc4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Drop Rockchip BCLK management for v5.19
      
      As covered in the second revert commit in this pull request the version
      of the BCLK muxing that's in v5.19 is causing issues, let's just revert
      it and wait for the more complete support in v5.20 instead.
      cf33ce6f
    • Zheyu Ma's avatar
      ALSA: bcd2000: Fix a UAF bug on the error path of probing · ffb2759d
      Zheyu Ma authored
      When the driver fails in snd_card_register() at probe time, it will free
      the 'bcd2k->midi_out_urb' before killing it, which may cause a UAF bug.
      
      The following log can reveal it:
      
      [   50.727020] BUG: KASAN: use-after-free in bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000]
      [   50.727623] Read of size 8 at addr ffff88810fab0e88 by task swapper/4/0
      [   50.729530] Call Trace:
      [   50.732899]  bcd2000_input_complete+0x1f1/0x2e0 [snd_bcd2000]
      
      Fix this by adding usb_kill_urb() before usb_free_urb().
      
      Fixes: b47a2229
      
       ("ALSA: MIDI driver for Behringer BCD2000 USB device")
      Signed-off-by: default avatarZheyu Ma <zheyuma97@gmail.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20220715010515.2087925-1-zheyuma97@gmail.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ffb2759d
  7. Jul 14, 2022
  8. Jul 13, 2022