1. 18 Jan, 2013 7 commits
    • Takashi Iwai's avatar
      ALSA: hda - Consolidate cap_sync_hook and capture_switch_hook · a90229e0
      Takashi Iwai authored
      Two hooks in hda_gen_spec, cap_sync_hook and capture_switch_hook, play
      very similar roles.  The only differences are that the former is
      called more often (e.g. at init or switching capsrc) while the latter
      can take an on/off argument.
      
      As a more generic implementation, consolidate these two hooks, and
      pass snd_ctl_elem_value pointer as the second argument.  If the
      secondary argument is non-NULL, it can take the on/off value, so the
      caller handles it like the former capture_switch_hook.  If it's NULL,
      it's called in the init or capsrc switch case.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a90229e0
    • Takashi Iwai's avatar
      ALSA: hda - Fix missing call of capture_switch_hook · a35bd1e3
      Takashi Iwai authored
      When a standard capture switch without multiple binding is used, the
      call for capture_switch_hook isn't called properly.  Replace the put
      ops to add the hook call in that case.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a35bd1e3
    • Takashi Iwai's avatar
      ALSA: hda - Look for boost controls more deeply · 6f7c83af
      Takashi Iwai authored
      In the current generic parser code, we look for the (mic) boost
      controls only on input pins.  But many codecs assign the boost volume
      to a widget connected to each input pin instead of the input amp of
      the pin itself.
      
      In this patch, the parser tries to look through more widgets connected
      to the pin and find a boost amp.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6f7c83af
    • Takashi Iwai's avatar
      ALSA: hda - Fix invalid mute in path activation · 8999bf0a
      Takashi Iwai authored
      When an amp in the activation path is associated with mixer controls,
      activate_amp() tries to skip the initialization.  It's good, but only
      if the mixer really initializes both mute and volume.  Otherwise,
      either the mute of the volume is left uninitialized.
      
      This patch adds this missing check and properly initialize the
      partially controlled amps in an activation path.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8999bf0a
    • Takashi Iwai's avatar
      ALSA: hda - Unify input label creations in generic parser · c970042c
      Takashi Iwai authored
      There are a few places creating the labels and indices of kctls for
      each input pin in the current generic parser code.  This is redundant
      and makes harder to maintain.  Let's create the labels and indices at
      once and keep them in hda_gen_spec.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c970042c
    • Takashi Iwai's avatar
      ALSA: hda - Keep autocfg.input idx value in imux table · 9dba205b
      Takashi Iwai authored
      Since the imux table entries can be a subset of autocfg.input table,
      the indices of these aren't always same.  For passing the proper index
      value of autocfg.input at creating input ctl labels (via
      snd_hda_autocfg_input_label()), keep the corresponding autocfg.input
      idx value in the index field of each imux item, which isn't used in
      the generic driver.
      
      Also, this makes easier to check the invalid imux pin for stereo mix.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9dba205b
    • Takashi Iwai's avatar
      ALSA: hda - Fix missing unsol event handler in some codec drivers · 8a6c21ae
      Takashi Iwai authored
      This resulted in non-working auto-mute behavior, of course...
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8a6c21ae
  2. 17 Jan, 2013 8 commits
    • Takashi Iwai's avatar
      ALSA: hda - Use generic parser for STAC/IDT codec driver · 36c9db7a
      Takashi Iwai authored
      Finally we reached here.  All codecs driver (except for CA0132, which
      has really device-specific requirements) have been converted to use
      the generic parser.
      
      This patch appears bigger than others since it also involves with the
      code shuffling, but mostly the cut-off of parser codes and adapt to
      the generic parser flags.  Most of fixup codecs haven't been changed
      but just removed a few unnecessary codes.
      
      The only missing stuff is the SPDIF mux control.  It'll be added again
      later.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      36c9db7a
    • Takashi Iwai's avatar
      Merge branch 'test/hda-gen-parser' into test/hda-migrate · 8f0fdc09
      Takashi Iwai authored
      * test/hda-gen-parser:
        ALSA: hda - Improve naming rule for primary output
        ALSA: hda - Add PCM capture hook to hda_gen_spec
        ALSA: hda - Record all detected ADCs in hda_gen_spec
        ALSA: hda - Move vmaster TLV parsing to snd_hda_gen_parse_auto_config()
        ALSA: hda - Add input jack mode enum controls to generic parser
        ALSA: hda - Give more comments to hda_gen_spec flags
        ALSA: hda - Add suppress_auto_mute flag to hda_gen_spec
        ALSA: hda - Record the current speaker / LO mute status in hda_gen_spec
        ALSA: hda - Properly call automute/switch hooks at init
      8f0fdc09
    • Takashi Iwai's avatar
      ALSA: hda - Improve naming rule for primary output · 247d85ee
      Takashi Iwai authored
      When the volume or mute control of the primary output is shared with
      other (headphone or speaker) outputs, we shouldn't name it as a
      specific output type but rather name it with the channel name or a
      generic name like "PCM".
      
      Also, this check should be performed individually for the volume and
      the mute controls because some codecs may have shared volumes but
      separate mute controls.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      247d85ee
    • Takashi Iwai's avatar
      ALSA: hda - Add PCM capture hook to hda_gen_spec · ac2e8736
      Takashi Iwai authored
      Not only PCM playback, a hook for PCM capture would be required for
      power controls in codec drivers.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ac2e8736
    • Takashi Iwai's avatar
      ALSA: hda - Record all detected ADCs in hda_gen_spec · 0ffd534e
      Takashi Iwai authored
      Since the generic parser reduces the ADC list, copy the list of the
      all detected ADCs and keep it.
      
      This list can be later referred by the codec driver for finer power
      controls.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0ffd534e
    • Takashi Iwai's avatar
      ALSA: hda - Move vmaster TLV parsing to snd_hda_gen_parse_auto_config() · 7a71bbf3
      Takashi Iwai authored
      Add vmaster_tlv[] to hda_gen_spec and store the suggested TLV data
      in snd_hda_gen_parse_auto_config().  This allows the codec driver to
      correct the TLV data (e.g. mute capability) before actually creating
      vmaster instance.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7a71bbf3
    • Takashi Iwai's avatar
      ALSA: hda - Add input jack mode enum controls to generic parser · 29476558
      Takashi Iwai authored
      Just like the jack mode enum ctls for output jacks, add the support
      for similar enum ctls for input pins to control the bias Vref.
      The new controls will be added when spec->add_in_jack_modes is set
      either by the codec driver or by a hint string.
      
      Note that ground and 100% vrefs are excluded from the list for
      simplicity, currently.  We may add a new flag to allow them, too.
      But I guess it's easier to put a value override in the pinfix in such
      a case.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      29476558
    • Takashi Iwai's avatar
      ALSA: hda - Minor cleanup/fixes for patch_sigmatel.c fixup transition · f6655d52
      Takashi Iwai authored
      - spec->hp_detect has to be overridden in HDA_FIXUP_ACT_PARSE, not in
        PRE_PARSE.
      - Remove err == 0 check but return directly -EINVAL from
        stac92xx_parse_auto_config()
      - Set spec->default_polarity for 92HD71bxx
      - Some code shuffles
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f6655d52
  3. 16 Jan, 2013 11 commits
  4. 15 Jan, 2013 11 commits
  5. 14 Jan, 2013 3 commits