1. 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
  2. 09 6月, 2016 1 次提交
  3. 07 6月, 2016 1 次提交
  4. 03 6月, 2016 1 次提交
  5. 30 5月, 2016 2 次提交
  6. 25 5月, 2016 1 次提交
  7. 24 5月, 2016 1 次提交
  8. 20 5月, 2016 1 次提交
  9. 13 5月, 2016 1 次提交
  10. 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
  11. 10 5月, 2016 2 次提交
  12. 09 5月, 2016 2 次提交
  13. 08 5月, 2016 1 次提交
  14. 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
  15. 21 4月, 2016 1 次提交
  16. 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
  17. 19 4月, 2016 1 次提交
  18. 18 4月, 2016 2 次提交
  19. 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
  20. 15 4月, 2016 1 次提交
  21. 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
  22. 12 4月, 2016 1 次提交
  23. 11 4月, 2016 1 次提交
  24. 09 4月, 2016 2 次提交
  25. 06 4月, 2016 1 次提交
    • T
      ALSA: intel8x0: Drop superfluous VM checks · 4926c804
      Takashi Iwai 提交于
      intel8x0 driver has the inside_vm check for skipping a buggy hardware
      workaround in the PCM pointer callback in the commit [228cf793:
      ALSA: intel8x0: Improve performance in virtual environment].  This was
      originally applied to all devices on known VMs, but the code was
      switched to use the PCI  ID matching for applying to only known
      devices (KVM and Parallels), in order to avoid applying wrongly to
      VT-d and other such cases, in the commit [7fb4f392: ALSA:
      intel8x0: improve virtual environment detection].
      
      Meanwhile, the original VM check was kept even after switching to the
      PCI ID matching.  It was partly because we weren't 100% sure whether
      we had covered all well, and partly because this would help
      identifying the issue once when a user of another VM hit the same
      problem or a regression.  Currently the VM check is used only for
      showing the kernel message that the VM-optimization isn't applied, and
      the VM check itself doesn't change the actual driver behavior at all.
      
      Despite the relatively safe driver behavior, the code caught attention
      of developers badly and brought many confusion / misunderstanding.
      Since we've got neither regression nor enhancement report for other
      VMs for five years long, it's likely safe to drop this superfluous VM
      check now.
      
      The module option is still kept, so if a user still needs to adjust,
      it can be applied as was.
      Acked-by: NKonstantin Ozerkov <kozerkov@parallels.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4926c804
  26. 04 4月, 2016 1 次提交
    • S
      ALSA: hda - Update chmap tlv to report sink's capability · 44fde3b8
      Subhransu S. Prusty 提交于
      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: NSubhransu S. Prusty <subhransu.s.prusty@intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      44fde3b8
  27. 01 4月, 2016 1 次提交
  28. 31 3月, 2016 1 次提交
  29. 28 3月, 2016 3 次提交
    • T
      ALSA: hda - Enable i915 ELD notifier for Intel IronLake and Baytrail · 7ff652ff
      Takashi Iwai 提交于
      Since we have the fixed pin-port mapping for Intel IronLake (IbexPeak)
      and Baytrail (ValleyView) platforms in the code side, now it's time to
      add the support in the codec driver side.  This patch simply enables
      the i915 ELD notifier for these in addition with the fix of the
      mapping from the port to NID in the callback.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7ff652ff
    • T
      ALSA: hda - Add the pin / port mapping on Intel ILK and VLV · d745f5e7
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      d745f5e7
    • T
      ALSA: hda - Use eld notifier for Intel SandyBridge and IvyBridge HDMI/DP · e85015a3
      Takashi Iwai 提交于
      Intel SandyBridge and IvyBridge (CougarPoint and PantherPoint
      platforms) have also the same digital port vs audio widget mapping
      (from port B = NID 0x05 to port D = NID 0x07) as Haswell & co.
      So, we can reuse the existing functions for HSW+ for these platforms
      without changing there, but just by re-adding the on-demand i915
      binding in HDMI codec driver.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e85015a3