1. 02 9月, 2015 1 次提交
  2. 25 8月, 2015 1 次提交
    • T
      ALSA: hda - Refresh sysfs at snd_hda_codec_update_widgets() · 9dcc144b
      Takashi Iwai 提交于
      In the commit [fa4f18b4: ALSA: hda - Refresh widgets sysfs at
      probing Haswell+ HDMI codecs], snd_hdac_refresh_widget_sysfs() is
      explicitly called in the codec driver.  But this results in refreshing
      twice, as snd_hdac_refresh_widget_sysfs() itself calls
      snd_hdac_refresh_widgets() function.
      
      Instead, we can replace the call in snd_hda_codec_update_widgets()
      with snd_hdac_refresh_widget_sysfs().  This also fixes the missing
      sysfs update for ca0132, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9dcc144b
  3. 21 8月, 2015 1 次提交
  4. 21 7月, 2015 1 次提交
  5. 06 7月, 2015 1 次提交
  6. 29 6月, 2015 1 次提交
  7. 09 6月, 2015 1 次提交
  8. 03 6月, 2015 1 次提交
  9. 28 5月, 2015 1 次提交
  10. 18 5月, 2015 4 次提交
  11. 11 5月, 2015 1 次提交
  12. 29 4月, 2015 1 次提交
  13. 28 4月, 2015 1 次提交
  14. 24 4月, 2015 1 次提交
    • T
      ALSA: core: Remove child proc file elements recursively · c560a679
      Takashi Iwai 提交于
      This patch changes the way to manage the resource release of proc
      files: namely, let snd_info_free_entry() freeing the whole children.
      
      This makes it us possible to drop the snd_device_*() management.  Then
      snd_card_proc_new() becomes merely a wrapper to
      snd_info_create_card_entry().
      
      Together with this change, now you need to call snd_info_free_entry()
      for a proc entry created via snd_card_proc_new(), while it was freed
      via snd_device_free() beforehand.
      Acked-by: NJaroslav Kysela <perex@perex.cz>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c560a679
  15. 08 4月, 2015 1 次提交
    • T
      ALSA: hda - Work around races of power up/down with runtime PM · 664c7155
      Takashi Iwai 提交于
      Currently, snd_hdac_power_up()/down() helpers checks whether the codec
      is being in pm (suspend/resume), and skips the call of runtime get/put
      during it.  This is needed as there are lots of power up/down
      sequences called in the paths that are also used in the PM itself.  An
      example is found in hda_codec.c::codec_exec_verb(), where this can
      power up the codec while it may be called again in its power up
      sequence, too.
      
      The above works in most cases, but sometimes we really want to wait
      for the real power up.  For example, the control element get/put may
      want explicit power up so that the value change is assured to reach to
      the hardware.   Using the current snd_hdac_power_up(), however,
      results in a race, e.g. when it's called during the runtime suspend is
      being performed.  In the worst case, as found in patch_ca0132.c, it
      can even lead to the deadlock because the code assumes the power up
      while it was skipped due to the check above.
      
      For dealing with such cases, this patch makes snd_hdac_power_up() and
      _down() to two variants: with and without in_pm flag check.  The
      version with pm flag check is named as snd_hdac_power_up_pm() while
      the version without pm flag check is still kept as
      snd_hdac_power_up().  (Just because the usage of the former is fewer.)
      
      Then finally, the patch replaces each call potentially done in PM with
      the new _pm() variant.
      
      In theory, we can implement a unified version -- if we can distinguish
      the current context whether it's in the pm path.  But such an
      implementation is cumbersome, so leave the code like this a bit messy
      way for now...
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96271Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      664c7155
  16. 23 3月, 2015 3 次提交
    • T
      ALSA: hda - Use regmap for command verb caches, too · a551d914
      Takashi Iwai 提交于
      Like the previous patches, this patch converts also to the regmap, at
      this time, the cached verb writes are the target.  But this conversion
      needs a bit more caution than before.
      
      - In the old code, we just record any verbs as is, and restore them at
        resume.  For the regmap scheme, this doesn't work, since a few verbs
        like AMP or DIGI_CONVERT are asymmetrical.  Such verbs are converted
        either to the dedicated function (snd_hda_regmap_xxx_amp()) or
        changed to the unified verb.
      
      - Some verbs have to be declared as vendor-specific ones before
        accessing via regmap.
      
      Also, the minor optimization with codec->cached_write flag is dropped
      in a few places, as this would confuse the operation.  Further
      optimizations will be brought in the later patches, if any.
      
      This conversion ends up with a drop of significant amount of codes,
      mostly the helper codes that are no longer used.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a551d914
    • T
      ALSA: hda - Use regmap for amp accesses · eeecd9d1
      Takashi Iwai 提交于
      This patch converts the amp access functions to the regmap helpers.
      The amp values were formerly cached in the own hash table.  Now it's
      dropped by the regmap's cache.
      
      The only tricky conversion is snd_hda_codec_amp_init().  This function
      shouldn't do anything if the amp was already initialized.  For
      achieving this behavior, a value is read once at first temporarily in
      the cache-only mode.  Only if it returns an error,  i.e. the item
      still doesn't exist in the cache, it proceeds to the update.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      eeecd9d1
    • T
      ALSA: hda - Move a part of hda_codec stuff into hdac_device · 7639a06c
      Takashi Iwai 提交于
      Now some codes and functionalities of hda_codec struct are moved to
      hdac_device struct.  A few basic attributes like the codec address,
      vendor ID number, FG numbers, etc are moved to hdac_device, and they
      are accessed like codec->core.addr.  The basic verb exec functions are
      moved, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7639a06c
  17. 03 3月, 2015 3 次提交
    • T
      ALSA: hda - Use standard workqueue for unsol and jack events · 2f35c630
      Takashi Iwai 提交于
      The events that are handled by HD-audio drivers are no frequent and
      urgent ones, so we can use the standard workqueue without any problem
      nowadays.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2f35c630
    • T
      ALSA: hda - Allocate hda_pcm objects dynamically · bbbc7e85
      Takashi Iwai 提交于
      So far, the hda_codec object kept the hda_pcm list in an array, and
      the codec driver was expected to assign the array.  However, this
      makes the object life cycle management harder, because the assigned
      array is freed at the codec driver detach while it might be still
      accessed by the opened streams.
      
      In this patch, we allocate each hda_pcm object dynamically and manage
      it as a linked list.  Each object has a kref refcount, and both the
      codec driver binder and the PCM open/close touches it, so that the
      object won't be freed while in use.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bbbc7e85
    • T
      ALSA: hda - Add card field to hda_codec struct · 6efdd851
      Takashi Iwai 提交于
      Allow the codec object to have an individual card pointer.  Not only
      this simplifies the redirections in many places, also this will allow
      us to make each codec assigned to a different card object.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6efdd851
  18. 23 2月, 2015 1 次提交
    • T
      ALSA: hda - Bind codecs via standard bus · d8a766a1
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      d8a766a1
  19. 07 1月, 2015 1 次提交
  20. 16 12月, 2014 1 次提交
  21. 15 12月, 2014 1 次提交
  22. 20 10月, 2014 1 次提交
    • A
      ALSA: hda - hdmi: Fix missing ELD change event on plug/unplug · 6acce400
      Anssi Hannula 提交于
      The ELD ALSA control change event is sent by hdmi_present_sense() when
      eld_changed is true.
      
      Currently, it is only true when the ELD buffer contents have been
      modified. However, the user-visible ELD controls also change to a
      zero-length value and back when eld_valid is unset/set, and no event is
      currently sent in such cases (such as when unplugging or replugging a
      sink).
      
      Fix the code to always set eld_changed if eld_valid value is changed,
      and therefore to always send the change event when the user-visible
      value changes.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Cc: David Henningsson <david.henningsson@canonical.com>
      Cc: <stable@vger.kernel.org> # 3.9+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6acce400
  23. 16 9月, 2014 1 次提交
    • T
      ALSA: hda - Allow multiple callbacks for jack · 1a4f69d5
      Takashi Iwai 提交于
      So far, hda_jack infrastructure allows only one callback per jack, and
      this makes things slightly complicated when a driver wants to assign
      multiple tasks to a jack, e.g. the standard auto-mute with a power
      up/down sequence.  This can be simplified if the hda_jack accepts
      multiple callbacks.
      
      This patch is such an extension: the callback-specific part (the
      function and private_data) is split to another struct from
      hda_jack_tbl, and multiple such objects can be assigned to a single
      hda_jack_tbl entry.
      
      The new struct hda_jack_callback is passed to each callback function
      now, thus the patch became bigger than expected.  But these changes
      are mostly trivial.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1a4f69d5
  24. 11 9月, 2014 1 次提交
    • T
      ALSA: hda - Get rid of action field from struct hda_jack_tbl · 62f949bf
      Takashi Iwai 提交于
      The action value assigned to each hda_jack_tbl entry is mostly
      superfluous.  The actually used values are either the widget NID or a
      value specific to the callback.
      
      The former case can be simply replaced by a reference to widget NID
      itself.  The only place doing the latter is STAC/IDT codec driver for
      the powermap handling.  But, the code doesn't need to check the action
      field at all -- the function jack_update_power() is called either with
      a specific pin or with NULL.  So the check of jack->action can be
      removed completely there, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      62f949bf
  25. 19 8月, 2014 2 次提交
  26. 04 8月, 2014 1 次提交
  27. 08 7月, 2014 1 次提交
  28. 25 6月, 2014 1 次提交
  29. 23 6月, 2014 1 次提交
  30. 12 6月, 2014 1 次提交
    • M
      ALSA: hda - verify pin:converter connection on unsol event for HSW and VLV · b4f75aea
      Mengdong Lin 提交于
      This patch will verify the pin's coverter selection for an active stream
      when an unsol event reports this pin becomes available again after a display
      mode change or hot-plug event.
      
      For Haswell+ and Valleyview: display mode change or hot-plug can change the
      transcoder:port connection and make all the involved audio pins share the 1st
      converter. So the stream using 1st convertor will flow to multiple pins
      but active streams using other converters will fail. This workaround
      is to assure the pin selects the right conveter and an assigned converter is
      not shared by other unused pins.
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b4f75aea
  31. 20 5月, 2014 1 次提交
  32. 13 5月, 2014 1 次提交