1. 22 Aug, 2016 1 commit
  2. 21 Apr, 2015 1 commit
    • Takamichi Horikawa's avatar
      ALSA: usb-audio: Fix audio output on Roland SC-D70 sound module · 6d1f2f60
      Takamichi Horikawa authored
      Roland SC-D70 reports its device class as vendor specific class and
      the quirk QUIRK_AUDIO_FIXED_ENDPOINT was used for audio output.
      In the quirks table the sampling rate was hard-coded to 44100 Hz
      and therefore not worked when the sound module was in 48000 Hz mode.
      In this change the quirk is changed to QUIRK_AUDIO_STANDARD_INTERFACE
      but as the sound module reports incorrect bSubframeSize in its
      descriptors, additional change is made in format.c to detect it and
      to override it (which uses the existing code for Edirol SD-90).
      Tested both when the sound module was in 44100 Hz mode and 48000 Hz
      mode and both audio input and output. MIDI related part of the driver
      is not touched.
      Signed-off-by: default avatarTakamichi Horikawa <takamichiho@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  3. 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>
  4. 14 Jan, 2014 1 commit
  5. 27 Jun, 2013 1 commit
  6. 29 Apr, 2013 1 commit
  7. 18 Apr, 2013 1 commit
    • Daniel Mack's avatar
      ALSA: snd-usb: add quirks handler for DSD streams · 126825e7
      Daniel Mack authored
      Unfortunately, none of the UAC standards provides a way to identify DSD
      (Direct Stream Digital) formats. Hence, this patch adds a quirks
      handler to identify USB interfaces that are capable of handling DSD.
      That quirks handler can augment the already parsed formats bit-field,
      by any of the new SNDRV_PCM_FMTBIT_DSD_{U8_U16} and setting the dsd_dop
      flag in the audio format, if the driver should take care for the DOP
      byte stuffing.
      The only devices that are known to work with this are the ones with
      a 'Playback Designs' vendor id.
      Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  8. 04 Apr, 2013 1 commit
  9. 18 Mar, 2013 2 commits
  10. 21 Nov, 2012 1 commit
  11. 15 Feb, 2012 1 commit
  12. 08 Jan, 2012 1 commit
    • Xi Wang's avatar
      ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range() · 4fa0e81b
      Xi Wang authored
      A malicious USB device may feed in carefully crafted min/max/res values,
      so that the inner loop in parse_uac2_sample_rate_range() could run for
      a long time or even never terminate, e.g., given max = INT_MAX.
      Also nr_rates could be a large integer, which causes an integer overflow
      in the subsequent call to kmalloc() in parse_audio_format_rates_v2().
      Thus, kmalloc() would allocate a smaller buffer than expected, leading
      to a memory corruption.
      To exploit the two vulnerabilities, an attacker needs physical access
      to the machine to plug in a malicious USB device.
      This patch makes two changes.
      1) The type of "rate" is changed to unsigned int, so that the loop could
         stop once "rate" is larger than INT_MAX.
      2) Limit nr_rates to 1024.
      Suggested-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarXi Wang <xi.wang@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  13. 27 Sep, 2011 1 commit
  14. 18 May, 2011 1 commit
  15. 28 Apr, 2011 1 commit
  16. 10 Jan, 2011 1 commit
  17. 03 Sep, 2010 1 commit
    • Clemens Ladisch's avatar
      ALSA: usb-audio: fix detection of vendor-specific device protocol settings · a2acad82
      Clemens Ladisch authored
      The Audio Class v2 support code in 2.6.35 added checks for the
      bInterfaceProtocol field.  However, there are devices (usually those
      detected by vendor-specific quirks) that do not have one of the
      predefined values in this field, which made the driver reject them.
      To fix this regression, restore the old behaviour, i.e., assume that
      a device with an unknown bInterfaceProtocol field (other than
      UAC_VERSION_2) has more or less UAC-v1-compatible descriptors.
      [compile warning fixes by tiwai]
      Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
      Cc: Daniel Mack <daniel@caiaq.de>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  18. 15 Aug, 2010 1 commit
    • Dan Carpenter's avatar
      ALSA: sound/usb/format: silence uninitialized variable warnings · 38d7b08f
      Dan Carpenter authored
      Gcc complains that ret might be used uninitialized:
      sound/usb/format.c: In function ‘snd_usb_parse_audio_format’:
      sound/usb/format.c:354: warning: ‘ret’ may be used uninitialized in this function
      sound/usb/format.c:354: note: ‘ret’ was declared here
      sound/usb/format.c:414: warning: ‘ret’ may be used uninitialized in this function
      sound/usb/format.c:414: note: ‘ret’ was declared here
      I suppose it could be uninitialized if there is ever a UAC_VERSION_3
      released. Anyway this patch is worthwhile if only to silence the gcc
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Acked-by: default avatarDaniel Mack <daniel@caiaq.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  19. 23 Jun, 2010 1 commit
  20. 11 Jun, 2010 3 commits
  21. 31 May, 2010 1 commit
    • Daniel Mack's avatar
      ALSA: usb-audio: parse clock topology of UAC2 devices · 79f920fb
      Daniel Mack authored
      Audio devices which comply to the UAC2 standard can export complex clock
      topologies in its descriptors and set up links between them.
      The entities that are defined are
       - clock sources, which define the end-leafs.
       - clock selectors, which act as switch to select one out of many
         possible clocks sources.
       - clock multipliers, which have an input clock source, and act as clock
         source again. They can be used to derive one clock from another.
      All sample rate changes, clock validity queries and the like must go to
      clock source elements, while clock selectors and multipliers can be used
      as terminal clock source.
      The following patch adds a parser for these elements and functions to
      iterate over the tree and find the leaf nodes (clock sources).
      The samplerate set functions were moved to the new clock.c file.
      Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
  22. 27 May, 2010 2 commits
  23. 29 Mar, 2010 1 commit
  24. 12 Mar, 2010 2 commits
  25. 05 Mar, 2010 3 commits