1. 27 Jun, 2018 1 commit
  2. 26 Jun, 2018 9 commits
  3. 25 Jun, 2018 20 commits
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Apply PRE_PROBE fixup after ALC269 codec variant setups · efe55732
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      efe55732
    • Takashi Iwai's avatar
      ALSA: hda/via - Use standard verb containers · f8bfc628
      Takashi Iwai authored
      In this patch, the remaining static init verbs in VIA codec driver are
      converted to the standard snd_hda_add_verbs() calls.  The conversion
      is straightforward, but one change to be noted is the place of calls:
      since these verbs are supposed to be executed at the beginning of the
      init / resume procedure, we need to add snd_hda_add_verbs() calls
      before calling the other parsers.
      
      This is merely a cleanup, no functional changes.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f8bfc628
    • Takashi Iwai's avatar
      ALSA: hda/via - Simplify control management · 0e8f9862
      Takashi Iwai authored
      This patch replaces the control element creations in VIA codec driver
      with the standard snd_hda_gen_add_kctl() calls as a cleanup.  There
      are two major fields targeted by this patch: the beep controls and
      static init controls.
      
      The former is converted just like other codec drivers do.  The
      spec->beep_amp field can be eliminated by this change as well.
      
      The latter, static init controls, are replaced simply with explicit
      snd_hda_gen_add_kctl() calls.
      
      After these conversions, via_build_controls() becomes superfluous and
      replaced with snd_hda_gen_build_controls(), too.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0e8f9862
    • Takashi Iwai's avatar
      ALSA: hda/via - Rewrite with error goto · fcbdcc1a
      Takashi Iwai authored
      Currently VIA codec driver invokes via_free() at each place of the
      error path.  Move the error handling to the end of each function
      commonly and do goto-error as a standard idiom.
      
      This is a preliminary patch for the further cleanups, and no
      functional changes.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      fcbdcc1a
    • Takashi Iwai's avatar
      ALSA: hda/cirrus - Simplify creation of new controls · 0785b0ec
      Takashi Iwai authored
      This patch moves the mixer creation code in Cirrus codec driver from
      its own build_controls callback to snd_hda_gen_add_kctl() for
      simplification.
      
      As a bonus, this allows us to remove the cs421x_build_controls as it
      becomes identical with snd_hda_gen_build_controls().
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0785b0ec
    • Takashi Iwai's avatar
      ALSA: hda/conexant - Clean up beep code · 51e19ca5
      Takashi Iwai authored
      Like the previous commit for Realtek codec, the similar cleanup work
      can be applied to Conexant codec, too.  A slight difference is that
      the call of cx_auto_parse_beep() is moved after
      snd_hda_gen_parse_auto_config().  It's not strictly needed, but it'd
      be good to make the creation of such beep mixers at the end, which
      matches with the former situation.
      
      Along with this conversion, cx_auto_build_controls() becomes just
      calling snd_hda_gen_build_controls(), so it's simply replaced with
      snd_hda_gen_build_controls.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      51e19ca5
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Use common helper for creating beep controls · fea80fae
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      fea80fae
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Use common helper for creating ALC268 beep controls · a5cb463a
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      a5cb463a
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Use common GPIO mask for ALC660VD ASUS fixup · df73d83f
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      df73d83f
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Simplify Dell XPS13 GPIO handling · d44a6864
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      d44a6864
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Convert some manual GPIO setups · ae065f1c
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      ae065f1c
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Simplify mute LED GPIO handling · 01e4a275
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      01e4a275
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Simplify alc885_fixup_macpro_gpio() · 215c850c
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      215c850c
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Consolidate gpio_data and gpio_led · d261eec8
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      d261eec8
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Add GPIO data update helper · aaf312de
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      aaf312de
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Manage GPIO bits commonly · 5579cd6f
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      5579cd6f
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Allow skipping spec->init_amp detection · 1c76aa5f
      Takashi Iwai authored
      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: default avatarTakashi Iwai <tiwai@suse.de>
      1c76aa5f
    • Takashi Iwai's avatar
      Merge branch 'topic/ac97-bus' into for-next · ab1bcc93
      Takashi Iwai authored
      ab1bcc93
    • Robert Jarzmik's avatar
      ALSA: ac97: add codecs devicetree binding · 2225a3e6
      Robert Jarzmik authored
      Add a devicetree binding for codecs. This is especially useful if the
      AC97 bitclk clock is provided by the codec, as it has to be described in
      the devicetree description for the ac97 bus code to aquire it.
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2225a3e6
    • Robert Jarzmik's avatar
      ALSA: ac97: add bus binding for codecs · cc51574a
      Robert Jarzmik authored
      Add the generic ac97 bus binding, especially for ac97 codecs discovered
      by ac97 hardware probing.
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      cc51574a
  4. 21 Jun, 2018 8 commits
  5. 19 Jun, 2018 2 commits
    • Takashi Sakamoto's avatar
      ALSA: firewire-motu: add support for Motu Traveler · 6c5e1ac0
      Takashi Sakamoto authored
      This commit adds support for MOTU Traveler, launched in 2005, discontinued
      quite before. As a result, transmission of PCM frame and MIDI messages is
      available via ALSA PCM and RawMIDI/Sequencer interfaces.
      
      This model supports sampling transmission frequency up to 192.0 kHz, and
      AES/EBU on XLR interface and ADAT on optical interface. Unlike
      Motu 828MkII, Windows driver can switch fetching mode for DSP, like
      mute/unmute feature.
      
      Although this commit enables high sampling transmission frequency, actual
      sound from this model is not good. As long as I tested, it's silence at
      176.4 kHz, and it includes hissing noise at 192.0 kHz. In my opinion, as I
      reported at 3526ce7f9ba7 ('ALSA: firewire-motu: add MOTU specific protocol
      layer'), timestamping on source packet header (SPH) may not still be good
      for this model as well.
      
      $ python2 crpp < /sys/bus/firewire/devices/fw1/config_rom
                     ROM header and bus information block
                     -----------------------------------------------------------------
      400  04106505  bus_info_length 4, crc_length 16, crc 25861
      404  31333934  bus_name "1394"
      408  20001000  irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 0, max_rec 1 (4)
      40c  0001f200  company_id 0001f2     |
      410  0001f32f  device_id 000001f32f  | EUI-64 0001f2000001f32f
      
                     root directory
                     -----------------------------------------------------------------
      414  0004c65c  directory_length 4, crc 50780
      418  030001f2  vendor
      41c  0c0083c0  node capabilities per IEEE 1394
      420  8d000006  --> eui-64 leaf at 438
      424  d1000001  --> unit directory at 428
      
                     unit directory at 428
                     -----------------------------------------------------------------
      428  00035955  directory_length 3, crc 22869
      42c  120001f2  specifier id
      430  13000009  version
      434  17107800  model
      
                     eui-64 leaf at 438
                     -----------------------------------------------------------------
      438  000206b2  leaf_length 2, crc 1714
      43c  0001f200  company_id 0001f2     |
      440  0001f32f  device_id 000001f32f  | EUI-64 0001f2000001f32f
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6c5e1ac0
    • Takashi Sakamoto's avatar
      ALSA: firewire-motu: cancel chunk alignment for protocol version 2 · 191ef576
      Takashi Sakamoto authored
      For MOTU protocol version 2, this driver arranges the number of data
      chunks to align chunks to quadlet data channel. However, MOTU Traveler
      has padding bytes in the end of data block at high clock mode.
      
      This commit removes the arrangement. Fortunately, at low and middle clock
      mode, supported model for v2 protocol (828mkII) gets no influence from this
      change because all of combination for data chunks are just aligned to
      quadlet data channel.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      191ef576