1. 26 5月, 2014 1 次提交
  2. 25 2月, 2014 3 次提交
    • T
      ALSA: hda - Enable sysfs attributes without CONFIG_SND_HDA_RECONFIG · b989d044
      Takashi Iwai 提交于
      Some sysfs attributes like init_pin_configs or vendor_name are really
      basic and should be available no matter whether the codec driver is
      re-configurable or not.  Put them out of #ifdef
      CONFIG_SND_HDA_RECONFIG and allow the read-only accesses.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b989d044
    • T
      ALSA: hda - Add sysfs to codec object, too · 648a8d27
      Takashi Iwai 提交于
      We have currently sysfs attributes for each hwdep, but basically these
      should belong to the codec itself, per se.  Let's add them to the
      codec object while keeping them for hwdep as is for compatibility.
      
      While we are at it, split the sysfs-related stuff into a separate
      source file, hda_sysfs.c, and keep only the stuff necessary for hwdep
      in hda_hwdep.c.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      648a8d27
    • T
      ALSA: hda - Create own device struct for each codec · 13aeaf68
      Takashi Iwai 提交于
      As the HD-audio is treated individually in each codec driver, it's
      more convenient to assign an own struct device to each codec object.
      Then we'll be able to use dev_err() more easily for each codec, for
      example.
      
      For achieving it, this patch just creates an object "hdaudioCxDy".
      It belongs to sound class instead of creating a new bus, just for
      simplicity, at this stage.  No pm ops is implemented in the device
      struct level but currently it's merely a container.  The PCM and hwdep
      devices are now children of this codec device.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      13aeaf68
  3. 29 1月, 2014 1 次提交
  4. 19 12月, 2013 1 次提交
    • T
      ALSA: hda - Make CONFIG_SND_HDA_CODEC_* tristate · 595fe1b7
      Takashi Iwai 提交于
      So far, CONFIG_SND_HDA_CODEC_* kconfigs have been booleans due to
      historical reasons.  The major reason was that the automatic codec
      driver probing wouldn't work if user sets a codec driver as a module
      while the controller driver as a built-in.  And, another reason was to
      avoid exporting symbols of the helper codes when all drivers are built
      in.
      
      But, this sort of "kindness" rather confuses people in the end,
      especially makes the config refinement via localmodconfig unhappy.
      Also, a codec module would still work if you re-bind the controller
      driver via sysfs (although it's no automatic loading), so there might
      be a slight use case.
      
      That said, better to let people fallen into a pitfall than being too
      smart and restrict something.  Let's make things straightforward: now
      all CONFIG_SND_HDA_CODEC_* become tristate, and all symbols exported
      unconditionally.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      595fe1b7
  5. 10 12月, 2013 1 次提交
  6. 06 12月, 2013 1 次提交
  7. 29 11月, 2013 1 次提交
  8. 27 11月, 2013 2 次提交
    • M
      ALSA: hda - resume codecs in parallel · 12edb893
      Mengdong Lin 提交于
      To reduce driver resume time, this patch resumes the codecs in parallel
      if there are multiple codecs on the bus.
      
      - The PM workqueue of bus is also used to parallel resuming multiple codecs.
      - The work item 'pm_work' is renamed to 'suspend_work' to parallel suspending
        codecs.
      - Add a work item 'resume_work' to parallel resuming codecs.
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      12edb893
    • M
      ALSA: hda - suspend codecs in parallel · 0e24dbb7
      Mengdong Lin 提交于
      The time to suspend a single codec may be several hundreds of ms. When runtime
      power saving is disabled, driver suspend time can be long especially when there
      are more than one codec on the bus.
      
      To reduce driver suspend time, this patch creates a work queue for the bus, and
      suspends the codecs in parallel if there are multiple codecs on the bus.
      
      [fixed cosmetic issues by tiwai]
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0e24dbb7
  9. 26 11月, 2013 3 次提交
  10. 24 10月, 2013 1 次提交
    • T
      ALSA: hda - Fix mute LED on HP laptops in runtime suspend · 95f74c41
      Takashi Iwai 提交于
      When HP laptops with mute and mic-record LEDs go to runtime suspend,
      these LEDs are turned on forcibly no matter whether GPIO pis are on or
      off.  This strange behavior seems triggered by resetting the HD-audio
      bus link at azx_rutime_suspend().  So, just add a new hda_bus flag to
      avoid the link reset at runtime suspend and set it for these HP
      machines.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      95f74c41
  11. 27 8月, 2013 2 次提交
  12. 06 6月, 2013 2 次提交
    • 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
  13. 05 4月, 2013 1 次提交
  14. 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
  15. 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
  16. 25 1月, 2013 1 次提交
    • T
      ALSA: hda - Add power state filtering · 9419ab6b
      Takashi Iwai 提交于
      Add a hook to struct hda_codec for filtering the target power state of
      each widget when powering up/down.  The current hackish EAPD check is
      implemented as the default hook pointer, too.
      
      This allows codec drivers to implement own power filter.  In the
      upcoming changes, the generic parser will have the better power filter
      based on the active paths.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9419ab6b
  17. 22 1月, 2013 1 次提交
  18. 12 1月, 2013 8 次提交
  19. 28 11月, 2012 2 次提交
  20. 19 11月, 2012 1 次提交
  21. 09 11月, 2012 1 次提交
  22. 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
  23. 15 10月, 2012 1 次提交
  24. 07 9月, 2012 1 次提交