1. 07 1月, 2019 1 次提交
    • Benquike's avatar
      ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirks · cbb2ebf7
      Benquike 提交于
      In `create_composite_quirk`, the terminating condition of for loops is
      `quirk->ifnum < 0`. So any composite quirks should end with `struct
      snd_usb_audio_quirk` object with ifnum < 0.
      
          for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) {
      
          	.....
          }
      
      the data field of Bower's & Wilkins PX headphones usb device device quirks
      do not end with {.ifnum = -1}, wihch may result in out-of-bound read.
      
      This Patch fix the bug by adding an ending quirk object.
      
      Fixes: 240a8af9 ("ALSA: usb-audio: Add a quirck for B&W PX headphones")
      Signed-off-by: Benquike's avatarHui Peng <benquike@163.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      cbb2ebf7
  2. 28 11月, 2018 1 次提交
  3. 05 10月, 2018 1 次提交
    • N
      ALSA: usb-audio: update quirk for B&W PX to remove microphone · c369c8db
      Nicolas Huaman 提交于
      A quirk in snd-usb-audio was added to automate setting sample rate to
      4800k and remove the previously exposed nonfunctional microphone for
      the Bowers & Wilkins PX:
      commit 240a8af9
      https://lore.kernel.org/patchwork/patch/919689/
      
      However the headphones where updated shortly after that to remove the
      unintentional microphone functionality. I guess because of this the
      headphones now crash when connecting them via USB while the quirk is
      active. Dmesg:
      
      snd-usb-audio: probe of 2-3:1.0 failed with error -22
      usb 2-3: 2:1: cannot get min/max values for control 2 (id 2)
      
      This patch removes the microfone and allows the headphones to connect
      and work out of the box. It is based on the current mainline kernel
       and successfully applied an tested on my machine (4.18.10.arch1-1).
      
      Fixes: 240a8af9 ("ALSA: usb-audio: Add a quirck for B&W PX headphones")
      Signed-off-by: NNicolas Huaman <nicolas@herochao.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c369c8db
  4. 26 7月, 2018 1 次提交
    • T
      ALSA: usb-audio: Fix multiple definitions in AU0828_DEVICE() macro · bd1cd0eb
      Takashi Iwai 提交于
      AU0828_DEVICE() macro in quirks-table.h uses USB_DEVICE_VENDOR_SPEC()
      for expanding idVendor and idProduct fields.  However, the latter
      macro adds also match_flags and bInterfaceClass, which are different
      from the values AU0828_DEVICE() macro sets after that.
      
      For fixing them, just expand idVendor and idProduct fields manually in
      AU0828_DEVICE().
      
      This fixes sparse warnings like:
        sound/usb/quirks-table.h:2892:1: warning: Initializer entry defined twice
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bd1cd0eb
  5. 12 6月, 2018 1 次提交
  6. 02 5月, 2018 1 次提交
  7. 24 2月, 2018 1 次提交
  8. 15 1月, 2018 1 次提交
  9. 27 10月, 2016 1 次提交
  10. 01 4月, 2016 1 次提交
  11. 04 3月, 2016 1 次提交
  12. 16 11月, 2015 1 次提交
    • C
      ALSA: usb-audio: prevent CH345 multiport output SysEx corruption · 1ca8b201
      Clemens Ladisch 提交于
      The CH345 USB MIDI chip has two output ports.  However, they are
      multiplexed through one pin, and the number of ports cannot be reduced
      even for hardware that implements only one connector, so for those
      devices, data sent to either port ends up on the same hardware output.
      This becomes a problem when both ports are used at the same time, as
      longer MIDI commands (such as SysEx messages) are likely to be
      interrupted by messages from the other port, and thus to get lost.
      
      It would not be possible for the driver to detect how many ports the
      device actually has, except that in practice, _all_ devices built with
      the CH345 have only one port.  So we can just ignore the device's
      descriptors, and hardcode one output port.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1ca8b201
  13. 19 10月, 2015 2 次提交
    • R
      ALSA: USB-audio: Remove mixer entry from Zoom R16/24 quirk · 9fa5cf8c
      Ricard Wanderlof 提交于
      The device has no mixer (and identifies itself as such), so just skip
      the mixer definition.
      Signed-off-by: NRicard Wanderlof <ricardw@axis.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9fa5cf8c
    • R
      ALSA: USB-audio: Add quirk for Zoom R16/24 playback · e0570446
      Ricard Wanderlof 提交于
      The Zoom R16/24 have a nonstandard playback format where each isochronous
      packet contains a length descriptor in the first four bytes. (Curiously,
      capture data does not contain this and requires no quirk.)
      
      The quirk involves adding the extra length descriptor whenever outgoing
      isochronous packets are generated, both in pcm.c (outgoing audio) and
      endpoint.c (silent data).
      
      In order to make the quirk as unintrusive as possible, for
      pcm.c:prepare_playback_urb(), the isochronous packet descriptors are
      initially set up in the same way no matter if the quirk is enabled or not.
      Once it is time to actually copy the data into the outgoing packet buffer
      (together with the added length descriptors) the isochronous descriptors
      are adjusted in order take the increased payload length into account.
      
      For endpoint.c:prepare_silent_urb() it makes more sense to modify the
      actual function, partly because the function is less complex to start with
      and partly because it is not as time-critical as prepare_playback_urb()
      (whose bulk is run with interrupts disabled), so the (minute) additional
      time spent in the non-quirk case is motivated by the simplicity of having
      a single function for all cases.
      
      The quirk is controlled by the new tx_length_quirk member in struct
      snd_usb_substream and struct snd_usb_audio, which is conveyed to pcm.c
      and endpoint.c from quirks.c in a similar manner to the txfr_quirk member
      in the same structs.
      
      In contrast to txfr_quirk however, the quirk is enabled directly in
      quirks.c:create_standard_audio_quirk() by checking the USB ID in that
      function. Another option would be to introduce a new
      QUIRK_AUDIO_ZOOM_INTERFACE or somesuch, which would have made the quirk
      very plain to see in the quirk table, but it was felt that the additional
      code needed to implement it this way would just make the implementation
      more complex with no real gain.
      
      Tested with a Zoom R16, both by doing capture and playback separately
      using arecord and aplay (8 channel capture and 2 channel playback,
      respectively), as well as capture and playback together using Ardour, as
      well as Audacity and Qtractor together with jackd.
      
      The R24 is reportedly compatible with the R16 when used as an audio
      interface. Both devices share the same USB ID and have the same number of
      inputs (8) and outputs (2). Therefore "R16/24" is mentioned throughout the
      patch.
      
      Regression tested using an Edirol UA-5 in both class compliant (16-bit)
      and "advanced" (24 bit, forces the use of quirks) modes.
      Signed-off-by: NRicard Wanderlof <ricardw@axis.com>
      Tested-by: NPanu Matilainen <pmatilai@laiskiainen.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e0570446
  14. 16 10月, 2015 1 次提交
  15. 01 7月, 2015 1 次提交
  16. 21 4月, 2015 1 次提交
    • T
      ALSA: usb-audio: Fix audio output on Roland SC-D70 sound module · 6d1f2f60
      Takamichi Horikawa 提交于
      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: NTakamichi Horikawa <takamichiho@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6d1f2f60
  17. 12 3月, 2015 1 次提交
  18. 08 1月, 2015 1 次提交
  19. 02 12月, 2014 1 次提交
  20. 13 11月, 2014 1 次提交
  21. 11 11月, 2014 1 次提交
    • D
      ALSA: usb-audio: Add duplex mode for Digidesign Mbox 1 and enable mixer · c63fcb9b
      Damien Zammit 提交于
      This patch provides duplex support for the Digidesign Mbox 1 sound
      card and has been a work in progress for about a year.
      Users have confirmed on my website that previous versions of this patch
      have worked on the hardware and I have been testing extensively.
      
      It also enables the mixer control for providing clock source
      selector based on the previous patch.
      The sample rate has been hardcoded to 48kHz because it works better with
      the S/PDIF sync mode when the sample rate is locked.  This is the
      highest rate that the device supports and no loss of functionality
      is observed by restricting the sample rate apart from the inability to selec
      a lower rate.
      Signed-off-by: NDamien Zammit <damien@zamaudio.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c63fcb9b
  22. 30 10月, 2014 2 次提交
  23. 20 10月, 2014 1 次提交
  24. 10 8月, 2014 1 次提交
  25. 14 1月, 2014 2 次提交
  26. 28 6月, 2013 4 次提交
    • P
      ALSA: usb-audio: Add Audio Advantage Micro II · 066624c6
      Przemek Rudy 提交于
      This patch is adding extensive support (beside standard usb audio class)
      for Audio Advantage Micro II usb sound card.
      Features included:
      - Access to AES bits (so now sending the IEC61937 compliant stream is
      possible).
      - Mixer SPDIF control added to turn on/off the optical transmitter.
      Signed-off-by: NPrzemek Rudy <prudy1@o2.pl>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      066624c6
    • C
      ALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE · b7f33917
      Clemens Ladisch 提交于
      The Roland Quad/Octo-Capture devices use some unknown vendor-specific
      mechanism to switch sample rates (and to manage other controls).  To
      prevent the driver from attempting to use any other than the default
      44.1 kHz sample rate, use quirks to hide the other alternate settings.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      b7f33917
    • C
      ALSA: usb-audio: remove superfluous Roland quirks · 8e5ced83
      Clemens Ladisch 提交于
      Remove all quirks that are no longer needed now that the generic Roland
      quirks can handle the vendor-specific descriptors correctly.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      8e5ced83
    • C
      ALSA: usb-audio: add support for many Roland/Yamaha devices · aafe77cc
      Clemens Ladisch 提交于
      Add quirks to detect the various vendor-specific descriptors used by
      Roland and Yamaha in most of their recent USB audio and MIDI devices.
      
      Together with the previous patch, this should add audio/MIDI support for
      the following USB devices:
      - Edirol motion dive .tokyo performance package
      - Roland MC-808 Synthesizer
      - Roland BK-7m Synthesizer
      - Roland VIMA JM-5/8 Synthesizer
      - Roland SP-555 Sequencer
      - Roland V-Synth GT Synthesizer
      - Roland Music Atelier AT-75/100/300/350C/500/800/900/900C Organ
      - Edirol V-Mixer M-200i/300/380/400/480/R-1000
      - BOSS GT-10B Effects Processor
      - Roland Fantom G6/G7/G8 Keyboard
      - Cakewalk Sonar V-Studio 20/100/700 Audio Interface
      - Roland GW-8 Keyboard
      - Roland AX-Synth Keyboard
      - Roland JUNO-Di/STAGE/Gi Keyboard
      - Roland VB-99 Effects Processor
      - Cakewalk UM-2G MIDI Interface
      - Roland A-500S Keyboard
      - Roland SD-50 Synthesizer
      - Roland OCTAPAD SPD-30 Controller
      - Roland Lucina AX-09 Synthesizer
      - BOSS BR-800 Digital Recorder
      - Roland DUO/TRI-CAPTURE (EX) Audio Interface
      - BOSS RC-300 Loop Station
      - Roland JUPITER-50/80 Keyboard
      - Roland R-26 Recorder
      - Roland SPD-SX Controller
      - BOSS JS-10 Audio Player
      - Roland TD-11/15/30 Drum Module
      - Roland A-49/88 Keyboard
      - Roland INTEGRA-7 Synthesizer
      - Roland R-88 Recorder
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      aafe77cc
  27. 04 6月, 2013 1 次提交
  28. 03 6月, 2013 1 次提交
  29. 25 4月, 2013 3 次提交
  30. 18 3月, 2013 2 次提交
    • M
      ALSA: usb-audio: Trust fields given in the quirk · 59ea586f
      Mark Hills 提交于
      The maxpacksize field is given in some quirks, but it gets ignored (in
      favour of wMaxPacketSize from the first endpoint.) This patch favours
      the one in the quirk.
      
      Digidesign Mbox and Mbox 2 are the only affected quirks and the devices
      are assumed to be working without this patch. So for safety against the
      values in the quirk being incorrect, remove them.
      
      The datainterval is also ignored but there are not currently any quirks
      which choose to override this.
      
      Cc: Damien Zammit <damien@zamaudio.com>
      Cc: Chris J Arges <christopherarges@gmail.com>
      Signed-off-by: NMark Hills <mark@xwax.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      59ea586f
    • M
      ALSA: usb-audio: Playback and MIDI support for Novation Twitch DJ controller · 5e212332
      Mark Hills 提交于
      The hardware also has a PCM capture device which is not implemented in
      this patch.
      
      It may be possible to generalise this to Saffire 6 USB support and some
      of the other Focusrite interfaces, but as I don't have access to these
      devices we should wait until capture support is working first.
      
      Capture support is not implemented because the code assumes the endpoint
      to have its own interface (instead, it shares the interface with playback)
      and some thought will be needed to lift this limitation.
      Signed-off-by: NMark Hills <mark@xwax.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5e212332
  31. 11 2月, 2013 1 次提交