1. 18 10月, 2013 1 次提交
    • T
      ALSA: hda - Move mutex from hda_eld to per_pin in HDMI codec driver · a4e9a38b
      Takashi Iwai 提交于
      Since the lock is used primarily in patch_hdmi.c, it's better to move
      it in the local struct instead of exporting in hda_eld.  The only
      functions requiring the lock in hda_eld.c are proc accessors.  So in
      this patch, the proc entry and its creation/deletion/accessors are
      moved into patch_hdmi.c, together with the mutex lock to pin_spec
      struct.
      
      The former proc info functions are exported so that they can be called
      from patch_hdmi.c.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a4e9a38b
  2. 17 10月, 2013 1 次提交
  3. 19 6月, 2013 1 次提交
    • T
      ALSA: hda - Fix missing Mic Boost controls for VIA codecs · d045c5dc
      Takashi Iwai 提交于
      Some VIA codecs like VT1708S have Mic boost amps in the mic pins but
      they aren't exposed in the capability bits.  In the past driver code,
      we override the pin caps and create mic boost controls forcibly.
      While transition to the generic parser, we lost the mic boost controls
      although the pin caps are still overridden, because the generic parser
      code checks the widget caps, too.
      
      So this patch adds a new helper function to allow the override of the
      given widget capability bits, and makes VIA codecs driver to add the
      missing input-amp capability bit.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59861
      Cc: <stable@vger.kernel.org> [v3.9+]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d045c5dc
  4. 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
  5. 14 3月, 2013 1 次提交
    • 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
  6. 20 2月, 2013 2 次提交
  7. 25 1月, 2013 1 次提交
  8. 24 1月, 2013 1 次提交
  9. 22 1月, 2013 1 次提交
  10. 12 1月, 2013 9 次提交
    • T
      ALSA: hda - Add snd_hda_get_int_hint() helper function · bc759721
      Takashi Iwai 提交于
      It'll be used in hda_generic.c, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bc759721
    • T
      ALSA: hda - Add a new fixup type to override pinctl values · fd108215
      Takashi Iwai 提交于
      Add a new fixup type, HDA_FIXUP_PINCTLS, for overriding the pinctl
      values of the given pins.  It takes the same array of struct pintbl
      like HDA_FIXUP_PINS, but each entry contains the pinctl value instead
      of the pin default config value.
      
      This patch also replaces the corresponding codes in patch_realtek.c.
      Without this change, the direct call of verbs may be overridden again
      by the later call of pinctl restoration by the driver.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fd108215
    • T
      ALSA: hda - More strict correction of invalid pinctl bits · 62f3a2f7
      Takashi Iwai 提交于
      Check more strictly about the validity of pinctl values in
      snd_hda_set_pin_ctl() and correct the wrong bits automatically.
      Also provide the helper function to correct pinctl bits to codec
      drivers.
      
      This automatically fixes the invalid pinctl writes that are found in
      a few Realtek fixups for NID 0x0f amp like ASUS A6Rp.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      62f3a2f7
    • T
      ALSA: hda - Add helper functions to cache the current pinctl target · d7fdc00a
      Takashi Iwai 提交于
      We already have the list of whole pin widgets and there is an unused
      space in the list; let's use it for caching the current pinctl value.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d7fdc00a
    • T
      ALSA: hda - Add snd_hda_codec_flush_*_cache() aliases · 0c3d47b0
      Takashi Iwai 提交于
      It makes easier to understand although these are identical with
      snd_hda_codec_resume_*() functions.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0c3d47b0
    • T
      ALSA: hda - Move fixup code into struct hda_codec · c9ce6b26
      Takashi Iwai 提交于
      Since the fixup code is used commonly, it's worth to move it to the
      common place, struct hda_codec, instead of keeping in hda_gen_spec.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c9ce6b26
    • T
      ALSA: hda/realtek - Add path active flag · 130e5f06
      Takashi Iwai 提交于
      ... and rewrite the initialization of output paths as a generic
      function that is applicable for both i/o directions.
      
      The new flag, active, is introduced to each nid_path entry.  This
      indicates whether the given path is active, and it's used for checking
      whether a certain widget can be turned off or changed when a path is
      no longer used or newly enabled.
      
      It's still used only in the output paths.  More wider adaption for
      input and loopback paths will be achieved in the later patch.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      130e5f06
    • T
      ALSA: hda - Introduce snd_hda_codec_amp_init*() · 280e57d5
      Takashi Iwai 提交于
      The new function snd_hda_codec_amp_init() (and the stereo variant)
      initializes the amp value only once at the first access.  If the amp
      was already initialized or updated, this won't do anything more.
      
      It's useful for initializing the input amps that are in the part of
      the path but never used.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      280e57d5
    • T
      ALSA: hda - Introduce cache & flush cmd / amp writes · c370dd6e
      Takashi Iwai 提交于
      For optimizing the verb executions, a new mechanism to cache the verbs
      and amp update commands is introduced.  With the new "write to cache
      and flush" way, you can reduce the same verbs that have been written
      multiple times.
      
      When codec->cached_write flag is set, the further
      snd_hda_codec_write_cache() and snd_hda_codec_amp_stereo() calls will
      be performed only on the command or amp cache table, but not sent to
      the hardware yet.  Once after you call all commands and update amps,
      call snd_hda_codec_resume_amp() and snd_hda_codec_resume_cache().
      Then all cached writes and amp updates will be written to the
      hardware, and the dirty flags are cleared.
      
      In this implementation, the existing cache table is reused, so
      actually no big code change is seen here.  Each cache entry has a new
      dirty flag now (so the cache key is now reduced to 31bit).
      
      As a good side-effect by this change, snd_hda_codec_resume_*() will no
      longer execute verbs that have been already issued during the resume
      phase by checking the dirty flags.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c370dd6e
  11. 01 12月, 2012 1 次提交
  12. 17 10月, 2012 1 次提交
    • T
      ALSA: hda - Add workaround for conflicting IEC958 controls · dcda5806
      Takashi Iwai 提交于
      When both an SPDIF and an HDMI device are created on the same card
      instance, multiple IEC958 controls are created with indices=0, 1, ...
      But the alsa-lib configuration can't know which index corresponds
      actually to which PCM device, and both the SPDIF and the HDMI
      configurations point to the first IEC958 control wrongly.
      
      This patch introduces a (hackish and ugly) workaround: the IEC958
      controls for the SPDIF device are re-labeled with device=1 when HDMI
      coexists.  The device=1 corresponds to the actual PCM device for
      SPDIF, so it's anyway a better representation.  In future, HDMI
      controls should be moved with the corresponding PCM device number,
      too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      dcda5806
  13. 30 8月, 2012 1 次提交
  14. 04 7月, 2012 1 次提交
  15. 09 5月, 2012 1 次提交
  16. 20 4月, 2012 2 次提交
    • T
      ALSA: hda - Add snd_hda_get_default_vref() helper function · 4740860b
      Takashi Iwai 提交于
      Add a new helper function to guess the default VREF pin control bits
      for mic in.  This can be used to set the pin control value safely
      matching with the actual pin capabilities.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4740860b
    • T
      ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functions · cdd03ced
      Takashi Iwai 提交于
      For setting the pin-control values more safely to match with the
      actual pin capability bits, a copule of new helper functions,
      snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are
      introduced.  These are simple replacement of the codec verb write with
      AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out
      superfluous pin-control bits if they don't fit with the corresponding
      pin capabilities.
      
      Some codecs are screwed up or ignore the command when such a wrong bit
      is set.  These helpers will avoid such secret errors.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      cdd03ced
  17. 13 3月, 2012 2 次提交
  18. 12 3月, 2012 1 次提交
  19. 10 3月, 2012 1 次提交
    • T
      ALSA: hda - Initialize vmaster slave volumes · 18478e8b
      Takashi Iwai 提交于
      When the driver is changed to use vmaster or a new slave element is
      added by the improvement of the parser code, user may face often the
      silent output because of the muted slave mixer although Master volume
      is properly set.  And they complain.  And I get upset.
      
      Although such a mixer element should be initialized via "alsactl init",
      it'd be more user-friendly if the known output slaves are unmuted and
      set to 0dB so that user can control the volume only with Master as
      default.  Since Master is still set muted as default even with this
      change, no risk of the speaker blow up, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      18478e8b
  20. 03 2月, 2012 1 次提交
    • T
      ALSA: hda - Add suffix argument to snd_hda_add_vmaster() · 9322ca54
      Takashi Iwai 提交于
      In most cases, the slave strings for vmaster are identical between
      volumes and switches except for "xxx Volume" and "xxx Switch" suffix.
      Now snd_hda_add_vmaster() takes the optional suffix argument so that
      each string can be composed with the given suffix, and we can share the
      slave name strings in both volume and switch calls nicely.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9322ca54
  21. 10 1月, 2012 1 次提交
  22. 02 12月, 2011 1 次提交
    • T
      ALSA: hda - Integrate input-jack stuff into kctl-jack · 31ef2257
      Takashi Iwai 提交于
      Instead of managing input-jack stuff separately, call all stuff inside
      the kctl-jack creation, deletion and report.  The caller no longer needs
      to care about input-jack.
      
      The better integration between input-jack and kctl-jack should be done
      in the upper layer in near future, but for now, it's implemented locally
      for more tests.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      31ef2257
  23. 16 11月, 2011 5 次提交
  24. 10 11月, 2011 1 次提交
    • T
      ALSA: hda - Re-enable the check NO_PRESENCE misc bit · 2f451d2a
      Takashi Iwai 提交于
      We disabled the check of NO_PRESENCE bit of the default pin-config
      in commit f4419172 temporarily.  One problem was that the first
      implementation was wrong -- the bit after the shift must be checked.
      However, this would still give many regressions on machines with broken
      BIOS.  They set this bit wrongly even on active pins.
      
      A workaround is to check whether all pins contain this bit.  As far as
      I've checked, broken BIOSen set this bit on all pins, no matter whether
      active or not.  In such a case, the driver should ignore this bit check.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2f451d2a
  25. 06 11月, 2011 1 次提交
    • T
      ALSA: hda - Revert the check of NO_PRESENCE pincfg default bit · f4419172
      Takashi Iwai 提交于
      The implementation on commit [08a1f5eb: ALSA: hda - Check NO_PRESENCE
      pincfg default bit] seems like a mis-interpretation of specification.
      The spec gives the reversed bit definition.  But, following the spec
      also causes to change so many existing device configurations, thus we
      can't change it so easily for now.  For 3.2-rc1, it's safer to revert
      this check (actually this patch comments out the code).
      
      We may re-introduced the fixed version once after the wider test-case
      coverages are done.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f4419172