1. 10 May, 2013 1 commit
  2. 07 May, 2013 1 commit
    • Wang YanQing's avatar
      ALSA: HDA: Fix Oops caused by dereference NULL pointer · 2195b063
      Wang YanQing authored
      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: Wang YanQing's avatarWang YanQing <udknight@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      2195b063
  3. 18 Apr, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Disable the sanity check in snd_hda_add_pincfg() · d5657ec9
      Takashi Iwai authored
      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: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      d5657ec9
  4. 17 Apr, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Don't call vmaster hook when bus->shutdown is set · 594813ff
      Takashi Iwai authored
      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: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      594813ff
  5. 04 Apr, 2013 1 commit
  6. 20 Mar, 2013 1 commit
  7. 13 Mar, 2013 2 commits
    • Takashi Iwai's avatar
      ALSA: hda - Don't apply EAPD power filter as default · ba615b86
      Takashi Iwai authored
      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: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      ba615b86
    • Takashi Iwai's avatar
  8. 12 Mar, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Fix snd_hda_get_num_raw_conns() to return a correct value · b5f82b10
      Takashi Iwai authored
      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: David Henningsson's avatarDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      b5f82b10
  9. 07 Mar, 2013 2 commits
  10. 12 Feb, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Fix broken workaround for HDMI/SPDIF conflicts · ea9b43ad
      Takashi Iwai authored
      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: default avatarStephan Raue <stephan@openelec.tv>
      Reported-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Cc: <stable@vger.kernel.org> [v3.8]
      Signed-off-by: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      ea9b43ad
  11. 08 Feb, 2013 1 commit
  12. 07 Feb, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Remove limit of widget connections · 4eea3091
      Takashi Iwai authored
      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: default avatarRaymond Yau <superquad.vortex2@gmail.com>
      Signed-off-by: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      4eea3091
  13. 24 Jan, 2013 3 commits
  14. 23 Jan, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Fix inconsistent pin states after resume · 31614bb8
      Takashi Iwai authored
      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: default avatarManolo Díaz <diaz.manolo@gmail.com>
      Signed-off-by: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      31614bb8
  15. 22 Jan, 2013 1 commit
  16. 15 Jan, 2013 1 commit
  17. 12 Jan, 2013 15 commits
  18. 03 Jan, 2013 1 commit
  19. 07 Dec, 2012 1 commit
  20. 30 Nov, 2012 1 commit
  21. 28 Nov, 2012 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Call snd_array_init() early and only once · 361dab3e
      Takashi Iwai authored
      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: Takashi Iwai's avatarTakashi Iwai <tiwai@suse.de>
      361dab3e
  22. 24 Nov, 2012 1 commit