1. 18 10月, 2016 1 次提交
    • A
      ALSA: hda - allow 40 bit DMA mask for NVidia devices · 3ab7511e
      Ard Biesheuvel 提交于
      Commit 49d9e77e ("ALSA: hda - Fix system panic when DMA > 40 bits
      for Nvidia audio controllers") simply disabled any DMA exceeding 32
      bits for NVidia devices, even though they are capable of performing
      DMA up to 40 bits. On some architectures (such as arm64), system memory
      is not guaranteed to be 32-bit addressable by PCI devices, and so this
      change prevents NVidia devices from working on platforms such as AMD
      Seattle.
      
      Since the original commit already mentioned that up to 40 bits of DMA
      is supported, and given that the code has been updated in the meantime
      to support a 40 bit DMA mask on other devices, revert commit 49d9e77e
      and explicitly set the DMA mask to 40 bits for NVidia devices.
      
      Fixes: 49d9e77e ('ALSA: hda - Fix system panic when DMA > 40 bits...')
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3ab7511e
  2. 13 10月, 2016 1 次提交
    • H
      ALSA: hda - Fix a failure of micmute led when having multi adcs · 4875a5f7
      Hui Wang 提交于
      On a Dell laptop, there is no global adcs for all input devices, so
      the input devices use the different adc, as a result, dyn_adc_switch
      is set to true.
      
      In this situation, it is safe to control the micmute led according to
      user's choice of muting/unmuting the current input device, since only
      current input device path is active, while other input device paths
      are inactive and powered down.
      
      Fixes: 00ef9940 ('ALSA: hda - add mic mute led hook for dell machines')
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NHui Wang <hui.wang@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4875a5f7
  3. 27 9月, 2016 1 次提交
  4. 26 9月, 2016 1 次提交
  5. 12 9月, 2016 1 次提交
    • J
      ALSA: pci: constify local structures · 071f1344
      Julia Lawall 提交于
      For structure types defined in the same file or local header files, find
      top-level static structure declarations that have the following
      properties:
      1. Never reassigned.
      2. Address never taken
      3. Not passed to a top-level macro call
      4. No pointer or array-typed field passed to a function or stored in a
      variable.
      Declare structures having all of these properties as const.
      
      Done using Coccinelle.
      Based on a suggestion by Joe Perches <joe@perches.com>.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      071f1344
  6. 11 9月, 2016 1 次提交
  7. 10 9月, 2016 1 次提交
    • T
      ALSA: hda - Skip Realtek SKU check for Lenovo machines · 09da111a
      Takashi Iwai 提交于
      Realtek codec driver expects an implicit rule where either the codec
      SSID or the pincfg NID 0x1d contains the some information encoded in
      some bits.  One of the expected information is there is the
      availability of PC beep, and the driver doesn't build up the PC beep
      control if this is *supposed* to be disabled there.
      
      Meanwhile, Lenovo doesn't seem to follow this requirement (yes it's
      non-standard after all), and the BIOS sets just the normal SSID and
      the pincfg values.  This resulted in the lack of PC beep on a few
      machines, purely with a lucky or unlucky number.  It didn't bother
      most people, but some people still demand the PC beep, as found in bug
      reports.
      
      This patch just adds the fixup chain to Lenovo machines to skip the
      SKU checks.  Then the beep control will show up in the mixer, and user
      can still decide to enable / disable it via the standard mixer
      interface.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156311Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      09da111a
  8. 02 9月, 2016 1 次提交
    • J
      ALSA: constify snd_pcm_ops structures · 6769e988
      Julia Lawall 提交于
      Check for snd_pcm_ops structures that are only stored in the ops field of a
      snd_soc_platform_driver structure or passed as the third argument to
      snd_pcm_set_ops.  The corresponding field or parameter is declared const,
      so snd_pcm_ops structures that have this property can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct snd_pcm_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      struct snd_soc_platform_driver e;
      position p;
      @@
      e.ops = &i@p;
      
      @ok2@
      identifier r.i;
      expression e1, e2;
      position p;
      @@
      snd_pcm_set_ops(e1, e2, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      struct snd_pcm_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct snd_pcm_ops i = { ... };
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6769e988
  9. 30 8月, 2016 2 次提交
  10. 24 8月, 2016 1 次提交
  11. 10 8月, 2016 1 次提交
    • T
      ALSA: hda - Manage power well properly for resume · a52ff34e
      Takashi Iwai 提交于
      For SKL and later Intel chips, we control the power well per codec
      basis via link_power callback since the commit [03b135ce: ALSA:
      hda - remove dependency on i915 power well for SKL].
      However, there are a few exceptional cases where the gfx registers are
      accessed from the audio driver: namely the wakeup override bit
      toggling at (both system and runtime) resume.  This seems causing a
      kernel warning when accessed during the power well down (and likely
      resulting in the bogus register accesses).
      
      This patch puts the proper power up / down sequence around the resume
      code so that the wakeup bit is fiddled properly while the power is
      up.  (The other callback, sync_audio_rate, is used only in the PCM
      callback, so it's guaranteed in the power-on.)
      
      Also, by this proper power up/down, the instantaneous flip of wakeup
      bit in the resume callback that was introduced by the commit
      [033ea349: ALSA: hda - Fix Skylake codec timeout] becomes
      superfluous, as snd_hdac_display_power() already does it.  So we can
      clean it up together.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96214
      Fixes: 03b135ce ('ALSA: hda - remove dependency on i915 power well for SKL')
      Cc: <stable@vger.kernel.org> # v4.2+
      Tested-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a52ff34e
  12. 09 8月, 2016 2 次提交
  13. 04 8月, 2016 1 次提交
  14. 03 8月, 2016 1 次提交
  15. 01 8月, 2016 2 次提交
  16. 12 7月, 2016 2 次提交
  17. 08 7月, 2016 1 次提交
  18. 05 7月, 2016 1 次提交
  19. 29 6月, 2016 1 次提交
  20. 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
  21. 24 6月, 2016 2 次提交
  22. 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
  23. 16 6月, 2016 1 次提交
  24. 15 6月, 2016 1 次提交
  25. 09 6月, 2016 1 次提交
  26. 07 6月, 2016 1 次提交
  27. 03 6月, 2016 1 次提交
  28. 02 6月, 2016 1 次提交
    • T
      ALSA: hda - Turn off loopback mixing as default · fabc16fe
      Takashi Iwai 提交于
      So far, we enabled the loopback mixing control as default, as this
      behavior made somewhat compatible with the earlier HD-audio drivers
      for Realtek & co.  However, it's getting annoying as we've got more
      and more bug reports about the noise coming from the loopback route.
      Since the loopback mixing is used fairly rarely and often harmful
      (e.g. using PA), let's get rid of the default turn-on lines.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fabc16fe
  29. 30 5月, 2016 2 次提交
  30. 25 5月, 2016 1 次提交
  31. 24 5月, 2016 1 次提交
  32. 20 5月, 2016 1 次提交
  33. 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
  34. 10 5月, 2016 1 次提交