1. 13 May, 2018 16 commits
  2. 04 May, 2018 7 commits
  3. 03 May, 2018 2 commits
  4. 02 May, 2018 15 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Give proper vendor/product name for Dell WD15 Dock · 6455abb4
      Takashi Iwai authored
      Dell WD15 Dock with 0bda:4014 doesn't give any useful strings for the
      vendor and the product names.  Name them more specifically via quirk,
      as well as the UCM profile name.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6455abb4
    • Takashi Iwai's avatar
      ALSA: usb-audio: Allow to override the longname string · 07eca5fc
      Takashi Iwai authored
      Historically USB-audio driver sets the card's longname field with the
      details of the device and the bus information.  It's good per se, but
      not preferable when it's referred as the identifier for UCM profile.
      
      This patch adds a quirk profile_name field to override the card's
      longname string to a pre-defined one, so that one can create a unique
      and consistent ID string for the specific USB device via a quirk table
      to be used as a UCM profile name.
      
      The patch does a slight code refactoring to split out the functions to
      set shortname and longname fields as well.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      07eca5fc
    • Takashi Iwai's avatar
      ALSA: usb-audio: Add "Keep Interface" control · 4120fbed
      Takashi Iwai authored
      This patch adds "Keep Interface" control for each USB-audio device.
      The control element is with SND_CTL_IFACE_CARD, so that it won't
      appear on any sane mixer applications.  For a device that is confirmed
      to work well with "keep-interface" mode, user can flip the control via
      amixer, e.g.
        % amixer -c1 cset iface=CARD,name='Keep Interface' on
      
      and save/restore the state via alsactl.
      
      The reason to provide this via control API is that the behavior must
      be pretty depending on the device (and the firmware in it), so it's
      not ideal to apply via module option.
      
      For a device that certainly works, we may set it statically via a
      quirk table entry.  But a device like Dell WD15 dock behaves so
      differently depending on the firmware, and we can't set it
      statically.  So leave this as a dynamic switch each user can adjust
      freely.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4120fbed
    • Takashi Iwai's avatar
      ALSA: usb-audio: Add keep_iface flag · 8a463225
      Takashi Iwai authored
      Introduce a new flag to struct snd_usb_audio for allowing the device
      to skip usb_set_interface() calls at changing or closing the stream.
      As of this patch, the flag is nowhere set, so it's just a place
      holder.  The dynamic switching will be added in the following patch.
      
      A background information for this change:
      
      Dell WD15 dock with Realtek chip gives a very long pause at each time
      the driver changes the altset, which eventually happens at every PCM
      stream open/close and parameter change.  As the long pause happens in
      each usb_set_interface() call, there is nothing we can do as long as
      it's called.  The workaround is to reduce calling it as much as
      possible, and this flag indicates that behavior.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8a463225
    • Takashi Iwai's avatar
      ALSA: usb-audio: Avoid superfluous usb_set_interface() calls · b099b969
      Takashi Iwai authored
      This is a preliminary change for the upcoming quirk implementation.
      
      Currently USB-audio driver tries to call usb_set_interface() whenever
      the format change with interface/altset modification happens.  In this
      patch, the check is replaced with the comparison of cur_altsetting and
      the targeted altsetting pointer, so that the driver may skip the
      unnecessary function calls.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b099b969
    • Takashi Iwai's avatar
      ALSA: usb-audio: Initialize Dell Dock playback volumes · 964af639
      Takashi Iwai authored
      In the early commit adcdd0d5 ("ALSA: usb-audio: Skip volume
      controls triggers hangup on Dell USB Dock"), we add the mixer quirks
      for Dell dock to skip two mixer FU's for playback.  This supposed that
      the device has always the proper initial volume, but it doesn't seem
      always correct.
      
      This patch adds the explicit initialization of the volumes to the
      fixed 0dB at the device probe time.  Also, such a fixup is needed
      after the resume, so a new function is hooked to the resume callback
      as well.
      
      Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1089467Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      964af639
    • Takashi Sakamoto's avatar
      ALSA: dice: remove local frag of force_two_pcms · 9c367c01
      Takashi Sakamoto authored
      At present, to add PCM substreams for each of available tx/rx streams,
      this driver uses a condition based on model-name. This is not enough
      to support unknown models.
      
      In former commits, this driver gains cache of stream formats. For models
      which support protocol extension, all of available steam formats are
      cached. For known models, hard-coded stream formats are used to generate
      the cache. For unknown models, stream formats at current mode of sampling
      transmission frequency is cached.
      
      Anyway, at least, the cached formats are used to expose constrains of PCM
      substreams for userspace applications. Thus, The cached data can be also
      used to add PCM substreams themselves, instead of the name-based
      conditions.
      
      This commit obsoletes local frag of force_two_pcms.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9c367c01
    • Takashi Sakamoto's avatar
      ALSA: dice: use cache for PCM constraints and rules · bd2b441c
      Takashi Sakamoto authored
      In former commits, proxy structure gets members for cache of stream
      formats. The cache allows to apply correct constraints and rules to
      runtime of PCM substream. They allows userspace applications to change
      current sampling transmission frequency.
      
      This commit uses the cacher for the PCM constraints and rules.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      bd2b441c
    • Takashi Sakamoto's avatar
      ALSA: dice: use stream formats to add MIDI substreams · b8f78234
      Takashi Sakamoto authored
      In former commits, proxy structure gets members for cache of stream
      formats. The cache can be used to count the number of MIDI substreams
      to add.
      
      This commit uses the cache for this purpose.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b8f78234
    • Takashi Sakamoto's avatar
      ALSA: dice: enable to change current sampling transmission frequency · afa617f2
      Takashi Sakamoto authored
      This is a preparation for userspace applications to change current sampling
      transmission frequency via ALSA PCM interface.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      afa617f2
    • Takashi Sakamoto's avatar
      ALSA: dice: add a helper function to restart all of available streams · 20b94544
      Takashi Sakamoto authored
      This commit is a small refactoring for better readability.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      20b94544
    • Takashi Sakamoto's avatar
      ALSA: dice: use cache of stream format to check running stream · ec592fd3
      Takashi Sakamoto authored
      At present, to check running stream, available stream formats are used
      at current sampling transmission frequency (stf). But when changing stf,
      it's convenient to use cache of stream formats.
      
      This commit applies this idea.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ec592fd3
    • Takashi Sakamoto's avatar
      ALSA: dice: use extended protocol to detect available stream formats · 58579c05
      Takashi Sakamoto authored
      TC Applied Technologies (TCAT) have added extension to DICE protocol. This
      protocol extension is called as Extended Application Protocol, a.k.a. EAP.
      
      In this protocol extension, units get additional 9 address spaces. One of
      it is for current configuration. In this address space, a pair of router
      and stream formats are exposed per mode of three sampling transmission
      frequencies.
      
      This commit adds support the protocol extension for address space of the
      current configuration to generate cache of stream formats.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      58579c05
    • Takashi Sakamoto's avatar
      ALSA: dice: add parameters of stream formats for models produced by Alesis · 28b208f6
      Takashi Sakamoto authored
      Alesis shipped some models with DICE ASICs. All of them just support
      DICE original protocol and drivers can't retrieve all of available stream
      formats without changing status of sampling transmission frequency
      actually.
      
      This commit puts some hard-coded parameters for the models. When detecting
      the models, the corresponding parameters are copied as cache of stream
      formats.
      
      I note that each of pair of iO14/iO26 and MultiMix 8/12/16 has the same
      model ID on their configuration ROM. The MultiMix 8/12/16 just support
      one mode for sampling transmission frequency and ALSA dice driver already
      handles them correctly. The iO14/iO26 support three modes and need
      hard-coded parameters. To distinguish these two models, this commit let
      the driver to retrieve current stream formats and compare it to known
      parameters, then decide it.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      28b208f6
    • Takashi Sakamoto's avatar
      ALSA: dice: add parameters of stream formats for models produced by TC Electronic · f1f0f330
      Takashi Sakamoto authored
      TC Electronic shipped some models with DICE ASICs. All of them just support
      DICE original protocol and drivers can't retrieve all of available stream
      formats without changing status of sampling transmission frequency
      actually.
      
      This commit puts some hard-coded parameters for the models. When detecting
      the models, the corresponding parameters are copied as cache of stream
      formats.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f1f0f330