1. 27 6月, 2018 3 次提交
  2. 25 6月, 2018 12 次提交
    • T
      ALSA: hda/realtek - Apply PRE_PROBE fixup after ALC269 codec variant setups · efe55732
      Takashi Iwai 提交于
      Currently patch_alc269() calls the fixup with HDA_FIXUP_ACT_PRE_PROBE
      before setting up the codec model-specific setups (e.g. setting
      codec_variant or mixer_nid setup).  This is rather confusing as others
      do call the *_PRE_PROBE fixup after such a setup.  Due to this
      disorder, we have to override spec->shutup not at the usual
      HDA_FIXUP_ACT_PRE_PROBE but the unusual HDA_FIXUP_ACT_PROBE time.
      
      This patch corrects the fixup call orders in patch_alc269(), and also
      corrects the action to set up spec->shutup accordingly.
      
      No functional changes but just refactoring.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      efe55732
    • T
      ALSA: hda/realtek - Use common helper for creating beep controls · fea80fae
      Takashi Iwai 提交于
      In the Realtek codec driver, we used to build kctl elements for beep
      mixer in the own build_controls callback.  This is an open-code and
      can be covered by the standard feature of the generic parser with
      snd_hda_gen_add_kctl() instead.
      
      Also, after the conversion, spec->beep_amp becomes superfluous; hence
      it's removed along with the conversion.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fea80fae
    • T
      ALSA: hda/realtek - Use common helper for creating ALC268 beep controls · a5cb463a
      Takashi Iwai 提交于
      The beep mixer controls are the only remaining stuff that uses
      spec->mixers[] array, and they can be well converted to the standard
      helper in the generic parser, snd_hda_gen_add_kctl().
      
      This simplifies the code, especially the superfluous mixers and
      num_mixers fields can be now removed from alc_spec.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a5cb463a
    • T
      ALSA: hda/realtek - Use common GPIO mask for ALC660VD ASUS fixup · df73d83f
      Takashi Iwai 提交于
      The ALC660VD_FIX_ASUS_GPIO1 quirk requires to set up GPIO bit0 ON
      while bit 1 OFF.  Implement the fixup function and convert from the
      static init verbs.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      df73d83f
    • T
      ALSA: hda/realtek - Simplify Dell XPS13 GPIO handling · d44a6864
      Takashi Iwai 提交于
      Dell XPS13 has multi-step fixups, and one of them
      (ALC288_FIXUP_DELL_XPS_13_GPIO6) corresponds to the management of GPIO
      bit6 (0x40).  It used to be a static init verbs (to turn *off* the
      bit6).
      
      In this patch, we convert it as the gpio_mask and gpio_dir
      initializations folded in the existing fixup function.  With this
      change, ALC288_FIXUP_DELL_XPS_13_GPIO6 becomes superfluous, thus it's
      removed.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d44a6864
    • T
      ALSA: hda/realtek - Convert some manual GPIO setups · ae065f1c
      Takashi Iwai 提交于
      This patch converts the remaining static init verbs for GPIO bits with
      the common gpio_* fields management.  Only the verbs setting the GPIO
      data bits are targeted in this patch.  The rest will be changed in
      later patches.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ae065f1c
    • T
      ALSA: hda/realtek - Simplify mute LED GPIO handling · 01e4a275
      Takashi Iwai 提交于
      Now we can simplify the mute LED GPIO handling as well.  Each fixup
      dealing with GPIO for the mute LED controls defined the static init
      verbs, and they are converted to the common GPIO bit fields with the
      new helper, alc_fixup_hp_gpio_led().
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      01e4a275
    • T
      ALSA: hda/realtek - Simplify alc885_fixup_macpro_gpio() · 215c850c
      Takashi Iwai 提交于
      The fixup for Macbook Pro is nothing but setting the GPIO bits as
      usual but with one exception: it adds some delay at writing the GPIO
      bits.
      
      Add a flag to put the conditional delay in the common helper, and
      clean up alc885_fixup_macpro_gpio() with the new flag.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      215c850c
    • T
      ALSA: hda/realtek - Consolidate gpio_data and gpio_led · d261eec8
      Takashi Iwai 提交于
      Until now, two fields, gpio_data and gpio_led, coexist in alc_spec
      although basically both of them serve for the same purpose -- the GPIO
      data bits.
      
      This patch consolidates both usages and eliminates the superfluous
      gpio_led field.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d261eec8
    • T
      ALSA: hda/realtek - Add GPIO data update helper · aaf312de
      Takashi Iwai 提交于
      For updating GPIO bits dynamically, provide a new helper, and use it
      from the alc260 automute hook.  This helper will be used by other
      places in future, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      aaf312de
    • T
      ALSA: hda/realtek - Manage GPIO bits commonly · 5579cd6f
      Takashi Iwai 提交于
      Currently the GPIO bits are managed by individual verbs in some cases
      while toggled dynamically in other cases.  For simplifying the GPIO
      management, define the GPIO mask, dir and data bits in alc_spec
      fields, and refer to / set them consistently from all places.
      
      As a first step, along with the definition of the new gpio_* fields,
      this patch replaces the static verbs that are used at initialization
      and fixups with the common helper functions.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5579cd6f
    • T
      ALSA: hda/realtek - Allow skipping spec->init_amp detection · 1c76aa5f
      Takashi Iwai 提交于
      Some devices have the overrides of spec->init_amp at
      HDA_FIXUP_ACT_PROBE just because alc_ssid_check() gives the
      false-positive values from the SSID.
      
      For more consistent behavior, define the logic in the following way:
      
      - Define ALC_INIT_UNDEFINED as the default value before calling
        alc_ssid_check()
      - Each fixup may set up spec->init_amp with another value at
        HDA_FIXUP_ACT_PRE_PROBE
      - At detection, check whether spec->init_amp is ALC_INIT_UNDEFINED or
        not; if it's different, we skip the detection
      
      Also, it turned out that ASUS TX300 requires the spec->init_amp
      override, too; currently it ignores the GPIO bits implicitly by its
      static init verb, but this will be changed in the later patchset.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1c76aa5f
  3. 21 6月, 2018 3 次提交
  4. 17 6月, 2018 1 次提交
  5. 13 6月, 2018 1 次提交
    • T
      ALSA: hda/realtek - Add shutup hint · c7273bd6
      Takashi Iwai 提交于
      The pin shutup callback seems working well on some devices while it
      does harm on some other devices; e.g. Lenovo laptops show often the
      noises at (runtime) PM with the pin shutup enabled.
      
      Currently, the only way to disable the pin shutup is to hard-code
        spec->shutup = alc_no_shutup;
      in the fixup, and this makes the debugging harder for normal users.
      For allowing users to test the similar effect without recompiling the
      kernel, this patch adds a new hint string "shutup".  It's a boolean
      value, and by passing false to this, user can turn off the pin shutup
      call.
      
      For example, to turn off the shutup on Lenovo P50, create a "firmware
      patch" file (e.g. /lib/firmware/alsa/lenovo-p50) containing the
      following lines:
      
        [codec]
        0x10ec0298 0x17aa222e 0
      
        [hint]
        shutup = no
      
      and pass the file via patch option of snd-hda-intel module
      (e.g. patch=alsa/lenovo-p50).
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c7273bd6
  6. 30 5月, 2018 2 次提交
  7. 29 5月, 2018 2 次提交
  8. 14 5月, 2018 1 次提交
  9. 27 4月, 2018 1 次提交
  10. 25 4月, 2018 3 次提交
  11. 24 4月, 2018 1 次提交
  12. 19 4月, 2018 2 次提交
  13. 22 3月, 2018 2 次提交
  14. 18 3月, 2018 1 次提交
    • T
      ALSA: hda/realtek - Always immediately update mute LED with pin VREF · e40bdb03
      Takashi Iwai 提交于
      Some HP laptops have a mute mute LED controlled by a pin VREF.  The
      Realtek codec driver updates the VREF via vmaster hook by calling
      snd_hda_set_pin_ctl_cache().
      
      This works fine as long as the driver is running in a normal mode.
      However, when the VREF change happens during the codec being in
      runtime PM suspend, the regmap access will skip and postpone the
      actual register change.  This ends up with the unchanged LED status
      until the next runtime PM resume even if you change the Master mute
      switch.  (Interestingly, the machine keeps the LED status even after
      the codec goes into D3 -- but it's another story.)
      
      For improving this usability, let the driver temporarily powering up /
      down only during the pin VREF change.  This can be achieved easily by
      wrapping the call with snd_hda_power_up_pm() / *_down_pm().
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199073
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e40bdb03
  15. 08 3月, 2018 1 次提交
  16. 06 3月, 2018 4 次提交