1. 29 8月, 2018 1 次提交
  2. 21 6月, 2018 1 次提交
  3. 16 8月, 2017 1 次提交
  4. 23 5月, 2017 1 次提交
  5. 14 2月, 2017 1 次提交
  6. 09 2月, 2016 1 次提交
    • T
      ALSA: hda - Fix bad dereference of jack object · 2ebab40e
      Takashi Iwai 提交于
      The hda_jack_tbl entries are managed by snd_array for allowing
      multiple jacks.  It's good per se, but the problem is that struct
      hda_jack_callback keeps the hda_jack_tbl pointer.  Since snd_array
      doesn't preserve each pointer at resizing the array, we can't keep the
      original pointer but have to deduce the pointer at each time via
      snd_array_entry() instead.  Actually, this resulted in the deference
      to the wrong pointer on codecs that have many pins such as CS4208.
      
      This patch replaces the pointer to the NID value as the search key.
      As an unexpected good side effect, this even simplifies the code, as
      only NID is needed in most cases.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2ebab40e
  7. 21 11月, 2015 1 次提交
  8. 05 11月, 2015 1 次提交
  9. 20 10月, 2015 1 次提交
    • T
      ALSA: hda - convert to hda_device_id · b9a94a9c
      Takashi Iwai 提交于
      Finally we have a proper infrastructure to generate the modaliases
      automatically, let's move to hda_device_id from the legacy
      hda_codec_preset that contains basically the same information.
      
      The patch function hook is stored in driver_data field, which is long,
      and we need an explicit cast.  Other than that, the conversion is
      mostly straightforward.  Each entry is even simplified using a macro,
      and the lengthy (and error-prone) manual modaliases got removed.
      
      As a result, we achieved a quite good diet:
       14 files changed, 407 insertions(+), 595 deletions(-)
      Reviewed-by: NVinod Koul <vinod.koul@intel.com>
      Tested-by: NSubhransu S Prusty <subhransu.s.prusty@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b9a94a9c
  10. 05 10月, 2015 1 次提交
  11. 27 7月, 2015 1 次提交
  12. 15 6月, 2015 1 次提交
    • H
      ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine · 6ab42ff4
      Hui Wang 提交于
      On a HP Envy TouchSmart laptop, there are 2 speakers (main speaker
      and subwoofer speaker), 1 headphone and 2 DACs, without this fixup,
      the headphone will be assigned to a DAC and the 2 speakers will be
      assigned to another DAC, this assignment makes the surround-2.1
      channels invalid.
      
      To fix it, here using a DAC/pin preference map to bind the main
      speaker to 1 DAC and the subwoofer speaker will be assigned to another
      DAC.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NHui Wang <hui.wang@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6ab42ff4
  13. 29 5月, 2015 1 次提交
  14. 28 5月, 2015 2 次提交
  15. 27 5月, 2015 1 次提交
  16. 23 3月, 2015 2 次提交
    • 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 - 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. 21 3月, 2015 2 次提交
  18. 18 3月, 2015 1 次提交
    • T
      ALSA: hda - Support advanced power state controls · e6feb5d0
      Takashi Iwai 提交于
      This patch enables the finer power state control of each widget
      depending on the jack plug state and streaming state in addition to
      the existing power_down_unused power optimization.  The new feature is
      enabled only when codec->power_mgmt flag is set.
      
      Two new flags, pin_enabled and stream_enabled, are introduced in
      nid_path struct for marking the two individual power states: the pin
      plug/unplug and DAC/ADC stream, respectively.  They can be set
      statically in case they are static routes (e.g. some mixer paths),
      too.
      
      The power up and down events for each pin are triggered via the
      standard hda_jack table.  The call order is hard-coded, relying on the
      current implementation of jack event chain (a la FILO/stack order).
      
      One point to be dealt carefully is that DAC/ADC cannot be powered
      on/off while streaming.  They are pinned as long as the stream is
      running.  For controlling the power of DAC/ADC, a new patch_ops is
      added.  The generic parser provides the default callback for that.
      
      As of this patch, only IDT/Sigmatel codec driver enables the flag.
      The support on other codecs will follow.
      
      An assumption we made in this code is that the widget state (e.g. amp,
      pinctl, connections) remains after the widget power transition (not
      about FG power transition).  This is true for IDT codecs, at least.
      But if the widget state is lost at widget power transition, we'd need
      to implement additional code to sync the cached amp/verbs for the
      specific NID.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e6feb5d0
  19. 26 2月, 2015 1 次提交
    • T
      ALSA: hda - Replace bus pm_notify with the standard runtime PM framework · 55ed9cd1
      Takashi Iwai 提交于
      Now the final bit of runtime PM cleanup: instead of manual
      notification of the power up/down of the codec via hda_bus pm_notify
      ops, use the standard runtime PM feature.
      
      The child codec device will kick off the runtime PM of the parent
      (PCI) device upon suspend/resume automatically.  For managing whether
      the link can be really turned off, we use the bit flags
      bus->codec_powered instead of the earlier bus->power_keep_link_on.
      flag.  Each codec driver is responsible to set/clear the bit flag, and
      the controller device can be turned off only when all these bits are
      cleared.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      55ed9cd1
  20. 23 2月, 2015 2 次提交
    • 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
    • T
      ALSA: hda - Add pin configs for ASUS mobo with IDT 92HD73XX codec · 6426460e
      Takashi Iwai 提交于
      BIOS doesn't seem to set up pins for 5.1 and the SPDIF out, so we need
      to give explicitly here.
      Reported-and-tested-by: NMisan Thropos <misanthropos@gmx.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6426460e
  21. 06 2月, 2015 1 次提交
  22. 05 1月, 2015 1 次提交
  23. 16 9月, 2014 2 次提交
    • T
      ALSA: hda - Remove superfluous callbacks from STAC/IDT codecs · aa699c49
      Takashi Iwai 提交于
      Now we can register multiple callbacks to each jack, most of hooks
      used in STAC/IDT codecs can be removed by enabling the powermap update
      callback for all relevant pins.  Along with this, the call of
      stac_init_power_map() can be moved back to stac_parse_auto_config()
      and the own build_controls callback can be removed, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      aa699c49
    • 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. 15 9月, 2014 1 次提交
  25. 11 9月, 2014 2 次提交
    • 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
    • T
      ALSA: hda - Fix invalid pin powermap without jack detection · 7a9744cb
      Takashi Iwai 提交于
      When a driver is set up without the jack detection explicitly (either
      by passing a model option or via a specific fixup), the pin powermap
      of IDT/STAC codecs is set up wrongly, resulting in the silence
      output.  It's because of a logic failure in stac_init_power_map().
      It tries to avoid creating a callback for the pins that have other
      auto-hp and auto-mic callbacks, but the check is done in a wrong way
      at a wrong time.  The stac_init_power_map() should be called after
      creating other jack detection ctls, and the jack callback should be
      created only for jack-detectable widgets.
      
      This patch fixes the check in stac_init_power_map() and its callee
      at the right place, after snd_hda_gen_build_controls().
      Reported-by: NAdam Richter <adam_richter2004@yahoo.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7a9744cb
  26. 03 9月, 2014 1 次提交
    • T
      ALSA: hda - Add TLV_DB_SCALE_MUTE bit for relevant controls · d89c6c0c
      Takashi Iwai 提交于
      The DACs on Sigmatel/IDT codecs do mute at the lowest volume level,
      and in the earlier drivers, we passed TLV_DB_SCALE_MUTE bit for each
      volume control element like Speaker and Headphone as well as Master.
      Along with the translation to the generic parser, however, the TLV bit
      was lost for the slave controls (e.g. Speaker) but set only to
      Master.  In theory this should have sufficed, but apps, particularly
      PA, do care the slave volume bits, so we seem to see a regression in
      the volume controls.
      
      This patch adds a flag to hda_gen_spec to specify the DAC mute
      feature, and adds the TLV bit properly for all relevant volume
      controls.  Also, the TLV bit for vmaster is set in hda_generic.c, so
      that we can get rid of all tricks from the codec driver side.
      
      As the similar hack is applied to Conexant 5051 stuff, we can get rid
      of it as well.
      
      BugLink: https://bugs.launchpad.net/bugs/1357928Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d89c6c0c
  27. 30 7月, 2014 1 次提交
  28. 22 7月, 2014 1 次提交
  29. 15 7月, 2014 1 次提交
  30. 25 6月, 2014 2 次提交
  31. 21 5月, 2014 1 次提交
  32. 27 2月, 2014 1 次提交
    • T
      ALSA: hda/sigmatel - Allow auto-switching for dock line-in of HP laptops · e8b99a1d
      Takashi Iwai 提交于
      Many HP laptops with STAC codecs have a docking station port and BIOS
      sets the pins for the input on the dock as a line in.  Because the
      generic parser doesn't handle a line in pin as auto-switchable, this
      resulted in the manual capture source selection on these laptops.
      
      However, from the usability POV, the automatic switching is easier.
      This patch adds the line_in_auto_switch hint in the fixup function for
      these laptops.  Even if no dock port is present, this should be
      harmless as the generic parser allows the auto-switching only in a
      limited situation (all three pins are located in different
      positions).
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e8b99a1d
  33. 25 2月, 2014 1 次提交
    • T
      ALSA: hda - Replace with standard printk · 4e76a883
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      4e76a883