1. 28 6月, 2013 1 次提交
  2. 10 5月, 2013 1 次提交
  3. 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
  4. 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
  5. 04 4月, 2013 1 次提交
  6. 20 3月, 2013 1 次提交
  7. 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
  8. 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
  9. 07 3月, 2013 2 次提交
  10. 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
  11. 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
  12. 25 1月, 2013 3 次提交
  13. 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
  14. 22 1月, 2013 1 次提交
  15. 15 1月, 2013 1 次提交
  16. 12 1月, 2013 15 次提交
  17. 03 1月, 2013 1 次提交
  18. 07 12月, 2012 1 次提交
  19. 01 12月, 2012 1 次提交
  20. 28 11月, 2012 1 次提交
    • T
      ALSA: hda - Call snd_array_init() early and only once · 361dab3e
      Takashi Iwai 提交于
      This is a preliminary patch for introducing a protection to access
      races of snd_array instances.  Call snd_array_init() appropriately
      at the initialization time and don't call it twice.
      
      Also the allocations of codec-spec structs are cleaned up by helper
      functions in patch_sigmatel.c and patch_analog.c.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      361dab3e