1. 14 1月, 2022 1 次提交
  2. 15 10月, 2021 1 次提交
  3. 23 7月, 2021 1 次提交
  4. 03 6月, 2021 1 次提交
  5. 09 4月, 2021 2 次提交
  6. 19 2月, 2021 1 次提交
  7. 27 1月, 2021 1 次提交
  8. 12 1月, 2021 1 次提交
  9. 16 11月, 2020 1 次提交
  10. 14 10月, 2020 1 次提交
    • K
      ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close · ce1558c2
      Kai Vehmanen 提交于
      A race exists between closing a PCM and update of ELD data. In
      hdmi_pcm_close(), hinfo->nid value is modified without taking
      spec->pcm_lock. If this happens concurrently while processing an ELD
      update in hdmi_pcm_setup_pin(), converter assignment may be done
      incorrectly.
      
      This bug was found by hitting a WARN_ON in snd_hda_spdif_ctls_assign()
      in a HDMI receiver connection stress test:
      
      [2739.684569] WARNING: CPU: 5 PID: 2090 at sound/pci/hda/patch_hdmi.c:1898 check_non_pcm_per_cvt+0x41/0x50 [snd_hda_codec_hdmi]
      ...
      [2739.684707] Call Trace:
      [2739.684720]  update_eld+0x121/0x5a0 [snd_hda_codec_hdmi]
      [2739.684736]  hdmi_present_sense+0x21e/0x3b0 [snd_hda_codec_hdmi]
      [2739.684750]  check_presence_and_report+0x81/0xd0 [snd_hda_codec_hdmi]
      [2739.684842]  intel_audio_codec_enable+0x122/0x190 [i915]
      
      Fixes: 42b29870 ("ALSA: hda - hdmi playback without monitor in dynamic pcm bind mode")
      Signed-off-by: NKai Vehmanen <kai.vehmanen@linux.intel.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20201013152628.920764-1-kai.vehmanen@linux.intel.comSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      ce1558c2
  11. 12 10月, 2020 1 次提交
  12. 21 9月, 2020 1 次提交
  13. 03 9月, 2020 1 次提交
  14. 27 8月, 2020 1 次提交
  15. 25 8月, 2020 1 次提交
  16. 12 8月, 2020 1 次提交
  17. 05 8月, 2020 1 次提交
    • K
      ALSA: hda/hdmi: Add quirk to force connectivity · cd72c317
      Kai-Heng Feng 提交于
      HDMI on some platforms doesn't enable audio support because its Port
      Connectivity [31:30] is set to AC_JACK_PORT_NONE:
      Node 0x05 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP
        Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
        Amp-Out vals:  [0x00 0x00]
        Pincap 0x0b000094: OUT Detect HBR HDMI DP
        Pin Default 0x58560010: [N/A] Digital Out at Int HDMI
          Conn = Digital, Color = Unknown
          DefAssociation = 0x1, Sequence = 0x0
        Pin-ctls: 0x40: OUT
        Unsolicited: tag=00, enabled=0
        Power states:  D0 D3 EPSS
        Power: setting=D0, actual=D0
        Devices: 0
        Connection: 3
           0x02 0x03* 0x04
      
      For now, use a quirk to force connectivity based on SSID. If there are
      more platforms affected by the same issue, we can eye for a more generic
      solution.
      Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Link: https://lore.kernel.org/r/20200804155836.16252-1-kai.heng.feng@canonical.comSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      cd72c317
  18. 28 7月, 2020 1 次提交
    • T
      ALSA: hda/hdmi: Fix keep_power assignment for non-component devices · c2c3657f
      Takashi Iwai 提交于
      It's been reported that, when neither nouveau nor Nvidia graphics
      driver is used, the screen starts flickering.  And, after comparing
      between the working case (stable 4.4.x) and the broken case, it turned
      out that the problem comes from the audio component binding.  The
      Nvidia and AMD audio binding code clears the bus->keep_power flag
      whenever snd_hdac_acomp_init() succeeds.  But this doesn't mean that
      the component is actually bound, but it merely indicates that it's
      ready for binding.  So, when both nouveau and Nvidia are blacklisted
      or not ready, the driver keeps running without the audio component but
      also with bus->keep_power = false.  This made the driver runtime PM
      kicked in and powering down when unused, which results in flickering
      in the graphics side, as it seems.
      
      For fixing the bug, this patch moves the bus->keep_power flag change
      into generic_acomp_notifier_set() that is the function called from the
      master_bind callback of component ops; i.e. it's guaranteed that the
      binding succeeded.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208609
      Fixes: 5a858e79 ("ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs")
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200728082033.23933-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      c2c3657f
  19. 07 7月, 2020 3 次提交
  20. 12 6月, 2020 1 次提交
  21. 05 5月, 2020 1 次提交
  22. 29 4月, 2020 1 次提交
  23. 28 4月, 2020 1 次提交
  24. 17 4月, 2020 1 次提交
  25. 14 4月, 2020 1 次提交
  26. 10 2月, 2020 4 次提交
  27. 05 2月, 2020 1 次提交
  28. 01 2月, 2020 1 次提交
  29. 21 1月, 2020 1 次提交
  30. 14 1月, 2020 1 次提交
  31. 13 1月, 2020 1 次提交
    • T
      ALSA: hda: Manage concurrent reg access more properly · 1a462be5
      Takashi Iwai 提交于
      In the commit 8e85def5 ("ALSA: hda: enable regmap internal
      locking"), we re-enabled the regmap lock due to the reported
      regression that showed the possible concurrent accesses.  It was a
      temporary workaround, and there are still a few opened races even
      after the revert.  In this patch, we cover those still opened windows
      with a proper mutex lock and disable the regmap internal lock again.
      
      First off, the patch introduces a new snd_hdac_device.regmap_lock
      mutex that is applied for each snd_hdac_regmap_*() call, including
      read, write and update helpers.  The mutex is applied carefully so
      that it won't block the self-power-up procedure in the helper
      function.  Also, this assures the protection for the accesses without
      regmap, too.
      
      The snd_hdac_regmap_update_raw() is refactored to use the standard
      regmap_update_bits_check() function instead of the open-code.  The
      non-regmap case is still open-coded but it's an easy part.  The all
      read and write operations are in the single mutex protection, so it's
      now race-free.
      
      In addition, a couple of new helper functions are added:
      snd_hdac_regmap_update_raw_once() and snd_hdac_regmap_sync().  Both
      are called from HD-audio legacy driver.  The former is to initialize
      the given verb bits but only once when it's not initialized yet.  Due
      to this condition, the function invokes regcache_cache_only(), and
      it's now performed inside the regmap_lock (formerly it was racy) too.
      The latter function is for simply invoking regcache_sync() inside the
      regmap_lock, which is called from the codec resume call path.
      Along with that, the HD-audio codec driver code is slightly modified /
      simplified to adapt those new functions.
      
      And finally, snd_hdac_regmap_read_raw(), *_write_raw(), etc are
      rewritten with the helper macro.  It's just for simplification because
      the code logic is identical among all those functions.
      Tested-by: NKai Vehmanen <kai.vehmanen@linux.intel.com>
      Link: https://lore.kernel.org/r/20200109090104.26073-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      1a462be5
  32. 04 1月, 2020 1 次提交
    • T
      ALSA: control: Add verification for kctl accesses · fbd3eb7f
      Takashi Iwai 提交于
      The current implementation of ALSA control API fully relies on the
      callbacks of each driver, and there is no verification of the values
      passed via API.  This patch is an attempt to improve the situation
      slightly by adding the validation code for the values stored via info
      and get callbacks.
      
      The patch adds a new kconfig, CONFIG_SND_CTL_VALIDATION.  It depends
      on CONFIG_SND_DEBUG and off as default since the validation would
      require a slight overhead including the additional call of info
      callback at each get callback invocation.
      
      When this config is enabled, the values stored by each info callback
      invocation are verified, namely:
      - Whether the info type is valid
      - Whether the number of enum items is non-zero
      - Whether the given info count is within the allowed boundary
      
      Similarly, the values stored at each get callback are verified as
      well:
      - Whether the values are within the given range
      - Whether the values are aligned with the given step
      - Whether any further changes are seen in the data array over the
        given info count
      
      The last point helps identifying a possibly invalid data type access,
      typically a case where the info callback declares the type being
      SNDRV_CTL_ELEM_TYPE_ENUMERATED while the get/put callbacks store
      the values in value.integer.value[] array.
      
      When a validation fails, the ALSA core logs an error message including
      the device and the control ID, and the API call also returns an
      error.  So, with the new validation turned on, the driver behavior
      difference may be visible on user-space, too -- it's intentional,
      though, so that we can catch an error more clearly.
      
      The patch also introduces a new ctl access type,
      SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK.  A driver may pass this flag with
      other access bits to indicate that the ctl element won't be verified.
      It's useful when a driver code is specially written to access the data
      greater than info->count size by some reason.  For example, this flag
      is actually set now in HD-audio HDMI codec driver which needs to clear
      the data array in the case of the disconnected monitor.
      
      Also, the PCM channel-map helper code is slightly modified to avoid
      the false-positive hit by this validation code, too.
      
      Link: https://lore.kernel.org/r/20200104083556.27789-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      fbd3eb7f
  33. 15 12月, 2019 1 次提交
  34. 04 12月, 2019 1 次提交
    • T
      ALSA: hda: hdmi - Keep old slot assignment behavior for Intel platforms · 643a2cc9
      Takashi Iwai 提交于
      The commit 609f5485 ("ALSA: hda: hdmi - preserve non-MST PCM
      routing for Intel platforms") tried to restore the old behavior wrt
      assignment of the PCM slot for Intel platforms, but this didn't do it
      right.  As found in the later discussion, a positive pipe id on Intel
      platforms can be passed for single monitor attachment case.
      
      This patch reverts the previous attempt and applies a simpler
      workaround instead.  Actually, for Intel platforms, we can handle as
      if per_pin->dev_id=0, assign the primary slot at the first try.  This
      assures the compatible behavior with the previous versions regarding
      the slot assignment.
      
      Fixes: 609f5485 ("ALSA: hda: hdmi - preserve non-MST PCM routing for Intel platforms")
      Link: https://lore.kernel.org/r/20191203154105.30414-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      643a2cc9