1. 29 6月, 2016 1 次提交
  2. 09 6月, 2016 1 次提交
  3. 26 4月, 2016 1 次提交
    • T
      ALSA: hda - Update BCLK also at hotplug for i915 HSW/BDW · bb03ed21
      Takashi Iwai 提交于
      The recent bug report suggests that BCLK setup for i915 HSW/BDW needs
      to be updated at each HDMI hotplug, not only at initialization and
      resume.  That is, we need to update HSW_EM4 and HSW_EM5 registers at
      ELD notification, too.  Otherwise the HDMI audio may be out of sync
      and played in a wrong pitch.
      
      However, the HDA codec driver has no access to the controller
      registers, and currently the code managing these registers is in
      hda_intel.c, i.e. local to the controller driver.  For allowing the
      explicit BCLK update from the codec driver, as in this patch, the
      former haswell_set_bclk() in hda_intel.c is moved to hdac_i915.c and
      exposed as snd_hdac_i915_set_bclk().  This is called from both the HDA
      controller driver and intel_pin_eld_notify() in HDMI codec driver.
      
      Along with this change, snd_hdac_get_display_clk() gets dropped as
      it's no longer used.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91410
      Cc: <stable@vger.kernel.org> # v4.5+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bb03ed21
  4. 20 4月, 2016 1 次提交
  5. 31 3月, 2016 1 次提交
  6. 27 2月, 2016 1 次提交
    • V
      ALSA: hda - Autosuspend controller after probe even if codecs are already suspended · 30ff5957
      Ville Syrjälä 提交于
      azx_probe_continue() uses pm_runtime_put_noidle() to drop the rpm
      usage_count, which means that if it's the last reference the
      autosuspend of the controller won't actually happen. So if the codecs
      autosuspend before the azx_probe_continue() drops the last
      reference we'll fail to autosuspend the controller. This does happen
      in practice, but not every time. As can be seen in [1] the controller
      autosuspend attempt fails due to the usage_count when suspending the
      codecs. A bit later we see the the contoller usage_count dropping to
      zero without further attempts at autosuspend.
      
      Fix the problem by using pm_runtime_put_autosuspend() instead, which
      will kick off the autosuspend of the controller even if the codecs
      are already asleep. As can be seen in [2] the controller autosuspend
      still fails while suspending the codecs, but later on we see another
      autosuspend attempt after dropping the usage_count to 0.
      
      I was also a bit worried that there might still be a race between the
      controller autosuspend and the rest of the code in azx_probe_continue().
      So I also tried replacing the the put_noidle() with put_sync_suspend().
      No explosions occurred, so I'm somewhat satisfied that there are no
      serious problems in this area.
      
      [1]
       kworker/1:2-122   [001] ....    63.661310: __pm_runtime_suspend: hdaudioC0D0 usage_count 0
       kworker/1:2-122   [001] d..2    63.661316: rpm_suspend: hdaudioC0D0 flags-d cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/1:2-122   [001] d..1    63.661317: rpm_check_suspend_allowed: hdaudioC0D0 retval 0
       kworker/1:2-122   [001] d..2    63.661332: rpm_return_int: rpm_suspend+0x406/0x5e8:hdaudioC0D0 ret=0
       kworker/1:1-72    [001] d..2    63.661543: rpm_suspend: hdaudioC0D0 flags-a cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/1:1-72    [001] d..1    63.661544: rpm_check_suspend_allowed: hdaudioC0D0 retval 0
       kworker/1:1-72    [001] ....    63.661545: hda_codec_runtime_suspend: hdaudioC0D0 suspend
       kworker/1:1-72    [001] d..2    63.661614: rpm_idle: 0000:00:03.0 flags-1 cnt-1  dep-0  auto-1 p-0 irq-0 child-0
       kworker/1:1-72    [001] d..1    63.661615: rpm_check_suspend_allowed: 0000:00:03.0 usage_count 1
       kworker/1:1-72    [001] d..1    63.661615: rpm_check_suspend_allowed: 0000:00:03.0 retval -11
       kworker/1:1-72    [001] d..2    63.661616: rpm_return_int: rpm_idle+0x249/0x487:0000:00:03.0 ret=-11
       kworker/1:1-72    [001] d..2    63.661616: rpm_return_int: rpm_suspend+0x406/0x5e8:hdaudioC0D0 ret=0
       kworker/1:2-122   [001] d..2    63.664834: rpm_idle: hdaudioC0D0 flags-8 cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/1:2-122   [001] d..1    63.664835: rpm_check_suspend_allowed: hdaudioC0D0 retval 1
       kworker/1:2-122   [001] d..2    63.664836: rpm_return_int: rpm_idle+0x249/0x487:hdaudioC0D0 ret=-11
       kworker/1:2-122   [001] d..2    63.664841: rpm_idle: hdaudioC0D0 flags-8 cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/1:2-122   [001] d..1    63.664841: rpm_check_suspend_allowed: hdaudioC0D0 retval 1
       kworker/1:2-122   [001] d..2    63.664841: rpm_return_int: rpm_idle+0x249/0x487:hdaudioC0D0 ret=-11
       kworker/1:2-122   [001] ....    63.664842: azx_probe_continue: 0000:00:03.0 usage_count=0
      
      [2]
       kworker/0:0-4     [000] ....    50.354567: __pm_runtime_suspend: hdaudioC0D0 usage_count 0
       kworker/0:0-4     [000] d..2    50.354574: rpm_suspend: hdaudioC0D0 flags-d cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/0:0-4     [000] d..1    50.354575: rpm_check_suspend_allowed: hdaudioC0D0 retval 0
       kworker/0:0-4     [000] d..2    50.354589: rpm_return_int: rpm_suspend+0x406/0x5e8:hdaudioC0D0 ret=0
       kworker/0:2-135   [000] d..2    50.354809: rpm_suspend: hdaudioC0D0 flags-a cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/0:2-135   [000] d..1    50.354810: rpm_check_suspend_allowed: hdaudioC0D0 retval 0
       kworker/0:2-135   [000] ....    50.354816: hda_codec_runtime_suspend: hdaudioC0D0 suspend
       kworker/0:2-135   [000] d..2    50.354908: rpm_idle: 0000:00:03.0 flags-1 cnt-1  dep-0  auto-1 p-0 irq-0 child-0
       kworker/0:2-135   [000] d..1    50.354909: rpm_check_suspend_allowed: 0000:00:03.0 usage_count 1
       kworker/0:2-135   [000] d..1    50.354909: rpm_check_suspend_allowed: 0000:00:03.0 retval -11
       kworker/0:2-135   [000] d..2    50.354909: rpm_return_int: rpm_idle+0x249/0x487:0000:00:03.0 ret=-11
       kworker/0:2-135   [000] d..2    50.354910: rpm_return_int: rpm_suspend+0x406/0x5e8:hdaudioC0D0 ret=0
       kworker/0:0-4     [000] d..2    50.373791: rpm_idle: hdaudioC0D0 flags-8 cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/0:0-4     [000] d..1    50.373792: rpm_check_suspend_allowed: hdaudioC0D0 retval 1
       kworker/0:0-4     [000] d..2    50.373793: rpm_return_int: rpm_idle+0x249/0x487:hdaudioC0D0 ret=-11
       kworker/0:0-4     [000] d..2    50.373797: rpm_idle: hdaudioC0D0 flags-8 cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/0:0-4     [000] d..1    50.373798: rpm_check_suspend_allowed: hdaudioC0D0 retval 1
       kworker/0:0-4     [000] d..2    50.373798: rpm_return_int: rpm_idle+0x249/0x487:hdaudioC0D0 ret=-11
       kworker/0:0-4     [000] ....    50.373799: __pm_runtime_suspend: 0000:00:03.0 usage_count 0
       kworker/0:0-4     [000] d..2    50.373800: rpm_suspend: 0000:00:03.0 flags-d cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/0:0-4     [000] d..1    50.373800: rpm_check_suspend_allowed: 0000:00:03.0 retval 0
       kworker/0:0-4     [000] d..2    50.373803: rpm_return_int: rpm_suspend+0x406/0x5e8:0000:00:03.0 ret=0
       kworker/0:0-4     [000] d..2    50.385164: rpm_suspend: 0000:00:03.0 flags-a cnt-0  dep-0  auto-1 p-0 irq-0 child-0
       kworker/0:0-4     [000] d..1    50.385165: rpm_check_suspend_allowed: 0000:00:03.0 retval 0
       kworker/0:0-4     [000] ....    50.385174: azx_runtime_suspend: 0000:00:03.0 azx suspend releaseing power well
       kworker/0:0-4     [000] ....    50.385179: azx_runtime_suspend: 0000:00:03.0 azx suspend
       kworker/0:0-4     [000] d..2    50.386872: rpm_return_int: rpm_suspend+0x406/0x5e8:0000:00:03.0 ret=0
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      30ff5957
  7. 23 2月, 2016 1 次提交
    • T
      ALSA: hda - Apply clock gate workaround to Skylake, too · 7e31a015
      Takashi Iwai 提交于
      Some Skylake machines show the codec probe errors in certain
      situations, e.g. HP Z240 desktop fails to probe the onboard Realtek
      codec at reloading the snd-hda-intel module like:
        snd_hda_intel 0000:00:1f.3: spurious response 0x200:0x2, last cmd=0x000000
        snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to polling mode: lastcmd=0x000f0000
        snd_hda_intel 0000:00:1f.3: No response from codec, disabling MSI: last cmd=0x000f0000
        snd_hda_intel 0000:00:1f.3: Codec #0 probe error; disabling it...
        hdaudio hdaudioC0D2: no AFG or MFG node found
        snd_hda_intel 0000:00:1f.3: no codecs initialized
      
      Also, HP G470 G3 suffers from the similar problem, as reported in
      bugzilla below.  On this machine, the codec probe error appears even
      at a fresh boot.
      
      As Libin suggested, the same workaround used for Broxton in the commit
      [6639484d: ALSA: hda - disable dynamic clock gating on Broxton
       before reset] can be applied for Skylake in order to fix this problem.
      The Intel HW team also confirmed that this is needed for SKL.
      
      This patch makes the workaround applied to both SKL and BXT
      platforms.  The referred macros are moved and one superfluous macro
      (IS_BROXTON()) is another one (IS_BXT()) as well.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112731Suggested-by: NLibin Yang <libin.yang@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.4+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7e31a015
  8. 15 2月, 2016 1 次提交
    • T
      ALSA: hda - Cancel probe work instead of flush at remove · 0b8c8219
      Takashi Iwai 提交于
      The commit [991f86d7: ALSA: hda - Flush the pending probe work at
      remove] introduced the sync of async probe work at remove for fixing
      the race.  However, this may lead to another hangup when the module
      removal is performed quickly before starting the probe work, because
      it issues flush_work() and it's blocked forever.
      
      The workaround is to use cancel_work_sync() instead of flush_work()
      there.
      
      Fixes: 991f86d7 ('ALSA: hda - Flush the pending probe work at remove')
      Cc: <stable@vger.kernel.org> # v3.17+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0b8c8219
  9. 29 1月, 2016 1 次提交
  10. 21 1月, 2016 1 次提交
  11. 20 1月, 2016 1 次提交
    • T
      ALSA: hda - Degrade i915 binding failure message · bed2e98e
      Takashi Iwai 提交于
      Currently HD-audio driver on Intel Skylake or Broxteon gives an error
      message when binding with i915 audio component fails.  However, this
      isn't any serious error on a system without Intel graphics.  Indeed
      there are such systems, where a third-party codec (e.g. Creative) is
      put on the mobo while using other discrete GPU (e.g. Nvidia).
      Printing a kernel "error" message is overreaction in such a case.
      
      This patch downgrades the print level for that message.  For systems
      that mandate the i915 binding (e.g. Haswell or Broadwell HDMI/DP),
      another kernel error message is shown in addition to make clear what
      went wrong.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111021Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bed2e98e
  12. 13 1月, 2016 1 次提交
    • H
      ALSA: hda_intel: add card number to irq description · de65360b
      Heiner Kallweit 提交于
      Currently the info in /proc/interrupts doesn't allow to figure out which
      interrupt belongs to which card (HDMI, PCH, ..).
      Therefore add card details to the interrupt description.
      With the patch the info in /proc/interrupts looks like this:
      
      PCI-MSI 442368-edge      snd_hda_intel:card1
      PCI-MSI 49152-edge      snd_hda_intel:card0
      
      NOTE: this patch adds the new irq_descr field snd_card struct that is
      filled automatically at a card object creation.  This can be used
      generically for other drivers as well.  The changes for others will
      follow later -- tiwai
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      de65360b
  13. 18 12月, 2015 1 次提交
    • X
      ALSA: hda - Set SKL+ hda controller power at freeze() and thaw() · 3e6db33a
      Xiong Zhang 提交于
      It takes three minutes to enter into hibernation on some OEM SKL
      machines and we see many codec spurious response after thaw() opertion.
      This is because HDA is still in D0 state after freeze() call and
      pci_pm_freeze/pci_pm_freeze_noirq() don't set D3 hot in pci_bus driver.
      It seems bios still access HDA when system enter into freeze state,
      HDA will receive codec response interrupt immediately after thaw() call.
      Because of this unexpected interrupt, HDA enter into a abnormal
      state and slow down the system enter into hibernation.
      
      In this patch, we put HDA into D3 hot state in azx_freeze_noirq() and
      put HDA into D0 state in azx_thaw_noirq().
      
      V2: Only apply this fix to SKL+
          Fix compile error when CONFIG_PM_SLEEP isn't defined
      
      [Yet another fix for CONFIG_PM_SLEEP ifdef and the additional comment
       by tiwai]
      Signed-off-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3e6db33a
  14. 17 12月, 2015 4 次提交
  15. 15 12月, 2015 2 次提交
    • T
      ALSA: hda - Increase default bdl_pos_adj for Baytrail/Braswell · 2cf721db
      Takashi Iwai 提交于
      Intel Atom processors seem to have a problem at recording when
      bdl_pos_adj is set to an odd value.  When a value like 1 is used, it
      may drop the samples unexpectedly.  Actually, for the old Atoms, we
      used to set AZX_DRIVER_SCH type, and this assigns 32 as default.
      Meanwhile the newer chips, Baytrail and Braswell, are set as
      AZX_DRIVER_PCH, and the lower default value, 1, is assigned.
      
      This patch changes the default values for these chipsets to a safer
      default, 32, again.  Since changing the driver type (AZX_DRIVER_XXX)
      leads to the rename of the driver string, it would result in a
      possible regression.  So, we can't change the type.  Instead, in this
      patch, manual (ugly) PCI ID checks are added on top.
      
      A drawback by this increase is the slight increase of the latency, but
      it's a sub-ms order in normal situations, so mostly negligible.
      Reported-and-tested-by: NJochen Henneberg <jh@henneberg-systemdesign.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2cf721db
    • T
      ALSA: hda - Clean up the code to check bdl_pos_adj option · 4f0189be
      Takashi Iwai 提交于
      Just a minor cleanup; instead of passing an array, pass the assigned
      bdl_pos_adj option value directory in struct azx.  Also split the code
      to get the default bdl_pos_adj value for the change that will follow
      after this.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4f0189be
  16. 10 12月, 2015 1 次提交
    • T
      ALSA: hda - Allow i915 binding later in codec driver · 55913110
      Takashi Iwai 提交于
      Due to the recent change, HDA controller driver for Intel PCH tries to
      bind i915 audio component always at the probe time no matter whether
      HDMI/DP codec is found.  This is, however, superflulous for old
      chipsets (e.g. on IVB) where they don't have always the HDMI/DP codecs
      but  often have only a discrete GPU instead.
      
      For the newer chipsets, we need already the i915 binding from the
      beginning due to power well control.  Meanwhile, for older chipsets
      where we don't need power well, we don't need the i915 binding at the
      controller level.
      
      This patch removes again the i915 binding in the HDA controller driver
      for old Intel PCHs, but adds the binding in HDMI/DP codec driver
      instead.  This allows still the use of the direct notification from
      the graphics driver while we can avoid the unnecessary load of i915
      driver for machines only with another GPU.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      55913110
  17. 09 12月, 2015 1 次提交
    • T
      ALSA: hda - Less grumbling about lack of i915 binding · 6ee8eeb4
      Takashi Iwai 提交于
      The recent commit [6603249d: ALSA: hda - Enable audio component
      for old Intel PCH devices] enabled the i915 binding for HDMI/DP on old
      Intel PCHs.  But many boards are without HDMI/DP, and they actually
      don't need i915 binding, and yet the driver has a check of i915
      binding and complains like
      	Haswell must be built with CONFIG_SND_HDA_I915
      This error is false-positive, and it should be put only for HSW/BDW,
      instead of all devices that may be bound with i915.
      
      This patch fixes the condition to check, as well as rephrasing the
      message specific to HSW/BDW HDMI/DP.
      
      Fixes: 6603249d ('ALSA: hda - Enable audio component for old Intel PCH devices')
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6ee8eeb4
  18. 07 12月, 2015 1 次提交
  19. 04 12月, 2015 1 次提交
    • T
      ALSA: hda - Enable audio component for old Intel PCH devices · 6603249d
      Takashi Iwai 提交于
      As i915 graphics driver provides the notification via audio component,
      not only the currently implemented HSW+ and VLV+ platforms but also
      all other PCH-based platforms (e.g. Cougar Point, Panther  Point, etc)
      can use this infrastructure.  It'll improve the reliability and the
      power consumption significantly, especially once when we implement the
      ELD notification via component.  As a preliminary, this patch enables
      the usage of audio component for all PCH platforms.
      
      The HDA controller just needs to set AZX_DCAPS_I915_POWERWELL flag
      appropriately.  The name of the flag is a bit confusing, but this
      actually works even on the chips without the powerwell but accesses
      only the other component ops.
      
      In the HDMI/DP codec driver side, we just need to register/unregister
      the notifier for such chips.  This can be identified by checking the
      audio_component field in the assigned hdac_bus.
      
      One caveat is that PCH for Haswell and Broadwell must not be bound
      with i915 audio component, as there are dedicated HD-audio HDMI
      controllers on these platforms.  Ditto for Poulsbo and Oaktrail as
      they use gma500 graphics, not i915.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6603249d
  20. 19 11月, 2015 1 次提交
  21. 05 11月, 2015 1 次提交
  22. 27 10月, 2015 1 次提交
    • T
      ALSA: hda - Disable 64bit address for Creative HDA controllers · cadd16ea
      Takashi Iwai 提交于
      We've had many reports that some Creative sound cards with CA0132
      don't work well.  Some reported that it starts working after reloading
      the module, while some reported it starts working when a 32bit kernel
      is used.  All these facts seem implying that the chip fails to
      communicate when the buffer is located in 64bit address.
      
      This patch addresses these issues by just adding AZX_DCAPS_NO_64BIT
      flag to the corresponding PCI entries.  I casually had a chance to
      test an SB Recon3D board, and indeed this seems helping.
      
      Although this hasn't been tested on all Creative devices, it's safer
      to assume that this restriction applies to the rest of them, too.  So
      the flag is applied to all Creative entries.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      cadd16ea
  23. 19 10月, 2015 1 次提交
  24. 25 9月, 2015 1 次提交
    • L
      vga_switcheroo: Set active attribute to false for audio clients · 21b45676
      Lukas Wunner 提交于
      The active attribute in struct vga_switcheroo_client denotes whether
      the outputs are currently switched to this client. The attribute is
      only meaningful for vga clients. It is never used for audio clients.
      
      The function vga_switcheroo_register_audio_client() misuses this
      attribute to store whether the audio device is fully initialized.
      Most likely there was a misunderstanding about the meaning of
      "active" when this was added.
      
      Comment from Takashi's review:
      
      "Not really.  The full initialization of audio was meant that the audio
      is active indeed.  Admittedly, though, the active flag for each audio
      client doesn't play any role because the audio always follows the gfx
      state changes, and the value passed there doesn't reflect the actual
      state due to the later change.  So, I agree with the removal of the
      flag itself -- or let the audio active flag following the
      corresponding gfx flag.  The latter will make the proc output more
      consistent while the former is certainly more reduction of code."
      
      Set the active attribute to false for audio clients. Remove the
      active parameter from vga_switcheroo_register_audio_client() and
      its sole caller, hda_intel.c:register_vga_switcheroo().
      
      vga_switcheroo_register_audio_client() was introduced by 3e9e63db
      ("vga_switcheroo: Add the support for audio clients"). Its use in
      hda_intel.c was introduced by a82d51ed ("ALSA: hda - Support
      VGA-switcheroo").
      
      v1.1: The changes above imply that in find_active_client() the call
      to client_is_vga() is now superfluous. Drop it.
      
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      [danvet: Add Takashi's clarification to the commit message.]
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      21b45676
  25. 30 7月, 2015 1 次提交
  26. 20 7月, 2015 2 次提交
  27. 25 6月, 2015 1 次提交
  28. 16 6月, 2015 1 次提交
  29. 12 6月, 2015 1 次提交
    • T
      ALSA: hda - Abort the probe without i915 binding for HSW/BDW · 535115b5
      Takashi Iwai 提交于
      The previous patch tried to continue the probe if i915 binding fails.
      For for simplicity reason, we haven't implemented abort even for
      controller chips that are dedicated for HDMI/DP on HSW and BDW.
      However, Mengdong suggested that this can be dangerous; BIOS may
      disable gfx power well although the PCI entry for HD-audio is left,
      and this may result in the unexpected behavior, kernel errors, etc.
      
      For avoiding this situation, abort the probe at i915 binding failure
      only for HSW/BDW chips selectively.  For other chips, it still
      continues.
      
      Fixes: bf06848b ('ALSA: hda - Continue probing even if i915 binding fails')
      Reported-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      535115b5
  30. 11 6月, 2015 1 次提交
    • T
      ALSA: hda - Continue probing even if i915 binding fails · bf06848b
      Takashi Iwai 提交于
      Currently snd-hda-intel driver aborts the probing of Intel HD-audio
      controller with i915 power well management when binding with i915
      driver via hda_i915_init() fails.  This is no big problem for Haswell
      and Broadwell where the HD-audio controllers are dedicated to
      HDMI/DP, thus i915 link is mandatory.  However, Skylake, Baytrail and
      Braswell have only one controller and both HDMI/DP and analog codecs
      share the same bus.  Thus, even if HDMI/DP isn't usable, we should
      keep the controller working for other codecs.
      
      For fixing this, this patch simply allows continuing the probing even
      if hda_i915_init() call fails.  This may leave stale sound components
      for HDMI/DP devices that are unbound with graphics.  We could abort
      the probing selectively, but from the code simplicity POV, it's better
      to continue in all cases.
      Reported-by: NLibin Yang <libin.yang@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bf06848b
  31. 03 6月, 2015 1 次提交
  32. 28 5月, 2015 1 次提交
    • L
      kernel/params: constify struct kernel_param_ops uses · 9c27847d
      Luis R. Rodriguez 提交于
      Most code already uses consts for the struct kernel_param_ops,
      sweep the kernel for the last offending stragglers. Other than
      include/linux/moduleparam.h and kernel/params.c all other changes
      were generated with the following Coccinelle SmPL patch. Merge
      conflicts between trees can be handled with Coccinelle.
      
      In the future git could get Coccinelle merge support to deal with
      patch --> fail --> grammar --> Coccinelle --> new patch conflicts
      automatically for us on patches where the grammar is available and
      the patch is of high confidence. Consider this a feature request.
      
      Test compiled on x86_64 against:
      
      	* allnoconfig
      	* allmodconfig
      	* allyesconfig
      
      @ const_found @
      identifier ops;
      @@
      
      const struct kernel_param_ops ops = {
      };
      
      @ const_not_found depends on !const_found @
      identifier ops;
      @@
      
      -struct kernel_param_ops ops = {
      +const struct kernel_param_ops ops = {
      };
      
      Generated-by: Coccinelle SmPL
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Junio C Hamano <gitster@pobox.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9c27847d
  33. 27 5月, 2015 1 次提交
  34. 20 5月, 2015 1 次提交
    • M
      ALSA: hda - Move hda_i915.c from sound/pci/hda to sound/hda · 98d8fc6c
      Mengdong Lin 提交于
      The file is moved to hda core and renamed to hdac_i915.c, so can be used
      by both legacy HDA driver and new Skylake audio driver.
      
      - Add snd_hdac_ prefix to the public APIs.
      - The i915 audio component is moved to core bus and dynamically allocated.
      - A static pointer hdac_acomp is used to help bind/unbind callbacks to get
        this component, because the sound card's private_data is used by the azx
        chip pointer, which is a legacy structure. It could be removed if private
        _data changes to some core structure which can be extended to find the
        bus.
      - snd_hdac_get_display_clk() is added to get the display core clock for
        HSW/BDW.
      - haswell_set_bclk() is moved to hda_intel.c because it needs to write the
        controller registers EM4/EM5, and only legacy HD-A needs it for HSW/BDW.
      - Move definition of HSW/BDW-specific registers EM4/EM5 to hda_register.h
        and rename them to HSW_EM4/HSW_EM5, because other HD-A controllers have
        different layout for the extended mode registers.
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      98d8fc6c
  35. 18 5月, 2015 1 次提交