You need to sign in or sign up before continuing.
  1. 19 4月, 2018 2 次提交
  2. 16 4月, 2018 1 次提交
  3. 30 3月, 2018 1 次提交
  4. 22 3月, 2018 2 次提交
  5. 21 3月, 2018 1 次提交
    • T
      ALSA: hda - Force polling mode on CFL for fixing codec communication · a8d7bde2
      Takashi Iwai 提交于
      We've observed too long probe time with Coffee Lake (CFL) machines,
      and the likely cause is some communication problem between the
      HD-audio controller and the codec chips.  While the controller expects
      an IRQ wakeup for each codec response, it seems sometimes missing, and
      it takes one second for the controller driver to time out and read the
      response in the polling mode.
      
      Although we aren't sure about the real culprit yet, in this patch, we
      put a workaround by forcing the polling mode as default for CFL
      machines; the polling mode itself isn't too heavy, and much better
      than other workarounds initially suggested (e.g. disabling
      power-save), at least.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199007
      Fixes: e79b0006 ("ALSA: hda - Add Coffelake PCI ID")
      Reported-and-tested-by: NHui Wang <hui.wang@canonical.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a8d7bde2
  6. 18 3月, 2018 1 次提交
    • T
      ALSA: hda/realtek - Always immediately update mute LED with pin VREF · e40bdb03
      Takashi Iwai 提交于
      Some HP laptops have a mute mute LED controlled by a pin VREF.  The
      Realtek codec driver updates the VREF via vmaster hook by calling
      snd_hda_set_pin_ctl_cache().
      
      This works fine as long as the driver is running in a normal mode.
      However, when the VREF change happens during the codec being in
      runtime PM suspend, the regmap access will skip and postpone the
      actual register change.  This ends up with the unchanged LED status
      until the next runtime PM resume even if you change the Master mute
      switch.  (Interestingly, the machine keeps the LED status even after
      the codec goes into D3 -- but it's another story.)
      
      For improving this usability, let the driver temporarily powering up /
      down only during the pin VREF change.  This can be achieved easily by
      wrapping the call with snd_hda_power_up_pm() / *_down_pm().
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199073
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e40bdb03
  7. 14 3月, 2018 1 次提交
    • L
      vga_switcheroo: Use device link for HDA controller · 07f4f97d
      Lukas Wunner 提交于
      Back in 2013, runtime PM for GPUs with integrated HDA controller was
      introduced with commits 0d69704a ("gpu/vga_switcheroo: add driver
      control power feature. (v3)") and 246efa4a ("snd/hda: add runtime
      suspend/resume on optimus support (v4)").
      
      Briefly, the idea was that the HDA controller is forced on and off in
      unison with the GPU.
      
      The original code is mostly still in place even though it was never a
      100% perfect solution:  E.g. on access to the HDA controller, the GPU
      is powered up via vga_switcheroo_runtime_resume_hdmi_audio() but there
      are no provisions to keep it resumed until access to the HDA controller
      has ceased:  The GPU autosuspends after 5 seconds, rendering the HDA
      controller inaccessible.
      
      Additionally, a kludge is required when hda_intel.c probes:  It has to
      check whether the GPU is powered down (check_hdmi_disabled()) and defer
      probing if so.
      
      However in the meantime (in v4.10) the driver core has gained a feature
      called device links which promises to solve such issues in a clean way:
      It allows us to declare a dependency from the HDA controller (consumer)
      to the GPU (supplier).  The PM core then automagically ensures that the
      GPU is runtime resumed as long as the HDA controller's ->probe hook is
      executed and whenever the HDA controller is accessed.
      
      By default, the HDA controller has a dependency on its parent, a PCIe
      Root Port.  Adding a device link creates another dependency on its
      sibling:
      
                                  PCIe Root Port
                                   ^          ^
                                   |          |
                                   |          |
                                  HDA  ===>  GPU
      
      The device link is not only used for runtime PM, it also guarantees that
      on system sleep, the HDA controller suspends before the GPU and resumes
      after the GPU, and on system shutdown the HDA controller's ->shutdown
      hook is executed before the one of the GPU.  It is a complete solution.
      
      Using this functionality is as simple as calling device_link_add(),
      which results in a dmesg entry like this:
      
              pci 0000:01:00.1: Linked as a consumer to 0000:01:00.0
      
      The code for the GPU-governed audio power management can thus be removed
      (except where it's still needed for legacy manual power control).
      
      The device link is added in a PCI quirk rather than in hda_intel.c.
      It is therefore legal for the GPU to runtime suspend to D3cold even if
      the HDA controller is not bound to a driver or if CONFIG_SND_HDA_INTEL
      is not enabled, for accesses to the HDA controller will cause the GPU to
      wake up regardless if they're occurring outside of hda_intel.c (think
      config space readout via sysfs).
      
      Contrary to the previous implementation, the HDA controller's power
      state is now self-governed, rather than GPU-governed, whereas the GPU's
      power state is no longer fully self-governed.  (The HDA controller needs
      to runtime suspend before the GPU can.)
      
      It is thus crucial that runtime PM is always activated on the HDA
      controller even if CONFIG_SND_HDA_POWER_SAVE_DEFAULT is set to 0 (which
      is the default), lest the GPU stays awake.  This is achieved by setting
      the auto_runtime_pm flag on every codec and the AZX_DCAPS_PM_RUNTIME
      flag on the HDA controller.
      
      A side effect is that power consumption might be reduced if the GPU is
      in use but the HDA controller is not, because the HDA controller is now
      allowed to go to D3hot.  Before, it was forced to stay in D0 as long as
      the GPU was in use.  (There is no reduction in power consumption on my
      Nvidia GK107, but there might be on other chips.)
      
      The code paths for legacy manual power control are adjusted such that
      runtime PM is disabled during power off, thereby preventing the PM core
      from resuming the HDA controller.
      
      Note that the device link is not only added on vga_switcheroo capable
      systems, but for *any* GPU with integrated HDA controller.  The idea is
      that the HDA controller streams audio via connectors located on the GPU,
      so the GPU needs to be on for the HDA controller to do anything useful.
      
      This commit implicitly fixes an unbalanced runtime PM ref upon unbind of
      hda_intel.c:  On ->probe, a runtime PM ref was previously released under
      the condition "azx_has_pm_runtime(chip) || hda->use_vga_switcheroo", but
      on ->remove a runtime PM ref was only acquired under the first of those
      conditions.  Thus, binding and unbinding the driver twice on a
      vga_switcheroo capable system caused the runtime PM refcount to drop
      below zero.  The issue is resolved because the AZX_DCAPS_PM_RUNTIME flag
      is now always set if use_vga_switcheroo is true.
      
      For more information on device links please refer to:
      https://www.kernel.org/doc/html/latest/driver-api/device_link.html
      Documentation/driver-api/device_link.rst
      
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Reviewed-by: NPeter Wu <peter@lekensteyn.nl>
      Tested-by: Kai Heng Feng <kai.heng.feng@canonical.com> # AMD PowerXpress
      Tested-by: Mike Lothian <mike@fireburn.co.uk>          # AMD PowerXpress
      Tested-by: Denis Lisov <dennis.lissov@gmail.com>       # Nvidia Optimus
      Tested-by: Peter Wu <peter@lekensteyn.nl>              # Nvidia Optimus
      Tested-by: Lukas Wunner <lukas@wunner.de>              # MacBook Pro
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/51bd38360ff502a8c42b1ebf4405ee1d3f27118d.1520068884.git.lukas@wunner.de
      07f4f97d
  8. 13 3月, 2018 1 次提交
  9. 12 3月, 2018 1 次提交
    • T
      ALSA: hda - Revert power_save option default value · 40088dc4
      Takashi Iwai 提交于
      With the commit 1ba8f9d3 ("ALSA: hda: Add a power_save
      blacklist"), we changed the default value of power_save option to -1
      for processing the power-save blacklist.
      Unfortunately, this seems breaking user-space applications that
      actually read the power_save parameter value via sysfs and judge /
      adjust the power-saving status.  They see the value -1 as if the
      power-save is turned off, although the actual value is taken from
      CONFIG_SND_HDA_POWER_SAVE_DEFAULT and it can be a positive.
      
      So, overall, passing -1 there was no good idea.  Let's partially
      revert it -- at least for power_save option default value is restored
      again to CONFIG_SND_HDA_POWER_SAVE_DEFAULT.  Meanwhile, in this patch,
      we keep the blacklist behavior and make is adjustable via the new
      option, pm_blacklist.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199073
      Fixes: 1ba8f9d3 ("ALSA: hda: Add a power_save blacklist")
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      40088dc4
  10. 09 3月, 2018 2 次提交
  11. 08 3月, 2018 1 次提交
  12. 06 3月, 2018 4 次提交
  13. 02 3月, 2018 1 次提交
  14. 26 2月, 2018 1 次提交
    • T
      ALSA: hda - Fix pincfg at resume on Lenovo T470 dock · 71db96dd
      Takashi Iwai 提交于
      We've added a quirk to enable the recent Lenovo dock support, where it
      overwrites the pin configs of NID 0x17 and 19, not only updating the
      pin config cache.  It works right after the boot, but the problem is
      that the pin configs are occasionally cleared when the machine goes to
      PM.  Meanwhile the quirk writes the pin configs only at the pre-probe,
      so this won't be applied any longer.
      
      For addressing that issue, this patch moves the code to overwrite the
      pin configs into HDA_FIXUP_ACT_INIT section so that it's always
      applied at both probe and resume time.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195161
      Fixes: 61fcf8ec ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      71db96dd
  15. 24 2月, 2018 1 次提交
    • H
      ALSA: hda: Add a power_save blacklist · 1ba8f9d3
      Hans de Goede 提交于
      On some boards setting power_save to a non 0 value leads to clicking /
      popping sounds when ever we enter/leave powersaving mode. Ideally we would
      figure out how to avoid these sounds, but that is not always feasible.
      
      This commit adds a blacklist for devices where powersaving is known to
      cause problems and disables it on these devices.
      
      Note I tried to put this blacklist in userspace first:
      https://github.com/systemd/systemd/pull/8128
      
      But the systemd maintainers rightfully pointed out that it would be
      impossible to then later remove entries once we actually find a way to
      make power-saving work on listed boards without issues. Having this list
      in the kernel will allow removal of the blacklist entry in the same commit
      which fixes the clicks / plops.
      
      The blacklist only applies to the default power_save module-option value,
      if a user explicitly sets the module-option then the blacklist is not
      used.
      
      [ added an ifdef CONFIG_PM for the build error -- tiwai]
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=198611
      Cc: stable@vger.kernel.org
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1ba8f9d3
  16. 20 2月, 2018 1 次提交
  17. 14 2月, 2018 1 次提交
    • J
      ALSA: hda/realtek: PCI quirk for Fujitsu U7x7 · fdcc968a
      Jan-Marek Glogowski 提交于
      These laptops have a combined jack to attach headsets, the U727 on
      the left, the U757 on the right, but a headsets microphone doesn't
      work. Using hdajacksensetest I found that pin 0x19 changed the
      present state when plugging the headset, in addition to 0x21, but
      didn't have the correct configuration (shown as "Not connected").
      
      So this sets the configuration to the same values as the headphone
      pin 0x21 except for the device type microphone, which makes it
      work correctly. With the patch the configured pins for U727 are
      
      Pin 0x12 (Internal Mic, Mobile-In): present = No
      Pin 0x14 (Internal Speaker): present = No
      Pin 0x19 (Black Mic, Left side): present = No
      Pin 0x1d (Internal Aux): present = No
      Pin 0x21 (Black Headphone, Left side): present = No
      Signed-off-by: NJan-Marek Glogowski <glogow@fbihome.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fdcc968a
  18. 12 2月, 2018 1 次提交
  19. 07 2月, 2018 3 次提交
  20. 19 1月, 2018 1 次提交
  21. 17 1月, 2018 2 次提交
  22. 16 1月, 2018 1 次提交
    • T
      ALSA: hda - Use IS_REACHABLE() for dependency on input · c469652b
      Takashi Iwai 提交于
      The commit ffcd28d8 ("ALSA: hda - Select INPUT for Realtek
      HD-audio codec") introduced the reverse-selection of CONFIG_INPUT for
      Realtek codec in order to avoid the mess with dependency between
      built-in and modules.  Later on, we obtained IS_REACHABLE() macro
      exactly for this kind of problems, and now we can remove th INPUT
      selection in Kconfig and put IS_REACHABLE(INPUT) to the appropriate
      places in the code, so that the driver doesn't need to select other
      subsystem forcibly.
      
      Fixes: ffcd28d8 ("ALSA: hda - Select INPUT for Realtek HD-audio codec")
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # and build-tested
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c469652b
  23. 10 1月, 2018 2 次提交
  24. 08 1月, 2018 1 次提交
  25. 27 12月, 2017 2 次提交
  26. 22 12月, 2017 3 次提交
  27. 18 12月, 2017 1 次提交
    • K
      ALSA: hda/realtek - Fix Dell AIO LineOut issue · 92266651
      Kailang Yang 提交于
      Dell AIO had LineOut jack.
      Add LineOut verb into this patch.
      
      [ Additional notes:
        the ALC274 codec seems requiring the fixed pin / DAC connections for
        HP / line-out pins for enabling EQ for speakers; i.e. the HP / LO
        pins expect to be connected with NID 0x03 while keeping the speaker
        with NID 0x02.  However, by adding a new line-out pin, the
        auto-parser assigns the NID 0x02 for HP/LO pins as primary outputs.
        As an easy workaround, we provide the preferred_pairs[] to map
        forcibly for these pins. -- tiwai ]
      
      Fixes: 75ee94b2 ("ALSA: hda - fix headset mic problem for Dell machines with alc274")
      Signed-off-by: NKailang Yang <kailang@realtek.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      92266651