1. 24 Apr, 2018 1 commit
  2. 12 Feb, 2018 1 commit
  3. 22 Dec, 2017 1 commit
    • Takashi Iwai's avatar
      ALSA: hda: Drop useless WARN_ON() · a36c2638
      Takashi Iwai authored
      Since the commit 97cc2ed2 ("ALSA: hda - Fix yet another i915
      pointer leftover in error path") cleared hdac_acomp pointer, the
      WARN_ON() non-NULL check in snd_hdac_i915_register_notifier() may give
      a false-positive warning, as the function gets called no matter
      whether the component is registered or not.  For fixing it, let's get
      rid of the spurious WARN_ON().
      
      Fixes: 97cc2ed2 ("ALSA: hda - Fix yet another i915 pointer leftover in error path")
      Cc: <stable@vger.kernel.org>
      Reported-by: 's avatarKouta Okamoto <kouta.okamoto@toshiba.co.jp>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      a36c2638
  4. 01 Dec, 2017 1 commit
  5. 17 Nov, 2017 1 commit
    • Takashi Iwai's avatar
      ALSA: hda: Fix too short HDMI/DP chmap reporting · c2432466
      Takashi Iwai authored
      We got a regression report about the HD-audio HDMI chmap, where some
      surround channels are reported as UNKNOWN.  The git bisection pointed
      the culprit at the commit 9b3dc8aa ("ALSA: hda - Register chmap
      obj as priv data instead of codec").  The story behind scene is like
      this:
      
      - While moving the code out of the legacy HDA to the HDA common place,
        the patch modifies the code to obtain the chmap array indirectly in
        a byte array, and it expands it to kctl value array.
      - At the latter operation, the size of the array is wrongly passed by
        sizeof() to the pointer.
      - It can be 4 on 32bit arch, thus too short for 6+ channels.
        (And that's the reason why it didn't hit other persons; it's 8 on
        64bit arch, thus it's usually enough.)
      
      The code was further changed meanwhile, but the problem persisted.
      Let's fix it by correctly evaluating the array size.
      
      Fixes: 9b3dc8aa ("ALSA: hda - Register chmap obj as priv data instead of codec")
      Reported-by: 's avatarVDR User <user.vdr@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      c2432466
  6. 02 Nov, 2017 1 commit
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: 's avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: 's avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: 's avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  7. 24 Oct, 2017 1 commit
  8. 19 Oct, 2017 1 commit
    • Takashi Iwai's avatar
      ALSA: hda: Avoid racy recreation of widget kobjects · 9780ded3
      Takashi Iwai authored
      The refresh of HD-audio widget sysfs kobjects via
      snd_hdac_refresh_widget_sysfs() is slightly racy.
      The driver recreates the whole tree from scratch after deleting the
      whole.  When CONFIG_DEBUG_KOBJECT_RELEASE option is used, kobject
      release doesn't happen immediately but delayed, while the re-creation
      of the same named kobject happens soon after invoking kobject_put().
      This may end up with the conflicts of duplicated kobjects, as found in
      the bug report below.
      
      In this patch, we take another approach to refresh the tree: instead
      of recreating the whole tree, just add the new nodes and delete the
      non-existing nodes.  Since the refresh happens only once at
      initialization, no longer race would happen.
      
      Along with the code change, merge snd_hdac_refresh_widget_sysfs() with
      the existing snd_hdac_refresh_widgets() with an additional bool flag
      for simplifying the code.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197307Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      9780ded3
  9. 18 Oct, 2017 1 commit
    • Takashi Iwai's avatar
      ALSA: hda: Abort capability probe at invalid register read · 098a0a62
      Takashi Iwai authored
      The loop in snd_hdac_bus_parse_capabilities() may go to nirvana when
      it hits an invalid register value read:
      
       BUG: unable to handle kernel paging request at ffffad5dc41f3fff
       IP: pci_azx_readl+0x5/0x10 [snd_hda_intel]
       Call Trace:
        snd_hdac_bus_parse_capabilities+0x3c/0x1f0 [snd_hda_core]
        azx_probe_continue+0x7d5/0x940 [snd_hda_intel]
        .....
      
      This happened on a new Intel machine, and we need to check the value
      and abort the loop accordingly.
      
      [Note: the fixes tag below indicates only the commit where this patch
       can be applied; the original problem was introduced even before that
       commit]
      
      Fixes: 6720b384 ("ALSA: hda - move bus_parse_capabilities to core")
      Cc: <stable@vger.kernel.org>
      Acked-by: 's avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      098a0a62
  10. 18 Jul, 2017 1 commit
    • Arvind Yadav's avatar
      ALSA: hda: constify pci_device_id. · 6c5a2660
      Arvind Yadav authored
      pci_device_id are not supposed to change at runtime. All functions
      working with pci_device_id provided by <linux/pci.h> work with
      const pci_device_id. So mark the non-const structs as const.
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         2610	    304	      8	   2922	    b6a	sound/hda/hdac_i915.o
      
      File size After adding 'const':
         text	   data	    bss	    dec	    hex	filename
         2674	    240	      8	   2922	    b6a	sound/hda/hdac_i915.o
      Signed-off-by: 's avatarArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      6c5a2660
  11. 20 Jun, 2017 1 commit
  12. 10 May, 2017 1 commit
    • Jeeja KP's avatar
      ALSA: hda: Fix cpu lockup when stopping the cmd dmas · 96001376
      Jeeja KP authored
      Using jiffies in hdac_wait_for_cmd_dmas() to determine when to time out
      when interrupts are off (snd_hdac_bus_stop_cmd_io()/spin_lock_irq())
      causes hard lockup so unlock while waiting using jiffies.
      
      ---<-snip->---
      <0>[ 1211.603046] NMI watchdog: Watchdog detected hard LOCKUP on cpu 3
      <4>[ 1211.603047] Modules linked in: snd_hda_intel i915 vgem
      <4>[ 1211.603053] irq event stamp: 13366
      <4>[ 1211.603053] hardirqs last  enabled at (13365):
      ...
      <4>[ 1211.603059] Call Trace:
      <4>[ 1211.603059]  ? delay_tsc+0x3d/0xc0
      <4>[ 1211.603059]  __delay+0xa/0x10
      <4>[ 1211.603060]  __const_udelay+0x31/0x40
      <4>[ 1211.603060]  snd_hdac_bus_stop_cmd_io+0x96/0xe0 [snd_hda_core]
      <4>[ 1211.603060]  ? azx_dev_disconnect+0x20/0x20 [snd_hda_intel]
      <4>[ 1211.603061]  snd_hdac_bus_stop_chip+0xb1/0x100 [snd_hda_core]
      <4>[ 1211.603061]  azx_stop_chip+0x9/0x10 [snd_hda_codec]
      <4>[ 1211.603061]  azx_suspend+0x72/0x220 [snd_hda_intel]
      <4>[ 1211.603061]  pci_pm_suspend+0x71/0x140
      <4>[ 1211.603062]  dpm_run_callback+0x6f/0x330
      <4>[ 1211.603062]  ? pci_pm_freeze+0xe0/0xe0
      <4>[ 1211.603062]  __device_suspend+0xf9/0x370
      <4>[ 1211.603062]  ? dpm_watchdog_set+0x60/0x60
      <4>[ 1211.603063]  async_suspend+0x1a/0x90
      <4>[ 1211.603063]  async_run_entry_fn+0x34/0x160
      <4>[ 1211.603063]  process_one_work+0x1f4/0x6d0
      <4>[ 1211.603063]  ? process_one_work+0x16e/0x6d0
      <4>[ 1211.603064]  worker_thread+0x49/0x4a0
      <4>[ 1211.603064]  kthread+0x107/0x140
      <4>[ 1211.603064]  ? process_one_work+0x6d0/0x6d0
      <4>[ 1211.603065]  ? kthread_create_on_node+0x40/0x40
      <4>[ 1211.603065]  ret_from_fork+0x2e/0x40
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100419
      Fixes: 38b19ed7 ("ALSA: hda: fix to wait for RIRB & CORB DMA to set")
      Reported-by: 's avatarMarta Lofstedt <marta.lofstedt@intel.com>
      Suggested-by: 's avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: 's avatarJeeja KP <jeeja.kp@intel.com>
      Acked-by: 's avatarVinod Koul <vinod.koul@intel.com>
      CC: stable <stable@vger.kernel.org> # 4.7
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      96001376
  13. 07 Apr, 2017 1 commit
  14. 03 Apr, 2017 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Avoid tricky macros · 2c1f8138
      Takashi Iwai authored
      The macros _snd_hdac_chip_read() and *_write() expand to different
      types (b,w,l) per their argument.  They were thought to be used only
      internally for other snd_hdac_chip_*() macros, but in some situations
      we need to call these directly, and they are way too ugly.
      
      Instead of saving a few lines, we just write these macros explicitly
      with the types, so that they can be used in a saner way.
      Acked-by: 's avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      2c1f8138
  15. 29 Mar, 2017 1 commit
  16. 06 Jan, 2017 1 commit
  17. 25 Dec, 2016 1 commit
  18. 22 Sep, 2016 1 commit
    • Pandiyan, Dhinakaran's avatar
      drm/i915/dp: DP audio API changes for MST · f9318941
      Pandiyan, Dhinakaran authored
      DP MST provides the capability to send multiple video and audio streams
      through a single port. This requires the API's between i915 and audio
      drivers to distinguish between multiple audio capable displays that can be
      connected to a port. Currently only the port identity is shared in the
      APIs. This patch adds support for MST with an additional parameter
      'int pipe'. The existing parameter 'port' does not change it's meaning.
      
      pipe =
      	MST	: display pipe that the stream originates from
      	Non-MST	: -1
      
      Affected APIs:
      struct i915_audio_component_ops
      -       int (*sync_audio_rate)(struct device *, int port, int rate);
      +	int (*sync_audio_rate)(struct device *, int port, int pipe,
      +	     int rate);
      
      -       int (*get_eld)(struct device *, int port, bool *enabled,
      -                       unsigned char *buf, int max_bytes);
      +       int (*get_eld)(struct device *, int port, int pipe,
      +		       bool *enabled, unsigned char *buf, int max_bytes);
      
      struct i915_audio_component_audio_ops
      -       void (*pin_eld_notify)(void *audio_ptr, int port);
      +       void (*pin_eld_notify)(void *audio_ptr, int port, int pipe);
      
      This patch makes dummy changes in the audio drivers (thanks Libin) for
      build to succeed. The audio side drivers will send the right 'pipe' values
      for MST in patches that will follow.
      
      v2:
      Renamed the new API parameter from 'dev_id' to 'pipe'. (Jim, Ville)
      Included Asoc driver API compatibility changes from Jeeja.
      Added WARN_ON() for invalid pipe in get_saved_encoder(). (Takashi)
      Added comment for av_enc_map[] definition. (Takashi)
      
      v3:
      Fixed logic error introduced while renaming 'dev_id' as 'pipe' (Ville)
      Renamed get_saved_encoder() to get_saved_enc() to reduce line length
      
      v4:
      Rebased.
      Parameter check for pipe < -1 values in get_saved_enc() (Ville)
      Switched to for_each_pipe() in get_saved_enc() (Ville)
      Renamed 'pipe' to 'dev_id' in audio side code (Takashi)
      
      v5:
      Included a comment for the dev_id arg. (Libin)
      Signed-off-by: 's avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: 's avatarTakashi Iwai <tiwai@suse.de>
      Reviewed-by: 's avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: 's avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1474488168-2343-1-git-send-email-dhinakaran.pandiyan@intel.com
      f9318941
  19. 16 Sep, 2016 1 commit
  20. 09 Aug, 2016 3 commits
  21. 03 Aug, 2016 1 commit
  22. 17 Jun, 2016 1 commit
  23. 16 Jun, 2016 1 commit
  24. 13 May, 2016 1 commit
  25. 08 May, 2016 2 commits
  26. 28 Apr, 2016 1 commit
  27. 26 Apr, 2016 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Update BCLK also at hotplug for i915 HSW/BDW · bb03ed21
      Takashi Iwai authored
      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: 's avatarTakashi Iwai <tiwai@suse.de>
      bb03ed21
  28. 21 Apr, 2016 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Fix possible race on regmap bypass flip · 3194ed49
      Takashi Iwai authored
      HD-audio driver uses regmap cache bypass feature for reading a raw
      value without the cache.  But this is racy since both the cached and
      the uncached reads may occur concurrently.  The former is done via the
      normal control API access while the latter comes from the proc file
      read.
      
      Even though the regmap itself has the protection against the
      concurrent accesses, the flag set/reset is done without the
      protection, so it may lead to inconsistent state of bypass flag that
      doesn't match with the current read and occasionally result in a
      kernel WARNING like:
        WARNING: CPU: 3 PID: 2731 at drivers/base/regmap/regcache.c:499 regcache_cache_only+0x78/0x93
      
      One way to work around such a problem is to wrap with a mutex.  But in
      this case, the solution is simpler: for the uncached read, we just
      skip the regmap and directly calls its accessor.  The verb execution
      there is protected by itself, so basically it's safe to call
      individually.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      3194ed49
  29. 04 Apr, 2016 2 commits
    • Subhransu S. Prusty's avatar
      ALSA: hda - Update chmap tlv to report sink's capability · 44fde3b8
      Subhransu S. Prusty authored
      The existing TLV callback implementation copies all of the
      cea_channel_speaker_allocation map table to the TLV container
      irrespective of what is reported by sink. This is of little use
      to the userspace application.
      
      With this patch, it parses the spk_alloc block as queried from
      the ELD, and copies only the corresponding mapping channel
      allocation entries from the cea channel speaker allocation table.
      Thus the user can parse the TLV container to identify sink's
      capability and set the channel map accordingly.
      
      It shouldn't impact the behavior in AMD chipset, as this makes
      use of already parsed spk alloc block to calculate the channel
      map.
      Signed-off-by: 's avatarSubhransu S. Prusty <subhransu.s.prusty@intel.com>
      Signed-off-by: 's avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      44fde3b8
    • Takashi Iwai's avatar
      ALSA: hda - Bind with i915 only when Intel graphics is present · bfa5fb14
      Takashi Iwai authored
      On Skylake and onwards, the HD-audio controller driver needs to bind
      with i915 for having the control of power well audio domain before
      actually probing the codec.  This leads to the load of i915 driver
      from the audio driver side.  But, there are systems that have no Intel
      graphics but Nvidia or AMD GPU, although they still use HD-audio bus
      for the onboard audio codecs.  On these, loading the i915 driver is
      nothing but a useless memory and CPU consumption.
      
      A simple way to avoid it is just to look for the Intel graphics PCI
      entry beforehand, and try to bind with i915 only when such an entry is
      found.  Currently, it assumes the PCI display class.  If another class
      appears, this needs to be extended (although it's very unlikely).
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      bfa5fb14
  30. 29 Mar, 2016 2 commits
  31. 28 Mar, 2016 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Add the pin / port mapping on Intel ILK and VLV · d745f5e7
      Takashi Iwai authored
      Intel IronLake and ValleyView platforms have different HDMI widget pin
      and digital port mapping from other newer ones.  The recent ones
      (HSW+) have NID 0x05 to 0x07 for port B to port D, while these chips
      have NID 0x04 to 0x06.
      
      For adapting this mapping, pass the codec object instead of the bus
      object to snd_hdac_sync_audio_rate() and snd_hdac_acomp_get_eld() so
      that they can check the codec ID and calculate the mapping properly.
      
      The changes in the HDMI codec driver side will follow in the later
      patch.
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      d745f5e7
  32. 16 Mar, 2016 1 commit
  33. 10 Mar, 2016 1 commit
  34. 08 Mar, 2016 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Fix unexpected resume through regmap code path · fc4f000b
      Takashi Iwai authored
      HD-audio driver has a mechanism to trigger the runtime resume
      automatically at accessing the verbs.  This auto-resume, however,
      causes the mutex deadlock when invoked from the regmap handler since
      the regmap keeps the mutex while auto-resuming.  For avoiding that,
      there is some tricky check in the HDA regmap handler to return -EAGAIN
      error to back-off when the codec is powered down.  Then the caller of
      regmap r/w will retry after properly turning on the codec power.
      
      This works in most cases, but there seems a slight race between the
      codec power check and the actual on-demand auto-resume trigger.  This
      resulted in the lockdep splat, eventually leading to a real deadlock.
      
      This patch tries to address the race window by getting the runtime PM
      refcount at the check time using pm_runtime_get_if_in_use().  With
      this call, we can keep the power on only when the codec has been
      already turned on, and back off if not.
      
      For keeping the code consistency, the code touching the runtime PM is
      stored in hdac_device.c although it's used only locally in
      hdac_regmap.c.
      Reported-by: 's avatarJiri Slaby <jslaby@suse.cz>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      fc4f000b
  35. 07 Mar, 2016 1 commit