1. 28 6月, 2013 1 次提交
  2. 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
  3. 10 5月, 2013 1 次提交
  4. 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
  5. 18 4月, 2013 2 次提交
    • T
      ALSA: hda - Disable the sanity check in snd_hda_add_pincfg() · d5657ec9
      Takashi Iwai 提交于
      When pin default configs are overridden via patch option, these are
      evaluated before fixups are applied.  Since some fixups change the
      whole codec trees and/or add pins dynamically, this sanity check might
      not pass when pins aren't present at the time the function is called.
      
      We may reorder the execution, but an easier fix is simply to disable
      this sanity check.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d5657ec9
    • T
      ALSA: hda - Don't call vmaster hook when bus->shutdown is set · 594813ff
      Takashi Iwai 提交于
      The flag bus->shutdown implies that the control elements might have
      been already destroyed.  When a codec is resumed at this state and
      tries to call vmaster hook (e.g. in snd_hda_gen_init()), it would
      refer to a non-existing object, resulting in Oops in the end.
      
      This patch just adds a check of the flag in the caller side for
      avoiding such a crash.
      
      Though, the best would be to clear hook->sw_kctl by the destructor of
      the corresponding ctl element, but vmaster uses its own private_free,
      it can't be done easily.  So let it be for a while.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      594813ff
  6. 04 4月, 2013 1 次提交
  7. 20 3月, 2013 1 次提交
  8. 14 3月, 2013 2 次提交
    • T
      ALSA: hda - Don't apply EAPD power filter as default · ba615b86
      Takashi Iwai 提交于
      So far, the driver doesn't power down the widget at going down to D3
      when the widget node has an EAPD capability and EAPD is actually set
      on all codecs unless codec->power_filter is set explicitly.
      This caused a problem on some Conexant codecs, leading to click
      noises, and we set it as NULL there.  But it is very unlikely that the
      problem hits only these codecs.
      
      Looking back at the development history, this workaround for EAPD was
      introduced just for some laptops with STAC9200 codec, then we applied
      it blindly for all.  Now, since it's revealed to have an ill effect,
      we should disable this workaround per default and apply only for the
      known requiring systems.
      
      The EAPD workaround is implemented now as snd_hda_codec_eapd_power_filter(),
      and this has to be set explicitly by the codec driver when needed.
      As of now, only patch_stac9200() sets this one.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ba615b86
    • T
      5265fd9a
  9. 12 3月, 2013 1 次提交
    • T
      ALSA: hda - Fix snd_hda_get_num_raw_conns() to return a correct value · b5f82b10
      Takashi Iwai 提交于
      In the connection list expansion in hda_codec.c and hda_proc.c, the
      value returned from snd_hda_get_num_raw_conns() is used as the array
      size to store the connection list.  However, the function returns
      simply a raw value of the AC_PAR_CONNLIST_LEN parameter, and the
      widget list with ranges isn't considered there.  Thus it may return a
      smaller size than the actual list, which results in -ENOSPC in
      snd_hda_get_raw_conections().
      
      This patch fixes the bug by parsing the connection list correctly also
      for snd_hda_get_num_raw_conns().
      Reported-and-tested-by: NDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b5f82b10
  10. 07 3月, 2013 2 次提交
  11. 13 2月, 2013 1 次提交
    • T
      ALSA: hda - Fix broken workaround for HDMI/SPDIF conflicts · ea9b43ad
      Takashi Iwai 提交于
      The commit [dcda5806: ALSA: hda - Add workaround for conflicting
      IEC958 controls] introduced a workaround for cards that have both
      SPDIF and HDMI devices for giving device=1 to SPDIF control elements.
      It turned out, however, that this workaround doesn't work well -
      
      - The workaround checks only conflicts in a single codec, but SPDIF
        and HDMI are provided by multiple codecs in many cases, and
      
      - ALSA mixer abstraction doesn't care about the device number in ctl
        elements, thus you'll get errors from amixer such as
        % amixer scontrols -c 0
        ALSA lib simple_none.c:1551:(simple_add1) helem (MIXER,'IEC958
        Playback Switch',0,1,0) appears twice or more
        amixer: Mixer hw:0 load error: Invalid argument
      
      This patch fixes the previous broken workaround.  Instead of changing
      the device number of SPDIF ctl elements, shift the element indices of
      such controls up to 16.  Also, the conflict check is performed over
      all codecs found on the bus.
      
      HDMI devices will be put to dev=0,index=0 as before.  Only the
      conflicting SPDIF device is moved to a different place.  The new place
      of SPDIF device is supposed by the updated alsa-lib HDA-Intel.conf,
      respectively.
      Reported-by: NStephan Raue <stephan@openelec.tv>
      Reported-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Cc: <stable@vger.kernel.org> [v3.8]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ea9b43ad
  12. 08 2月, 2013 2 次提交
    • M
      ALSA: hda - Support rereading widgets under the function group · a15d05db
      Mengdong Lin 提交于
      A codec may allow software to hide some unused pin/cvt widgets.
      
      Sometimes BIOS does not enable the hidden widgets properly although they are
      needed for the board. Thus the driver need to enable them as a board-specific
      fixup and the whole tree will change.
      
      This patch implements a common code for rereading codec widgets. So the fixup
      code can call it after enabling the hidden widgets.
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a15d05db
    • T
      ALSA: hda - Remove limit of widget connections · 4eea3091
      Takashi Iwai 提交于
      Currently we set the max number of connections to be 32, but there
      seems codec that gives longer connection lists like AD1988, and we see
      errors in proc output and else.  (Though, in the case of AD1988, it's
      a list of all codecs connected to a single vendor widget, so this must
      be something fishy, but it's still valid from the h/w design POV.)
      
      This patch tries to remove this restriction.  For efficiency, we still
      use the fixed size array in the parser, but takes a dynamic array when
      the size is reported to be greater than that.
      
      Now the fixed array size is found only in patch_hdmi.c, but it should
      be fine, as the codec itself can't support so many pins.
      Reported-by: NRaymond Yau <superquad.vortex2@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4eea3091
  13. 25 1月, 2013 3 次提交
  14. 23 1月, 2013 1 次提交
    • T
      ALSA: hda - Fix inconsistent pin states after resume · 31614bb8
      Takashi Iwai 提交于
      The commit [26a6cb6c: ALSA: hda - Implement a poll loop for jacks as a
      module parameter] introduced the polling jack detection code, but it
      also moved the call of snd_hda_jack_set_dirty_all() in the resume path
      after resume/init ops call.  This caused a regression when the jack
      state has been changed during power-down (e.g. in the power save
      mode).  Since the driver doesn't probe the new jack state but keeps
      using the cached value due to no dirty flag, the pin state remains
      also as if the jack is still plugged.
      
      The fix is simply moving snd_hda_jack_set_dirty_all() to the original
      position.
      Reported-by: NManolo Díaz <diaz.manolo@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      31614bb8
  15. 22 1月, 2013 1 次提交
  16. 15 1月, 2013 1 次提交
  17. 12 1月, 2013 15 次提交
  18. 03 1月, 2013 1 次提交