An error occurred fetching the project authors.
  1. 26 Jan, 2015 1 commit
  2. 29 Nov, 2013 2 commits
    • Takashi Iwai's avatar
      ALSA: hda - Fix unbalanced runtime PM notification at resume · 030d2a71
      Takashi Iwai authored
      commit 0fc28fc0 upstream.
      
      When a codec is resumed, it keeps the power on while the resuming
      phase via hda_keep_power_on(), then turns down via
      snd_hda_power_down().  At that point, snd_hda_power_down() notifies
      the power down to the controller, and this may confuse the refcount if
      the codec was already powered up before the resume.
      
      In the end result, the controller goes to runtime suspend even before
      the codec is kicked off to the power save, and the communication
      stalls happens.
      
      The fix is to add the power-up notification together with
      hda_keep_power_on(), and clears the flag appropriately.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      030d2a71
    • Takashi Iwai's avatar
      ALSA: hda - Don't clear the power state at snd_hda_codec_reset() · b2f7d06d
      Takashi Iwai authored
      commit d183b4fc upstream.
      
      snd_hda_codec_reset() is called either in resetting the whole setup at
      error paths or hwdep clear/reconfig sysfs triggers.  But all of these
      don't assume that the power has to be off, rather they want to keep
      the power state unchanged (e.g. reconfig_codec() calls the power
      up/down by itself).  Thus, unconditionally clearing the power state in
      snd_hda_codec_reset() leads to the inconsistency, confuses the further
      operation.   This patch gets rid of the lines doing that bad thing.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2f7d06d
  3. 24 Oct, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Fix unbalanced runtime PM refcount after S3/S4 · e6bbe666
      Takashi Iwai authored
      When a machine goes to S3/S4 after power-save is enabled, the runtime
      PM refcount might be incorrectly decreased because the power-down
      triggered soon after resume assumes that the controller was already
      powered up, and issues the pm_notify down.
      
      This patch fixes the incorrect pm_notify call simply by checking the
      current value properly.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e6bbe666
  4. 27 Aug, 2013 1 commit
  5. 29 Jul, 2013 1 commit
    • Wang Xingchao's avatar
      ALSA: hda - jack poll once if jackpoll_interval==0 · 18e60627
      Wang Xingchao authored
      With jackpoll_interval != 0, it's used to poll jack event periodically
      in a delayed work. if it's 0, give the caller chance to probe jack status
      but will not restart the delayed work.
      
      In the next patch which enable WAKEEN feature, HDA controller was able to wake
      up system when it's in D3, it's useful to detect Jack hotplug event and notify
      userspace. By default the jackpoll_interval=0, this patch let jack poll once
      without starting the delayed work.
      Signed-off-by: default avatarWang Xingchao <xingchao.wang@linux.intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      18e60627
  6. 28 Jun, 2013 1 commit
  7. 06 Jun, 2013 3 commits
    • Takashi Iwai's avatar
      ALSA: hda - Don't take unresponsive D3 transition too serious · 63e51fd7
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      63e51fd7
    • Takashi Iwai's avatar
      ALSA: hda - Introduce bit flags to snd_hda_codec_read/write() · e7ecc27e
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      e7ecc27e
    • Takashi Iwai's avatar
      ALSA: hda - Drop hard dependency on CONFIG_SND_DYNAMIC_MINORS · 36bb00d4
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      36bb00d4
  8. 10 May, 2013 1 commit
  9. 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: default avatarWang YanQing <udknight@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2195b063
  10. 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: default avatarTakashi Iwai <tiwai@suse.de>
      d5657ec9
  11. 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: default avatarTakashi Iwai <tiwai@suse.de>
      594813ff
  12. 04 Apr, 2013 1 commit
  13. 20 Mar, 2013 1 commit
  14. 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: default avatarTakashi Iwai <tiwai@suse.de>
      ba615b86
    • Takashi Iwai's avatar
  15. 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: default avatarDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b5f82b10
  16. 07 Mar, 2013 2 commits
  17. 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: default avatarTakashi Iwai <tiwai@suse.de>
      ea9b43ad
  18. 08 Feb, 2013 1 commit
  19. 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: default avatarTakashi Iwai <tiwai@suse.de>
      4eea3091
  20. 24 Jan, 2013 3 commits
  21. 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: default avatarTakashi Iwai <tiwai@suse.de>
      31614bb8
  22. 22 Jan, 2013 1 commit
  23. 15 Jan, 2013 1 commit
  24. 12 Jan, 2013 10 commits