1. 16 4月, 2015 8 次提交
  2. 14 4月, 2015 1 次提交
  3. 13 4月, 2015 1 次提交
  4. 11 4月, 2015 1 次提交
  5. 10 4月, 2015 1 次提交
  6. 09 4月, 2015 7 次提交
  7. 08 4月, 2015 4 次提交
    • 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
    • K
      ALSA: hda/realtek - Support Dell headset mode for ALC288 · e1e62b98
      Kailang Yang 提交于
      Dell create new platform with ALC288 codec.
      This patch will enable headset mode for Dino platform.
      
      [slight code refactoring and compile fix by tiwai]
      Signed-off-by: NKailang Yang <kailang@realtek.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e1e62b98
    • K
      ALSA: hda/realtek - Support headset mode for ALC286/288 · f3b70332
      Kailang Yang 提交于
      Support headset mode for ALC286 and ALC288 platforms.
      Signed-off-by: NKailang Yang <kailang@realtek.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f3b70332
    • K
      ALSA: hda/realtek - Make more stable to get pin sense for ALC283 · a59d7199
      Kailang Yang 提交于
      Pin sense will active when power pin is wake up.
      Power pin will not wake up immediately during resume state.
      Add some delay to wait for power pin activated.
      Signed-off-by: NKailang Yang <kailang@realtek.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a59d7199
  8. 07 4月, 2015 1 次提交
  9. 04 4月, 2015 4 次提交
  10. 26 3月, 2015 2 次提交
  11. 25 3月, 2015 2 次提交
    • W
      ALSA: hda/via - Add beep controls to VIA codecs · 4738465c
      W. Trevor King 提交于
      My codec has a beep-generating node:
      
        $ cat /proc/asound/card1/codec#0
        Codec: VIA VT1802
        ...
        Vendor Id: 0x11068446
        Subsystem Id: 0x15587410
        Revision Id: 0x100000
        ...
        Node 0x22 [Beep Generator Widget] wcaps 0x70040c: Mono Amp-Out
          Amp-Out caps: ofs=0x0a, nsteps=0x12, stepsize=0x05, mute=1
          Amp-Out vals:  [0x0a]
          Power states:  D0 D1 D2 D3
          Power: setting=D0, actual=D0
        ...
      
      But I was missing the:
      
        Control: name=...
      
      entries that I need to manage this widget from alsamixer.  With this
      patch (based on the similar Mono Amp-Out handling in
      patch_conexant.c), I get a new:
      
        input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card1/hdaudioC1D0/input15
      
      entry in dmesg and controls to manage that beep:
      
        $ cat /proc/asound/card1/codec#0 | grep -A5 Beep
        Node 0x22 [Beep Generator Widget] wcaps 0x70040c: Mono Amp-Out
          Control: name="Beep Playback Volume", index=0, device=0
            ControlAmp: chs=1, dir=Out, idx=0, ofs=0
          Control: name="Beep Playback Switch", index=0, device=0
            ControlAmp: chs=1, dir=Out, idx=0, ofs=0
          Amp-Out caps: ofs=0x0a, nsteps=0x12, stepsize=0x05, mute=1
          Amp-Out vals:  [0x12]
          Power states:  D0 D1 D2 D3
          Power: setting=D0, actual=D0
      
      [rebased and modified for the latest tree by tiwai]
      Signed-off-by: NW. Trevor King <wking@tremily.us>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4738465c
    • T
      ALSA: hda - Remove superfluous hda_nid_t definition in hda_codec.h · 44e39b98
      Takashi Iwai 提交于
      Just forgotten to remove.  It's now in sound/hdaudio.h.
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      44e39b98
  12. 24 3月, 2015 1 次提交
  13. 23 3月, 2015 7 次提交
    • 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 parameter caches, too · faa75f8a
      Takashi Iwai 提交于
      The amp hash table was used for recording the cached reads of some
      capability values like pin caps or amp caps.  Now all these are moved
      to regmap as well.
      
      One addition to the regmap helper is codec->caps_overwriting flag.
      This is set in snd_hdac_override_parm(), and the regmap helper accepts
      any register while this flag is set, so that it can overwrite even the
      read-only verb like AC_VERB_PARAMETERS.  The flag is cleared
      immediately in snd_hdac_override_parm(), as it's a once-off flag.
      
      Along with these changes, the no longer needed amp hash and relevant
      fields are removed from hda_codec struct now.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      faa75f8a
    • 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 - Implement uncached version of parameter reads · 9ba17b4d
      Takashi Iwai 提交于
      Sometimes we need the uncached reads, e.g. for refreshing the tree.
      This patch provides the helper function for that and uses it for
      refreshing widgets, reading subtrees and the whole proc reads.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9ba17b4d
    • T
      ALSA: hda - Use regmap for codec parameter reads · 01ed3c06
      Takashi Iwai 提交于
      Let's start converting the access functions to regmap.
      The first one is the simplest, just converting the codec parameter
      read helper function snd_hda_param_read().
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      01ed3c06
    • T
      ALSA: hda - Add regmap support · 4d75faa0
      Takashi Iwai 提交于
      This patch adds an infrastructure to support regmap-based verb
      accesses.  Because o the asymmetric nature of HD-audio verbs,
      especially the amp verbs, we need to translate the verbs as a sort of
      pseudo registers to be mapped uniquely in regmap.
      
      In this patch, a pseudo register is built from the NID, the
      AC_VERB_GET_* and 8bit parameters, i.e. almost in the form to be sent
      to HD-audio bus but without codec address field.  OTOH, for writing,
      the same pseudo register is translated to AC_VERB_SET_* automatically.
      The AC_VERB_SET_AMP_* verb is re-encoded from the corresponding
      AC_VERB_GET_AMP_* verb and parameter at writing.
      
      Some verbs has a single command for read but multiple for writes.  A
      write for such a verb is split automatically to multiple verbs.
      
      The patch provides also a few handy helper functions.  They are
      designed to be accessible even without regmap.  When no regmap is set
      up (e.g. before the codec device instantiation), the direct hardware
      access is used.  Also, it tries to avoid the unnecessary power-up.
      The power up/down sequence is performed only on demand.
      
      The codec driver needs to call snd_hdac_regmap_exit() and
      snd_hdac_regmap_exit() at probe and remove if it wants the regmap
      access.
      
      There is one flag added to hdac_device.  When the flag lazy_cache is
      set, regmap helper ignores a write for a suspended device and returns
      as if it was actually written.  It reduces the hardware access pretty
      much, e.g. when adjusting the mixer volume while in idle.  This
      assumes that the driver will sync the cache later at resume properly,
      so use it carefully.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4d75faa0
    • T
      ALSA: hda - Move generic array helpers to core lib · 71fc4c7e
      Takashi Iwai 提交于
      This will be used by the regmap support.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      71fc4c7e