1. 05 7月, 2016 1 次提交
  2. 29 6月, 2016 2 次提交
  3. 28 6月, 2016 1 次提交
  4. 26 6月, 2016 1 次提交
    • B
      ALSA: hda - fix read before array start · 81e43960
      Bob Copeland 提交于
      UBSAN reports the following warning from accessing path->path[-1]
      in set_path_power():
      
      [   16.078040] ================================================================================
      [   16.078124] UBSAN: Undefined behaviour in sound/pci/hda/hda_generic.c:3981:17
      [   16.078198] index -1 is out of range for type 'hda_nid_t [10]'
      [   16.078270] CPU: 2 PID: 1738 Comm: modprobe Not tainted 4.7.0-rc1-wt+ #47
      [   16.078274] Hardware name: LENOVO 3443CTO/3443CTO, BIOS G6ET23WW (1.02 ) 08/14/2012
      [   16.078278]  ffff8800cb246000 ffff8800cb3638b8 ffffffff815c4fe3 0000000000000032
      [   16.078286]  ffff8800cb3638e0 ffffffffffffffff ffff8800cb3638d0 ffffffff8162443d
      [   16.078294]  ffffffffa0894200 ffff8800cb363920 ffffffff81624af7 0000000000000292
      [   16.078302] Call Trace:
      [   16.078311]  [<ffffffff815c4fe3>] dump_stack+0x86/0xd3
      [   16.078317]  [<ffffffff8162443d>] ubsan_epilogue+0xd/0x40
      [   16.078324]  [<ffffffff81624af7>] __ubsan_handle_out_of_bounds+0x67/0x70
      [   16.078335]  [<ffffffffa087665f>] set_path_power+0x1bf/0x230 [snd_hda_codec_generic]
      [   16.078344]  [<ffffffffa087880d>] add_pin_power_ctls+0x8d/0xc0 [snd_hda_codec_generic]
      [   16.078352]  [<ffffffffa087f190>] ? pin_power_down_callback+0x20/0x20 [snd_hda_codec_generic]
      [   16.078360]  [<ffffffffa0878947>] add_all_pin_power_ctls+0x107/0x150 [snd_hda_codec_generic]
      [   16.078370]  [<ffffffffa08842b3>] snd_hda_gen_parse_auto_config+0x2d73/0x49e0 [snd_hda_codec_generic]
      [   16.078376]  [<ffffffff81173360>] ? trace_hardirqs_on_caller+0x1b0/0x2c0
      [   16.078390]  [<ffffffffa089df27>] alc_parse_auto_config+0x147/0x310 [snd_hda_codec_realtek]
      [   16.078402]  [<ffffffffa08a332a>] patch_alc269+0x23a/0x560 [snd_hda_codec_realtek]
      [   16.078417]  [<ffffffffa0838644>] hda_codec_driver_probe+0xa4/0x1a0 [snd_hda_codec]
      [   16.078424]  [<ffffffff817bbac1>] driver_probe_device+0x101/0x380
      [   16.078430]  [<ffffffff817bbdf9>] __driver_attach+0xb9/0x100
      [   16.078438]  [<ffffffff817bbd40>] ? driver_probe_device+0x380/0x380
      [   16.078444]  [<ffffffff817b8d20>] bus_for_each_dev+0x70/0xc0
      [   16.078449]  [<ffffffff817bb087>] driver_attach+0x27/0x50
      [   16.078454]  [<ffffffff817ba956>] bus_add_driver+0x166/0x2c0
      [   16.078460]  [<ffffffffa0369000>] ? 0xffffffffa0369000
      [   16.078465]  [<ffffffff817bd13d>] driver_register+0x7d/0x130
      [   16.078477]  [<ffffffffa083816f>] __hda_codec_driver_register+0x6f/0x90 [snd_hda_codec]
      [   16.078488]  [<ffffffffa036901e>] realtek_driver_init+0x1e/0x1000 [snd_hda_codec_realtek]
      [   16.078493]  [<ffffffff8100215e>] do_one_initcall+0x4e/0x1d0
      [   16.078499]  [<ffffffff8119f54d>] ? rcu_read_lock_sched_held+0x6d/0x80
      [   16.078504]  [<ffffffff813701b1>] ? kmem_cache_alloc_trace+0x391/0x560
      [   16.078510]  [<ffffffff812bb314>] ? do_init_module+0x28/0x273
      [   16.078515]  [<ffffffff812bb387>] do_init_module+0x9b/0x273
      [   16.078522]  [<ffffffff811e3782>] load_module+0x20b2/0x3410
      [   16.078527]  [<ffffffff811df140>] ? m_show+0x210/0x210
      [   16.078533]  [<ffffffff813b2b26>] ? kernel_read+0x66/0xe0
      [   16.078541]  [<ffffffff811e4cfa>] SYSC_finit_module+0xba/0xc0
      [   16.078547]  [<ffffffff811e4d1e>] SyS_finit_module+0xe/0x10
      [   16.078552]  [<ffffffff81a860fc>] entry_SYSCALL_64_fastpath+0x1f/0xbd
      [   16.078556] ================================================================================
      
      Fix by checking path->depth before use.
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      81e43960
  5. 24 6月, 2016 2 次提交
  6. 22 6月, 2016 1 次提交
    • B
      ALSA: hda/tegra: iomem fixups for sparse warnings · c9058d43
      Ben Dooks 提交于
      The readl/writel are not being passed __iomem annotated
      variables, so fix the following sparse warnings by adding
      __iomem in:
      
      sound/pci/hda/hda_tegra.c:120:9: warning: incorrect type in argument 2 (different address spaces)
      sound/pci/hda/hda_tegra.c:120:9:    expected void volatile [noderef] <asn:2>*addr
      sound/pci/hda/hda_tegra.c:120:9:    got unsigned int [usertype] *addr
      sound/pci/hda/hda_tegra.c:125:16: warning: incorrect type in argument 1 (different address spaces)
      sound/pci/hda/hda_tegra.c:125:16:    expected void const volatile [noderef] <asn:2>*addr
      sound/pci/hda/hda_tegra.c:125:16:    got unsigned int [usertype] *addr
      sound/pci/hda/hda_tegra.c:134:13: warning: incorrect type in argument 1 (different address spaces)
      sound/pci/hda/hda_tegra.c:134:13:    expected void const volatile [noderef] <asn:2>*addr
      sound/pci/hda/hda_tegra.c:134:13:    got void *dword_addr
      sound/pci/hda/hda_tegra.c:137:9: warning: incorrect type in argument 2 (different address spaces)
      sound/pci/hda/hda_tegra.c:137:9:    expected void volatile [noderef] <asn:2>*addr
      sound/pci/hda/hda_tegra.c:137:9:    got void *dword_addr
      sound/pci/hda/hda_tegra.c:146:13: warning: incorrect type in argument 1 (different address spaces)
      sound/pci/hda/hda_tegra.c:146:13:    expected void const volatile [noderef] <asn:2>*addr
      sound/pci/hda/hda_tegra.c:146:13:    got void *dword_addr
      sound/pci/hda/hda_tegra.c:156:13: warning: incorrect type in argument 1 (different address spaces)
      sound/pci/hda/hda_tegra.c:156:13:    expected void const volatile [noderef] <asn:2>*addr
      sound/pci/hda/hda_tegra.c:156:13:    got void *dword_addr
      sound/pci/hda/hda_tegra.c:159:9: warning: incorrect type in argument 2 (different address spaces)
      sound/pci/hda/hda_tegra.c:159:9:    expected void volatile [noderef] <asn:2>*addr
      sound/pci/hda/hda_tegra.c:159:9:    got void *dword_addr
      sound/pci/hda/hda_tegra.c:168:13: warning: incorrect type in argument 1 (different address spaces)
      sound/pci/hda/hda_tegra.c:168:13:    expected void const volatile [noderef] <asn:2>*addr
      sound/pci/hda/hda_tegra.c:168:13:    got void *dword_addr
      sound/pci/hda/hda_tegra.c:173:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
      sound/pci/hda/hda_tegra.c:173:23:    expected void ( *reg_writel )( ... )
      sound/pci/hda/hda_tegra.c:173:23:    got void ( static [toplevel] *<noident> )( ... )
      sound/pci/hda/hda_tegra.c:174:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces))
      sound/pci/hda/hda_tegra.c:174:22:    expected unsigned int ( *reg_readl )( ... )
      sound/pci/hda/hda_tegra.c:174:22:    got unsigned int ( static [toplevel] *<noident> )( ... )
      sound/pci/hda/hda_tegra.c:175:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
      sound/pci/hda/hda_tegra.c:175:23:    expected void ( *reg_writew )( ... )
      sound/pci/hda/hda_tegra.c:175:23:    got void ( static [toplevel] *<noident> )( ... )
      sound/pci/hda/hda_tegra.c:176:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces))
      sound/pci/hda/hda_tegra.c:176:22:    expected unsigned short ( *reg_readw )( ... )
      sound/pci/hda/hda_tegra.c:176:22:    got unsigned short ( static [toplevel] *<noident> )( ... )
      sound/pci/hda/hda_tegra.c:177:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
      sound/pci/hda/hda_tegra.c:177:23:    expected void ( *reg_writeb )( ... )
      sound/pci/hda/hda_tegra.c:177:23:    got void ( static [toplevel] *<noident> )( ... )
      sound/pci/hda/hda_tegra.c:178:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces))
      sound/pci/hda/hda_tegra.c:178:22:    expected unsigned char ( *reg_readb )( ... )
      sound/pci/hda/hda_tegra.c:178:22:    got unsigned char ( static [toplevel] *<noident> )( ... )
      Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c9058d43
  7. 09 6月, 2016 1 次提交
  8. 07 6月, 2016 1 次提交
  9. 03 6月, 2016 1 次提交
  10. 30 5月, 2016 2 次提交
  11. 25 5月, 2016 1 次提交
  12. 24 5月, 2016 1 次提交
  13. 20 5月, 2016 1 次提交
  14. 13 5月, 2016 1 次提交
  15. 11 5月, 2016 1 次提交
    • T
      ALSA: hda - Fix regression on ATI HDMI audio · 39669225
      Takashi Iwai 提交于
      The HDMI/DP audio output on ATI/AMD chips got broken due to the recent
      restructuring of chmap.  Fortunately, Daniel Exner could bisect, and
      pointed the culprit commit [739ffee9: ALSA: hda - Add hdmi chmap
      verb programming ops to chmap object].
      
      This commit moved some ops from hdmi_ops to chmap_ops, and reassigned
      the ops in the embedded chmap object in hdmi_spec instead.
      Unfortunately, the reassignment of these ops in patch_atihdmi() were
      moved into an if block that is performed only for old chips.  Thus, on
      newer chips, the generic ops is still used, which doesn't work for
      such ATI/AMD chips.
      
      This patch addresses the regression, simply by moving the assignment
      of chmap ops to the right place.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=114981
      Fixes: 739ffee9 ('ALSA: hda - Add hdmi chmap verb programming ops to chmap object')
      Reported-and-tested-by: NDaniel Exner <dex@dragonslave.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      39669225
  16. 10 5月, 2016 2 次提交
  17. 09 5月, 2016 2 次提交
  18. 08 5月, 2016 1 次提交
  19. 26 4月, 2016 3 次提交
    • 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
    • C
      ALSA: hda - Add dock support for ThinkPad X260 · 037e1197
      Conrad Kostecki 提交于
      Fixes audio output on a ThinkPad X260, when using Lenovo CES 2013
      docking station series (basic, pro, ultra).
      Signed-off-by: NConrad Kostecki <ck+linuxkernel@bl4ckb0x.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      037e1197
    • T
      ALSA: au88x0: Fix overlapped PCM pointer · 58a8738c
      Takashi Iwai 提交于
      au88x0 hardware seems returning the current pointer at the buffer
      boundary instead of going back to zero.  This results in spewing
      warnings from PCM core.
      
      This patch corrects the return value from the pointer callback within
      the proper value range, just returning zero if the position is equal
      or above the buffer size.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      58a8738c
  20. 21 4月, 2016 1 次提交
  21. 20 4月, 2016 2 次提交
    • L
      ALSA: hda - add PCI ID for Intel Broxton-T · 9859a971
      Lu, Han 提交于
      Add HD Audio Device PCI ID for the Intel Broxton-T platform.
      It is an HDA Intel PCH controller.
      Signed-off-by: NLu, Han <han.lu@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9859a971
    • T
      ALSA: hda - Keep powering up ADCs on Cirrus codecs · de3df8a9
      Takashi Iwai 提交于
      Although one weird behavior about the input path (inconsistent D0/D3
      switch) on Cirrus CS420x codecs was fixed in the previous commit,
      there is still an issue on some Mac machines: the capture stream
      stalls when switching the ADCs on the fly.  More badly, this keeps
      stuck until the next reboot.
      
      The dynamic ADC switching is already a bit fragile and assuming
      optimistically that the chip accepts the frequent power changes.  On
      Cirrus codecs, this doesn't seem applicable.
      
      As a quick workaround, we pin down the ADCs to keep up in D0 when
      spec->dyn_adc_switch is set.  In this way, the ADCs are kept up only
      for the system that were confirmed to be broken.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171
      Cc: <stable@vger.kernel.org> # v4.4+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      de3df8a9
  22. 19 4月, 2016 1 次提交
  23. 18 4月, 2016 2 次提交
  24. 17 4月, 2016 1 次提交
    • T
      ALSA: hda - Don't trust the reported actual power state · 50fd4987
      Takashi Iwai 提交于
      We've got a regression report that the recording on Mac with a cirrus
      codec doesn't work any longer.  This turned out to be the missing
      power up to D0 by power_save_node enablement.
      
      After analyzing the traces, we found out that the culprit is that the
      codec advertises the "actual" power state of a few nodes to be D0
      while the "target" power state is D3.  This inconsistency is usually
      OK, as it implies the power transition.  But in the case of cirrus
      codec, this seems to be stuck to D3 while it's not actually D0.
      
      This patch addresses the issue by checking the power state difference
      more strictly.  It sends the power-state change verb unless both the
      target and the actual power states show the given value.
      
      We may introduce yet another flag indicating the possible broken
      hardware power state, but it's anyway safer to set the proper power
      state even in a transition (at least it's harmless as long as the
      target state is same).  So this simpler change was applied now.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171
      Cc: <stable@vger.kernel.org> # v4.4+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      50fd4987
  25. 15 4月, 2016 1 次提交
  26. 13 4月, 2016 2 次提交
    • T
      ALSA: hda - Fix inconsistent monitor_present state until repoll · c44da62b
      Takashi Iwai 提交于
      While the previous commit fixed the missing monitor_present flag
      update, it may be still in an inconsistent state while the driver
      repolls: the flag itself is updated, but the eld_valid flag and the
      contents don't follow until the repoll finishes (and may be repeated
      for a few times).
      
      The basic problem is that pin_eld->monitor_present is updated in the
      caller side.  This should have been updated only in update_eld().  So,
      the proper fix is to avoid accessing pin_eld but only spec->temp_eld.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c44da62b
    • H
      ALSA: hda - Fix regression of monitor_present flag in eld proc file · 023d8218
      Hyungwon Hwang 提交于
      The commit [bd481285: ALSA: hda - Fix forgotten HDMI
      monitor_present update] covered the missing update of monitor_present
      flag, but this caused a regression for devices without the i915 eld
      notifier.  Since the old code supposed that pin_eld->monitor_present
      was updated by the caller side, the hdmi_present_sense_via_verbs()
      doesn't update the temporary eld->monitor_present but only
      pin_eld->monitor_present, which is now overridden in update_eld().
      
      The fix is to update pin_eld->monitor_present as well before calling
      update_eld().
      
      Note that this may still leave monitor_present flag in an inconsistent
      state when the driver repolls, but this is at least the old behavior.
      More proper fix will follow in the later patch.
      
      Fixes: bd481285 ('ALSA: hda - Fix forgotten HDMI monitor_present update')
      Signed-off-by: NHyungwon Hwang <hyungwon.hwang7@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      023d8218
  27. 12 4月, 2016 1 次提交
  28. 11 4月, 2016 1 次提交
  29. 09 4月, 2016 2 次提交