1. 05 3月, 2020 3 次提交
  2. 19 2月, 2020 1 次提交
  3. 18 2月, 2020 2 次提交
  4. 17 2月, 2020 1 次提交
  5. 12 2月, 2020 2 次提交
  6. 06 2月, 2020 2 次提交
  7. 05 2月, 2020 1 次提交
  8. 01 2月, 2020 1 次提交
  9. 26 1月, 2020 1 次提交
  10. 23 1月, 2020 1 次提交
  11. 21 1月, 2020 1 次提交
  12. 20 1月, 2020 1 次提交
    • T
      ALSA: hda: Apply aligned MMIO access only conditionally · 4d024fe8
      Takashi Iwai 提交于
      It turned out that the recent simplification of HD-audio bus access
      helpers caused a regression on the virtual HD-audio device on QEMU
      with ARM platforms.  The driver got a CORB/RIRB timeout and couldn't
      probe any codecs.
      
      The essential difference that caused a problem was the enforced
      aligned MMIO accesses by simplification.  Since snd-hda-tegra driver
      is enabled on ARM, it enables CONFIG_SND_HDA_ALIGNED_MMIO, which makes
      the all HD-audio drivers using the aligned MMIO accesses.  While this
      is mandatory for snd-hda-tegra, it seems that snd-hda-intel on ARM
      gets broken by this access pattern.
      
      For addressing the regression, this patch introduces a new flag,
      aligned_mmio, to hdac_bus object, and applies the aligned MMIO only
      when this flag is set.  This change affects only platforms with
      CONFIG_SND_HDA_ALIGNED_MMIO set, i.e. mostly only for ARM platforms.
      
      Unfortunately the patch became a big bigger than it should be, just
      because the former calls didn't take hdac_bus object in the argument,
      hence we had to extend the call patterns.
      
      Fixes: 19abfefd ("ALSA: hda: Direct MMIO accesses")
      BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1161152
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200120104127.28985-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      4d024fe8
  13. 17 1月, 2020 2 次提交
  14. 14 1月, 2020 2 次提交
  15. 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
  16. 12 1月, 2020 1 次提交
  17. 11 1月, 2020 1 次提交
    • T
      ALSA: hda: Rename back to dmic_detect option · 7fba6aea
      Takashi Iwai 提交于
      We've got quite a few bug reports showing the SOF driver being loaded
      unintentionally recently, and the reason seems to be that users didn't
      know the module option change: with the recent kernel, a new option
      dsp_driver=1 has to be passed to a new module snd-intel-dspcfg
      instead of snd_hda_intel.dmic_detect=0 option.
      
      That is, actually there are two tricky things here:
      - We changed the whole detection in another module and another
        option semantics.
      - The existing option for skipping the DSP probe was also renamed.
      
      For avoiding the confusion and giving user more hint, this patch
      reverts the renamed option dsp_driver back to dmic_detect for
      snd-hda-intel module, and show the warning about the module option
      change when the non-default value is passed.
      
      Fixes: 82d9d54a ("ALSA: hda: add Intel DSP configuration / probe code")
      Link: https://lore.kernel.org/r/20200109082000.26729-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      7fba6aea
  18. 08 1月, 2020 2 次提交
  19. 05 1月, 2020 3 次提交
  20. 04 1月, 2020 2 次提交
    • 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
    • K
      ALSA: hda/realtek - Add new codec supported for ALCS1200A · 6d9ffcff
      Kailang Yang 提交于
      Add ALCS1200A supported.
      It was similar as ALC900.
      Signed-off-by: NKailang Yang <kailang@realtek.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/a9bd3cdaa02d4fa197623448d5c51e50@realtek.comSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      6d9ffcff
  21. 03 1月, 2020 4 次提交
  22. 01 1月, 2020 1 次提交
  23. 30 12月, 2019 1 次提交
  24. 27 12月, 2019 1 次提交
  25. 24 12月, 2019 1 次提交
    • T
      ALSA: hda - Apply sync-write workaround to old Intel platforms, too · c366b3db
      Takashi Iwai 提交于
      Klaus Ethgen reported occasional high CPU usages in his system that
      seem caused by HD-audio driver.  The perf output revealed that it's
      in the unsolicited event handling in the workqueue, and the problem
      seems triggered by some communication stall between the controller and
      the codec at the runtime or system resume.
      
      Actually a similar phenomenon was seen in the past for other Intel
      platforms, and we already applied the workaround to enforce sync-write
      for CORB/RIRB verbs for Skylake and newer chipsets (commit
      2756d914 "ALSA: hda - Fix intermittent CORB/RIRB stall on Intel
      chips").  Fortunately, the same workaround is applicable to the old
      chipset, and the experiment showed the positive effect.
      
      Based on the experiment result, this patch enables the sync-write
      workaround for all Intel chipsets.  The only reason I hesitated to
      apply this workaround was about the possibly slightly higher CPU usage.
      But if the lack of sync causes a much severer problem even for quite
      old chip, we should think this would be necessary for all Intel chips.
      Reported-by: NKlaus Ethgen <Klaus@ethgen.ch>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20191223171833.GA17053@chua
      Link: https://lore.kernel.org/r/20191223221816.32572-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      c366b3db
  26. 21 12月, 2019 1 次提交