An error occurred fetching the project authors.
  1. 16 Oct, 2016 1 commit
  2. 16 Mar, 2016 1 commit
  3. 13 Jan, 2016 1 commit
  4. 14 Dec, 2015 1 commit
    • Anssi Hannula's avatar
      ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly · 42e3121d
      Anssi Hannula authored
      AudioQuest DragonFly DAC reports a volume control range of 0..50
      (0x0000..0x0032) which in USB Audio means a range of 0 .. 0.2dB, which
      is obviously incorrect and would cause software using the dB information
      in e.g. volume sliders to have a massive volume difference in 100..102%
      range.
      
      Commit 2d1cb7f6 ("ALSA: usb-audio: add dB range mapping for some
      devices") added a dB range mapping for it with range 0..50 dB.
      
      However, the actual volume mapping seems to be neither linear volume nor
      linear dB scale, but instead quite close to the cubic mapping e.g.
      alsamixer uses, with a range of approx. -53...0 dB.
      
      Replace the previous quirk with a custom dB mapping based on some basic
      output measurements, using a 10-item range TLV (which will still fit in
      alsa-lib MAX_TLV_RANGE_SIZE).
      
      Tested on AudioQuest DragonFly HW v1.2. The quirk is only applied if the
      range is 0..50, so if this gets fixed/changed in later HW revisions it
      will no longer be applied.
      
      v2: incorporated Takashi Iwai's suggestion for the quirk application
      method
      Signed-off-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      42e3121d
  5. 28 Sep, 2015 1 commit
  6. 26 Aug, 2015 1 commit
    • Takashi Iwai's avatar
      ALSA: usb-audio: Avoid nested autoresume calls · 47ab1545
      Takashi Iwai authored
      After the recent fix of runtime PM for USB-audio driver, we got a
      lockdep warning like:
      
        =============================================
        [ INFO: possible recursive locking detected ]
        4.2.0-rc8+ #61 Not tainted
        ---------------------------------------------
        pulseaudio/980 is trying to acquire lock:
         (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio]
        but task is already holding lock:
         (&chip->shutdown_rwsem){.+.+.+}, at: [<ffffffffa0355dac>] snd_usb_autoresume+0x1d/0x52 [snd_usb_audio]
      
      This comes from snd_usb_autoresume() invoking down_read() and it's
      used in a nested way.  Although it's basically safe, per se (as these
      are read locks), it's better to reduce such spurious warnings.
      
      The read lock is needed to guarantee the execution of "shutdown"
      (cleanup at disconnection) task after all concurrent tasks are
      finished.  This can be implemented in another better way.
      
      Also, the current check of chip->in_pm isn't good enough for
      protecting the racy execution of multiple auto-resumes.
      
      This patch rewrites the logic of snd_usb_autoresume() & co; namely,
      - The recursive call of autopm is avoided by the new refcount,
        chip->active.  The chip->in_pm flag is removed accordingly.
      - Instead of rwsem, another refcount, chip->usage_count, is introduced
        for tracking the period to delay the shutdown procedure.  At
        the last clear of this refcount, wake_up() to the shutdown waiter is
        called.
      - The shutdown flag is replaced with shutdown atomic count; this is
        for reducing the lock.
      - Two new helpers are introduced to simplify the management of these
        refcounts; snd_usb_lock_shutdown() increases the usage_count, checks
        the shutdown state, and does autoresume.  snd_usb_unlock_shutdown()
        does the opposite.  Most of mixer and other codes just need this,
        and simply returns an error if it receives an error from lock.
      
      Fixes: 9003ebb1 ('ALSA: usb-audio: Fix runtime PM unbalance')
      Reported-and-tested-by: default avatarAlexnader Kuleshov <kuleshovmail@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      47ab1545
  7. 09 Apr, 2015 1 commit
  8. 21 Nov, 2014 8 commits
  9. 20 Nov, 2014 1 commit
  10. 13 Nov, 2014 2 commits
    • Chris J Arges's avatar
      ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 · 76b188c4
      Chris J Arges authored
      This code contains the Scarlett mixer interface code that was originally
      written by Tobias Hoffman and Robin Gareus. Because the device doesn't
      properly implement UAC2 this code adds a mixer quirk for the device.
      
      Changes from the original code include removing the metering code along with
      dead code and comments. Compiler warnings were fixed. The code to initialize
      the sampling rate was causing a crash this was fixed as discussed on the
      mailing list. Error, and info messages were convered to dev_err and dev_info
      interfaces. The custom scarlett_mixer_elem_info struct was replaced with the
      more generic usb_mixer_elem_info to be able to recycle more code from mixer.c.
      
      This patch also makes additional modifications based on upstream comments.
      Individual control creation functions are removed and a generic
      function is no used. Macros for function calls are removed to improve
      readability. Hardcoded control initialization is removed. Save to HW
      functionality has been removed. Strings for enums are created dynamically for
      the mixer. Strings used for controls are now SNDRV_CTL_ELEM_ID_NAME_MAXLEN
      length.
      Signed-off-by: default avatarChris J Arges <chris.j.arges@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      76b188c4
    • Chris J Arges's avatar
      ALSA: usb-audio: make set_*_mix_values functions public · eef90451
      Chris J Arges authored
      Make the functions set_cur_mix_value and get_cur_mix_value accessible by files
      that include mixer.h. In addition make usb_mixer_elem_free accessible.
      This allows reuse of these functions by mixers that may require quirks.
      
      The following summarizes the renamed functions:
        - set_cur_mix_value -> snd_usb_set_cur_mix_value
        - get_cur_mix_value -> snd_usb_get_cur_mix_value
        - usb_mixer_elem_free -> snd_usb_mixer_elem_free
      Signed-off-by: default avatarChris J Arges <chris.j.arges@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      eef90451
  11. 11 Nov, 2014 2 commits
  12. 21 Oct, 2014 1 commit
  13. 26 Feb, 2014 1 commit
    • Takashi Iwai's avatar
      ALSA: usb-audio: Use standard printk helpers · 0ba41d91
      Takashi Iwai authored
      Convert with dev_err() and co from snd_printk(), etc.
      As there are too deep indirections (e.g. ep->chip->dev->dev),
      a few new local macros, usb_audio_err() & co, are introduced.
      
      Also, the device numbers in some messages are dropped, as they are
      shown in the prefix automatically.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0ba41d91
  14. 05 Dec, 2013 1 commit
  15. 13 Nov, 2013 1 commit
  16. 28 Jun, 2013 1 commit
  17. 07 Apr, 2013 1 commit
    • Eldad Zack's avatar
      ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_* · 889d6684
      Eldad Zack authored
      The usb_control_msg() function expects __u16 types and performs
      the endianness conversions by itself.
      However, in three places, a conversion is performed before it is
      handed over to usb_control_msg(), which leads to a double conversion
      (= no conversion):
      * snd_usb_nativeinstruments_boot_quirk()
      * snd_nativeinstruments_control_get()
      * snd_nativeinstruments_control_put()
      
      Caught by sparse:
      
      sound/usb/mixer_quirks.c:512:38: warning: incorrect type in argument 6 (different base types)
      sound/usb/mixer_quirks.c:512:38:    expected unsigned short [unsigned] [usertype] index
      sound/usb/mixer_quirks.c:512:38:    got restricted __le16 [usertype] <noident>
      sound/usb/mixer_quirks.c:543:35: warning: incorrect type in argument 5 (different base types)
      sound/usb/mixer_quirks.c:543:35:    expected unsigned short [unsigned] [usertype] value
      sound/usb/mixer_quirks.c:543:35:    got restricted __le16 [usertype] <noident>
      sound/usb/mixer_quirks.c:543:56: warning: incorrect type in argument 6 (different base types)
      sound/usb/mixer_quirks.c:543:56:    expected unsigned short [unsigned] [usertype] index
      sound/usb/mixer_quirks.c:543:56:    got restricted __le16 [usertype] <noident>
      sound/usb/quirks.c:502:35: warning: incorrect type in argument 5 (different base types)
      sound/usb/quirks.c:502:35:    expected unsigned short [unsigned] [usertype] value
      sound/usb/quirks.c:502:35:    got restricted __le16 [usertype] <noident>
      Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Acked-by: default avatarDaniel Mack <zonque@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      889d6684
  18. 11 Feb, 2013 1 commit
  19. 10 Jan, 2013 1 commit
  20. 12 Dec, 2012 1 commit
  21. 29 Nov, 2012 3 commits
  22. 30 Oct, 2012 1 commit
  23. 11 Jun, 2012 2 commits
  24. 11 May, 2012 1 commit
  25. 24 Apr, 2012 4 commits