1. 18 6月, 2013 1 次提交
    • T
      ALSA: hda - Fix return value of snd_hda_check_power_state() · 06ec56d3
      Takashi Iwai 提交于
      The refactoring by commit 9040d102 introduced the new function
      snd_hda_check_power_state().  This function is supposed to return true
      if the state already reached to the target state, but it actually
      returns false for that.  An utterly stupid typo while copy & paste.
      
      Fortunately this didn't influence on much behavior because powering up
      AFG usually powers up the child widgets, too.  But the finer power
      control must have been broken by this bug.
      
      Cc: <stable@vger.kernel.org> [v3.9+]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      06ec56d3
  2. 17 6月, 2013 3 次提交
  3. 06 6月, 2013 3 次提交
    • T
      ALSA: hda - Don't take unresponsive D3 transition too serious · 63e51fd7
      Takashi Iwai 提交于
      When a codec is powered off, some systems don't respond properly after
      D3 FG transition, while the driver still expects the response and
      tries to fall back to different modes (polling and single-cmd).  When
      the fallback happens, the driver stays in that mode, and falling back
      to the single-cmd mode means it'll loose the unsol event handling,
      too.
      
      The unresponsiveness at D3 isn't too serious, thus this fallback is
      mostly superfluous.  We can gracefully ignore the error there so that
      the driver keeps the normal operation mode.
      
      This patch adds a new bit flag for codec read/write, set in the power
      transition stage, which is notified to the controller driver via a new
      bus->no_response_fallback flag.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      63e51fd7
    • T
      ALSA: hda - Introduce bit flags to snd_hda_codec_read/write() · e7ecc27e
      Takashi Iwai 提交于
      snd_hda_codec_read(), snd_hda_codec_write() & co take the argument
      "direct" that indicates whether the given NID is a direct reference or
      an indirect reference.  However, the indirect reference is practically
      unimplemented and never exists.  And moreover, we don't need the
      indication of indirect reference at this high level, as NID can be
      represented in 16bit values at this point.
      
      Meanwhile, there are some cases where it'd be nice to give some
      operational options to these functions.  So, we can reuse this
      argument as a new bit flag!  Pretty frugal, eh?
      
      All callers so far pass zero to this argument, thus there is no
      behavior change by this replacement.
      
      The real usage of this new bit option will be added in the following
      patches.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e7ecc27e
    • T
      ALSA: hda - Drop hard dependency on CONFIG_SND_DYNAMIC_MINORS · 36bb00d4
      Takashi Iwai 提交于
      Currently HDMI codec driver sets the hard dependency (reverse
      selection) on CONFIG_SND_DYNAMIC_MINORS because the recent codecs may
      support more than two PCMs.  But, this doesn't mean that we need
      always this option, since there can be a single PCM stream even with
      the modern codecs.
      
      This patch drops the hard dependency again but give more sensible
      error message when no enough PCMs are available due to the lack of
      this option.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      36bb00d4
  4. 05 6月, 2013 2 次提交
  5. 03 6月, 2013 5 次提交
    • T
      ALSA: hda/via - Clean up duplicated codes · 963afde9
      Takashi Iwai 提交于
      The previous commit was written in the way to make the backport to
      3.9.y easier, and left the duplicated open codes intentionally.
      Now let's clean up the duplicated codes.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      963afde9
    • T
      ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802 · 5a6f294e
      Takashi Iwai 提交于
      VIA driver has a special suspend handling only for VT1802 to reduce
      the pop noise.  During the transition to the generic parser, the
      behavior of snd_hda_set_pin_ctl() was also changed to modify the
      cached values, too.  And this caused a regression where the pin is
      still cleared even after the resume (including the resume from power
      save), resulting in the silent output.
      
      The fix is simply to replace snd_hda_set_pin_ctl() with the explicit
      call of snd_hda_codec_write() again.
      Reported-by: NAlex Riesen <raa.lkml@gmail.com>
      Cc: <stable@vger.kernel.org> [v3.9]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5a6f294e
    • T
      ALSA: hda - Add keep_eapd_on flag to generic parser · 05909d5c
      Takashi Iwai 提交于
      VT1802 codec seems to reset EAPD of other pins in the hardware level,
      and this was another reason of the silent headphone output on some
      machines.  As a workaround, introduce a new flag indicating to keep
      the EPAD on to the generic parser, and set it in patch_via.c.
      Reported-by: NAlex Riesen <raa.lkml@gmail.com>
      Cc: <stable@vger.kernel.org> [v3.9]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      05909d5c
    • T
      ALSA: hda - Allow setting automute/automic hooks after parsing · 77afe0e9
      Takashi Iwai 提交于
      Some codec drivers (VIA codecs and some Realtek fixups) set the
      automute and automic hooks after calling
      snd_hda_gen_parse_auto_config().  In the current code, the hook
      pointers are referred only in snd_hda_gen_parse_auto_config() and
      passed to snd_hda_jack_detect_enable_callback(), thus changing the
      hook values won't change the actually called callbacks properly.
      
      This patch fixes this bug by setting the static functions as the
      primary callback functions for the jack detection, and let them
      calling the appropriate hooks dynamically.
      
      Cc: <stable@vger.kernel.org> [v3.9]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      77afe0e9
    • T
      ALSA: hda/via - Disable broken dynamic power control · 087c2e3b
      Takashi Iwai 提交于
      Since the transition to the generic parser, the actual routes used
      there don't match always with the assumed static paths in some
      set_widgets_power_state callbacks.  This results in the wrong power
      setup in the end.  As a temporary workaround, we need to disable the
      calls together with the non-functional dynamic power control enum.
      Reported-by: NAlex Riesen <raa.lkml@gmail.com>
      Cc: <stable@vger.kernel.org> [v3.9]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      087c2e3b
  6. 31 5月, 2013 7 次提交
  7. 29 5月, 2013 1 次提交
    • T
      ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at remove · 20a24225
      Takashi Iwai 提交于
      As drvdata is cleared to NULL at probe failure or at removal by the
      driver core, we don't have to call pci_set_drvdata(pci, NULL) any
      longer in each driver.
      
      The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in
      hda_intel.c.  Since this function itself releases the card instance,
      we need to clear drvdata here as well, so that it won't be released
      doubly in the remove callback.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      20a24225
  8. 28 5月, 2013 1 次提交
  9. 17 5月, 2013 1 次提交
  10. 16 5月, 2013 2 次提交
  11. 10 5月, 2013 1 次提交
  12. 08 5月, 2013 1 次提交
    • T
      ALSA: hda - Apply pin-enablement workaround to all Haswell HDMI codecs · 17df3f55
      Takashi Iwai 提交于
      This is a revised patch based on Mengdong Lin's fix patch, which is a
      supplement to a previous patch [1611a9c9: ALSA: hda - Add fixup for
      Haswell to enable all pin and convertor widgets].
      
      Some Haswell BIOS will disable the 2nd and 3rd pin/covertor widgets
      when the HD-A controller changes state from D3 to D0.  So when the
      controller resumes after a system or runtime suspend, these widgets
      are disabled and programming these widgets to D0 will cause H/W error
      and codec will not respond.
      
      In addition, we found out that some BIOS disables the pins at S3
      although it shows up at boot.  This confuses the driver utterly, and
      the hardware falls into the fatal communication error like the above.
      
      So in this patch, we apply intel_haswell_enable_all_pins() not only as
      a fixup to a certain device (with 8086:2010) but to all Haswell
      machines.  The codec driver basically assumes that all pins are
      exposed, so it's anyway better to see them from the beginning.  Even
      if all pins and converters are shown by this call, there should be no
      regression in practice: the pin default configurations are still kept,
      thus the disabled pins are handled as disabled by the driver
      properly.
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      17df3f55
  13. 07 5月, 2013 1 次提交
    • W
      ALSA: HDA: Fix Oops caused by dereference NULL pointer · 2195b063
      Wang YanQing 提交于
      The interrupt handler azx_interrupt will call azx_update_rirb,
      which may call snd_hda_queue_unsol_event, snd_hda_queue_unsol_event
      will dereference chip->bus pointer.
      
      The problem is we alloc chip->bus in azx_codec_create
      which will be called after we enable IRQ and enable unsolicited
      event in azx_probe.
      
      This will cause Oops due dereference NULL pointer. I meet it, good luck:)
      
      [Rearranged the NULL check before the tracepoint and added another
       NULL check of bus->workq -- tiwai]
      Signed-off-by: NWang YanQing <udknight@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2195b063
  14. 04 5月, 2013 1 次提交
  15. 03 5月, 2013 1 次提交
  16. 29 4月, 2013 3 次提交
  17. 26 4月, 2013 1 次提交
  18. 25 4月, 2013 1 次提交
  19. 24 4月, 2013 1 次提交
  20. 22 4月, 2013 1 次提交
  21. 18 4月, 2013 2 次提交