1. 30 10月, 2014 1 次提交
  2. 20 10月, 2014 2 次提交
  3. 23 9月, 2014 1 次提交
  4. 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
  5. 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
  6. 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
  7. 07 7月, 2014 1 次提交
  8. 25 6月, 2014 1 次提交
  9. 14 5月, 2014 1 次提交
  10. 28 2月, 2014 1 次提交
    • T
      ALSA: hda - Fix registration of beep input device · d604b399
      Takashi Iwai 提交于
      The beep input device is registered via input_register_device(), but
      this is called in snd_hda_attach_beep_device() where the sound devices
      aren't registered yet.  This leads to the binding to non-existing
      object, thus results in failure.  And, even if the binding worked
      (against the PCI object), it's still racy; the input device appears
      before the sound objects.
      
      For fixing this, register the input device properly at dev_register
      ops of the codec object it's bound with.  Also, call
      snd_hda_detach_beep_device() at dev_disconnection so that it's
      detached at the right timing.  As a bonus, since it's called in the
      codec's ops, we can get rid of the further call from the other codec
      drivers.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d604b399
  11. 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
  12. 11 2月, 2014 2 次提交
  13. 07 2月, 2014 1 次提交
    • T
      ALSA: hda - Fix inconsistent Mic mute LED · 7fe30711
      Takashi Iwai 提交于
      The current code for controlling mic mute LED in patch_sigmatel.c
      blindly assumes that there is a single capture switch.  But, there can
      be multiple multiple ones, and each of them flips the state, ended up
      in an inconsistent state.
      
      For fixing this problem, this patch adds kcontrol to be passed to the
      hook function so that the callee can check which switch is being
      accessed.  In stac_capture_led_hook(), the state is checked as a
      bitmask, and turns on the LED when all capture switches are off.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7fe30711
  14. 30 1月, 2014 1 次提交
  15. 13 1月, 2014 1 次提交
  16. 08 1月, 2014 1 次提交
  17. 19 12月, 2013 1 次提交
  18. 11 12月, 2013 2 次提交
    • T
      ALSA: hda - Add static DAC/pin mapping for AD1986A codec · 3690739b
      Takashi Iwai 提交于
      AD1986A codec is a pretty old codec and has really many hidden
      restrictions.  One of such is that each DAC is dedicated to certain
      pin although there are possible connections.  Currently, the generic
      parser tries to assign individual DACs as much as possible, and this
      lead to two bad situations: connections where the sound actually
      doesn't work, and connections conflicting other channels.
      
      We may fix this by trying to find the best connections more harder,
      but as of now, it's easier to give some hints for paired DAC/pin
      connections and honor them if available, since such a hint is needed
      only for specific codecs (right now only AD1986A, and there will be
      unlikely any others in future).
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64971
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3690739b
    • T
      ALSA: hda - Mute all aamix inputs as default · ebb93c05
      Takashi Iwai 提交于
      Not all channels have been initialized, so far, especially when aamix
      NID itself doesn't have amps but its leaves have.  This patch fixes
      these holes.  Otherwise you might get unexpected loopback inputs,
      e.g. from surround channels.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ebb93c05
  19. 09 12月, 2013 1 次提交
    • T
      ALSA: hda - Enable stereo mix as default for AD and VIA codecs · f1e762dd
      Takashi Iwai 提交于
      AD and VIA codecs had stereo mixer input enabled as default before
      moving to the generic parser, and people think the lack of such a
      regression.  In this patch, the stereo mixer input is added back to
      the input selection if no auto-mic is available, and if it's not
      disabled explicitly via hint.  This should satisfy most of demands,
      i.e. stereo mix on desktop machines like what it worked before, and it
      still keeps the new auto-mic feature on laptops.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f1e762dd
  20. 07 12月, 2013 1 次提交
  21. 06 12月, 2013 1 次提交
  22. 28 11月, 2013 1 次提交
    • T
      ALSA: hda - Check leaf nodes to find aamix amps · 2ded3e5b
      Takashi Iwai 提交于
      The current generic parser assumes blindly that the volume and mute
      amps are found in the aamix node itself.  But on some codecs,
      typically Analog Devices ones, the aamix amps are separately
      implemented in each leaf node of the aamix node, and the current
      driver can't establish the correct amp controls.  This is a regression
      compared with the previous static quirks.
      
      This patch extends the search for the amps to the leaf nodes for
      allowing the aamix controls again on such codecs.
      In this implementation, I didn't code to loop through the whole paths,
      since usually one depth should suffice, and we can't search too
      deeply, as it may result in the conflicting control assignments.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65641
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2ded3e5b
  23. 27 11月, 2013 2 次提交
    • T
      ALSA: hda - Fix hp-mic mode without VREF bits · 16c0cefe
      Takashi Iwai 提交于
      When the hp mic pin has no VREF bits, the driver forgot to set PIN_IN
      bit.  Spotted during debugging old MacBook Airs.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65681
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      16c0cefe
    • T
      ALSA: hda - Create Headhpone Mic Jack Mode when really needed · ced4cefc
      Takashi Iwai 提交于
      When a headphone jack is configurable as input, the generic parser
      tries to make it retaskable as Headphone Mic.  The switching can be
      done smoothly if Capture Source control exists (i.e. there is another
      input source).  Or when user explicitly enables the creation of jack
      mode controls, "Headhpone Mic Jack Mode" will be created accordingly.
      
      However, if the headphone mic is the only input source, we have to
      create "Headphone Mic Jack Mode" control because there is no capture
      source selection.  Otherwise, the generic parser assumes that the
      input is constantly enabled, thus the headphone is permanently set
      as input.  This situation happens on the old MacBook Airs where no
      input is supported properly, for example.
      
      This patch fixes the problem: now "Headphone Mic Jack Mode" is created
      when such an input selection isn't possible.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65681
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ced4cefc
  24. 26 11月, 2013 1 次提交
  25. 12 11月, 2013 1 次提交
    • T
      ALSA: hda - Check keep_eapd_on before inv_eapd · 468ac413
      Takashi Iwai 提交于
      We don't change the EAPD bit in set_pin_eapd() if keep_eapd_on flag is
      set by the codec driver and enable is false.  But, we also apply the
      flipping of enable value according to inv_eapd flag in the same
      function, and this confused the former check, handled as if it's
      turned ON.  The inverted EAPD check must be applied after keep_eapd_on
      check, instead.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      468ac413
  26. 05 11月, 2013 1 次提交
  27. 26 10月, 2013 1 次提交
    • T
      ALSA: hda - Add missing initial vmaster hook at build_controls callback · b63eae0a
      Takashi Iwai 提交于
      The generic parser has a support of vmaster hook, but this is
      initialized only in the init callback with the check of the presence
      of the corresponding kctl.  However, since kctl is NULL at the very
      first init callback that is called before build_controls callback, the
      vmaster hook sync is skipped there.  Eventually this leads to the
      uninitialized state depending on the hook implementation.
      
      This patch adds a simple workaround, just calling the sync function
      explicitly at build_controls callback.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b63eae0a
  28. 14 10月, 2013 1 次提交
  29. 13 8月, 2013 2 次提交
  30. 12 8月, 2013 1 次提交
  31. 29 7月, 2013 1 次提交
    • T
      ALSA: hda - Fix invalid multi-io creation on VAIO-Z laptops · da96fb5b
      Takashi Iwai 提交于
      VAIO-Z laptops need to use the specific DAC for the speaker output
      by some unknown reason although the codec itself supports the flexible
      connection.  So we implemented a workaround by a new flag,
      no_primary_hp, for assigning the speaker pin first.
      
      This worked until 3.8 kernel, but it got broken because the driver
      learned for a better multi-io pin mapping, and not it can assign two
      mic pins for multi-io.  Since the multi-io requires to be the primary
      output, the hp and two mic pins are assigned in prior to the speaker
      in the end.
      
      Although the machine has two mic pins, one of them is used as a noise-
      canceling headphone, thus it's no real retaskable mic jack.  Thus, at
      best, we can disable the multi-io assignment and make the parser
      behavior back to the state before the multi-io.
      
      This patch adds again a new flag, no_multi_io, to indicate that the
      device has no multi-io capability, and set it in the fixup for
      VAIO-Z.  The no_multi_io flag itself can be used generically, added
      via a helper line, too.
      Reported-by: NTormen <my.nl.abos@gmail.com>
      Reported-by: NAdam Williamson <awilliam@redhat.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      da96fb5b
  32. 21 7月, 2013 1 次提交
    • T
      ALSA: hda - Add snd_hda_jack_detect_state() helper function · 60ea8ca2
      Takashi Iwai 提交于
      snd_hda_jack_detect() function returns a boolean value for a jack
      plugged in or not, but it also returns always true when the
      corresponding pin is phantom (i.e. fixed).  This is OK in most cases,
      but it makes the generic parser misbehaving about the auto-mute or
      auto-mic switching, e.g. when one of headphone pins is a fixed.
      Namely, the driver decides whether to mute the speaker or not, just
      depending on the headphone plug state: if one of the headphone jacks
      is seen as active, then the speaker is muted.  Thus this will result
      always in the muted speaker output.
      
      So, the problem is the function returns a boolean, after all, although
      we need to think of "phantom" jack.  Now a new function,
      snd_hda_jack_detect_state() is introduced to return these tristates.
      The generic parser uses this function for checking the headphone or
      mic jack states.
      
      Meanwhile, the behavior of snd_hda_jack_detect() is kept as is, for
      keeping compatibility in other driver codes.
      Acked-by: NDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      60ea8ca2
  33. 28 6月, 2013 2 次提交
  34. 25 6月, 2013 1 次提交
    • T
      ALSA: hda - Add auto_mute_via_amp flag to generic parser · 7eebffd3
      Takashi Iwai 提交于
      Add a new flag, auto_mute_via_amp, to determine the behavior of the
      headphone / line-out auto-mute.  When this flag is set, the generic
      driver mutes the speaker and line outputs via the amp mute of each
      pin, instead of changing the pin control values.
      
      This is introduced for devices that don't work expectedly with the pin
      control values; for example, some devices are known to keep enabling
      the speaker outputs no matter which pin control values are set on the
      speaker pins.
      
      The driver doesn't check actually whether the pins have the output amp
      caps, but assumes that the proper mixer (mute) controls are created on
      all these pins.  If not the case, you can't use this flag for your
      device.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7eebffd3