1. 21 4月, 2016 2 次提交
    • T
      ALSA: hda - Fix possible race on regmap bypass flip · 3194ed49
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      3194ed49
    • T
      ALSA: pcxhr: Fix missing mutex unlock · 67f3754b
      Takashi Iwai 提交于
      The commit [9bef72bd: ALSA: pcxhr: Use nonatomic PCM ops]
      converted to non-atomic PCM ops, but shamelessly with an unbalanced
      mutex locking, which leads to the hangup easily.  Fix it.
      
      Fixes: 9bef72bd ('ALSA: pcxhr: Use nonatomic PCM ops')
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116441
      Cc: <stable@vger.kernel.org> # 3.18+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      67f3754b
  2. 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
  3. 18 4月, 2016 2 次提交
  4. 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
  5. 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
  6. 12 4月, 2016 1 次提交
    • K
      ALSA: usb-audio: Skip volume controls triggers hangup on Dell USB Dock · adcdd0d5
      Kailang Yang 提交于
      This is Dell usb dock audio workaround.
      It was fixed the master volume keep lower.
      
      [Some background: the patch essentially skips the controls of a couple
       of FU volumes.  Although the firmware exposes the dB and the value
       information via the usb descriptor, changing the values (we set the
       min volume as default) screws up the device.  Although this has been
       fixed in the newer firmware, the devices are shipped with the old
       firmware, thus we need the workaround in the driver side.  -- tiwai]
      Signed-off-by: NKailang Yang <kailang@realtek.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      adcdd0d5
  7. 11 4月, 2016 2 次提交
  8. 06 4月, 2016 1 次提交
  9. 04 4月, 2016 2 次提交
    • T
      ALSA: usb-audio: Add a sample rate quirk for Phoenix Audio TMX320 · f03b24a8
      Takashi Iwai 提交于
      Phoenix Audio TMX320 gives the similar error when the sample rate is
      asked:
        usb 2-1.3: 2:1: cannot get freq at ep 0x85
        usb 2-1.3: 1:1: cannot get freq at ep 0x2
        ....
      
      Add the corresponding USB-device ID (1de7:0014) to
      snd_usb_get_sample_rate_quirk() list.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110221
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f03b24a8
    • T
      ALSA: hda - Bind with i915 only when Intel graphics is present · bfa5fb14
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      bfa5fb14
  10. 03 4月, 2016 9 次提交
  11. 02 4月, 2016 16 次提交