An error occurred fetching the project authors.
  1. 03 Mar, 2015 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Implement unbind more safely · 9a6246ff
      Takashi Iwai authored
      Now we have all pieces ready, and put them into places:
      - add the hda_pcm refcount to azx_pcm_open() and azx_pcm_close(),
      - call the most of cleanup code in hda_codec_reset() from the codec
        driver remove,
      - call the same code also from the hda_codec object free.
      
      Then the codec driver can be unbound more safely now.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9a6246ff
  2. 26 Feb, 2015 1 commit
  3. 23 Feb, 2015 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Bind codecs via standard bus · d8a766a1
      Takashi Iwai authored
      Now we create the standard HD-audio bus (/sys/bus/hdaudio), and bind
      the codec driver with the codec device over there.  This is the first
      step of the whole transition so that the changes to each codec driver
      are kept as minimal as possible.
      
      Each codec driver needs to register hda_codec_driver struct containing
      the currently existing preset via the new helper macro
      module_hda_codec_driver().  The old hda_codec_preset_list is replaced
      with this infrastructure.  The generic parsers (for HDMI and other)
      are also included in the preset with the special IDs to bind
      uniquely.
      
      In HD-audio core side, the device binding code is split to
      hda_bind.c.  It provides the snd_hda_bus_type implementation to match
      the codec driver with the given codec vendor ID.  It also manages the
      module auto-loading by itself like before: when the matching isn't
      found, it tries to probe the corresponding codec modules, and finally
      falls back to the generic drivers.  (The special ID mentioned above is
      set at this stage.)
      
      The only visible change to outside is that the hdaudio sysfs entry now
      appears in /sys/bus/devices, not as a sound class device.
      
      More works to move the suspend/resume and remove ops will be
      (hopefully) done in later patches.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d8a766a1
  4. 17 Feb, 2015 1 commit
  5. 24 Oct, 2014 1 commit
  6. 23 Sep, 2014 1 commit
  7. 19 Aug, 2014 1 commit
  8. 22 Jul, 2014 1 commit
  9. 25 Jun, 2014 2 commits
  10. 24 Jun, 2014 1 commit
  11. 26 May, 2014 1 commit
  12. 25 Feb, 2014 3 commits
    • Takashi Iwai's avatar
      ALSA: hda - Replace with standard printk · 4e76a883
      Takashi Iwai authored
      Use dev_err() and co for messages from HD-audio controller and codec
      drivers.  The codec drivers are mostly bound with codec objects, so
      some helper macros, codec_err(), codec_info(), etc, are provided.
      They merely wrap the corresponding dev_xxx().
      
      There are a few places still calling snd_printk() and its variants
      as they are called without the codec or device context.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4e76a883
    • Takashi Iwai's avatar
      ALSA: hda - Add sysfs to codec object, too · 648a8d27
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      648a8d27
    • Takashi Iwai's avatar
      ALSA: Create sysfs attribute files via groups · caa751ba
      Takashi Iwai authored
      Instead of calling each time device_create_file(), create the groups
      of sysfs attribute files at once in a normal way.  Add a new helper
      function, snd_get_device(), to return the associated device object,
      so that we can handle the sysfs addition locally.
      
      Since the sysfs file addition is done differently now,
      snd_add_device_sysfs_file() helper function is removed.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      caa751ba
  13. 26 Nov, 2013 2 commits
  14. 24 Oct, 2013 1 commit
    • Anssi Hannula's avatar
      ALSA: hda - hdmi: Add ELD emulation for ATI/AMD codecs · 89250f84
      Anssi Hannula authored
      ATI/AMD HDMI/DP codecs do not include standard HDA ELD (EDID-like data)
      support.
      
      In place of providing access to an ELD buffer, various vendor-specific
      verbs are provided to provide the relevant information. Revision ID 3
      and later (0x100300 as reported by procfs codec#X) have support for
      providing more information than the previous revisions (but only if
      supported by the display driver).
      
      Generate ELD from the information provided by the vendor-specific verbs
      on ATI/AMD codecs.
      
      The specification is available at:
      http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf
      
      v2: moved code to hda_eld.c and cleaned it up
      v3: adapted to hdmi_ops infrastructure
      Signed-off-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Tested-by: Peter Frühberger <fritsch@xbmc.org> # v2
      Tested-by: Olivier Langlois <olivier@trillion01.com> # v2
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      89250f84
  15. 17 Oct, 2013 2 commits
  16. 19 Jun, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Fix missing Mic Boost controls for VIA codecs · d045c5dc
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      d045c5dc
  17. 18 Jun, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Fix return value of snd_hda_check_power_state() · 06ec56d3
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      06ec56d3
  18. 13 Mar, 2013 1 commit
    • 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
  19. 19 Feb, 2013 2 commits
  20. 24 Jan, 2013 1 commit
  21. 23 Jan, 2013 1 commit
  22. 22 Jan, 2013 1 commit
  23. 12 Jan, 2013 9 commits
    • Takashi Iwai's avatar
      ALSA: hda - Add snd_hda_get_int_hint() helper function · bc759721
      Takashi Iwai authored
      It'll be used in hda_generic.c, too.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      bc759721
    • Takashi Iwai's avatar
      ALSA: hda - Add a new fixup type to override pinctl values · fd108215
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      fd108215
    • Takashi Iwai's avatar
      ALSA: hda - More strict correction of invalid pinctl bits · 62f3a2f7
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      62f3a2f7
    • Takashi Iwai's avatar
      ALSA: hda - Add helper functions to cache the current pinctl target · d7fdc00a
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      d7fdc00a
    • Takashi Iwai's avatar
      ALSA: hda - Add snd_hda_codec_flush_*_cache() aliases · 0c3d47b0
      Takashi Iwai authored
      It makes easier to understand although these are identical with
      snd_hda_codec_resume_*() functions.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0c3d47b0
    • Takashi Iwai's avatar
      ALSA: hda - Move fixup code into struct hda_codec · c9ce6b26
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      c9ce6b26
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Add path active flag · 130e5f06
      Takashi Iwai authored
      ... 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: default avatarTakashi Iwai <tiwai@suse.de>
      130e5f06
    • Takashi Iwai's avatar
      ALSA: hda - Introduce snd_hda_codec_amp_init*() · 280e57d5
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      280e57d5
    • Takashi Iwai's avatar
      ALSA: hda - Introduce cache & flush cmd / amp writes · c370dd6e
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      c370dd6e
  24. 30 Nov, 2012 1 commit
  25. 17 Oct, 2012 1 commit
    • Takashi Iwai's avatar
      ALSA: hda - Add workaround for conflicting IEC958 controls · dcda5806
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      dcda5806
  26. 30 Aug, 2012 1 commit