1. 13 4月, 2012 3 次提交
    • T
      ALSA: usb: Remove obsoleted fields from struct snd_usb_substream · 22026c1a
      Takashi Iwai 提交于
      Many fields have been moved to struct snd_usb_endpoint.
      Also fix the proc output to correspond to the new structure.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      22026c1a
    • D
      ALSA: snd-usb: switch over to new endpoint streaming logic · edcd3633
      Daniel Mack 提交于
      With the previous commit that added the new streaming model, all
      endpoint and streaming related code is now in endpoint.c, and pcm.c
      only acts as a wrapper for handling the packet's payload.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      edcd3633
    • D
      ALSA: snd-usb: implement new endpoint streaming model · 8fdff6a3
      Daniel Mack 提交于
      This patch adds a new generic streaming logic for audio over USB.
      
      It defines a model (snd_usb_endpoint) that handles everything that
      is related to an USB endpoint and its streaming. There are functions to
      activate and deactivate an endpoint (which call usb_set_interface()),
      and to start and stop its URBs. It also has function pointers to be
      called when data was received or is about to be sent, and pointer to
      a sync slave (another snd_usb_endpoint) that is informed when data has
      been received.
      
      A snd_usb_endpoint knows about its state and implements a refcounting,
      so only the first user will actually start the URBs and only the last
      one to stop it will tear them down again.
      
      With this sort of abstraction, the actual streaming is decoupled from
      the pcm handling, which makes the "implicit feedback" mechanisms easy to
      implement.
      
      In order to split changes properly, this patch only adds the new
      implementation but leaves the old one around, so the the driver doesn't
      change its behaviour. The switch to actually use the new code is
      submitted separately.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8fdff6a3
  2. 15 2月, 2012 1 次提交
  3. 12 9月, 2011 1 次提交
    • P
      ALSA: usb: refine delay information with USB frame counter · 294c4fb8
      Pierre-Louis Bossart 提交于
      Existing code only updates the audio delay when URBs were
      submitted/retired. This can introduce an uncertainty of 8ms
      on the number of samples played out with the default settings,
      and a lot more when URBs convey more packets to reduce the
      interrupt rate and power consumption.
      
      This patch relies on the USB frame counter to reduce the
      uncertainty to less than 2ms worst-case. The delay information
      essentially becomes independent of the URB size and number of
      packets. This should help applications like PulseAudio which
      require accurate audio timing. Clemens Ladisch reported
      a decrease of mplayer's A-V difference from nrpacks down to at
      most 1ms.
      
      Thanks to Clemens for also pointing out that the implementation
      of frame counters varies between different HCDs. Only the
      8 lowest-bits are used to estimate the delay.
      Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      [clemens: changed debug code]
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      294c4fb8
  4. 27 10月, 2010 1 次提交
    • C
      ALSA: usb-audio: automatically detect feedback format · 89e1e66d
      Clemens Ladisch 提交于
      There are two USB Audio Class specifications (v1 and v2), but neither of
      them clearly defines the feedback format for high-speed UAC v1 devices.
      Add to this whatever the Creative and M-Audio firmware writers have been
      smoking, and it becomes impossible to predict the exact feedback format
      used by a particular device.
      
      Therefore, automatically detect the feedback format by looking at the
      magnitude of the first received feedback value.
      
      Also, this allows us to get rid of some special cases for E-Mu devices.
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      89e1e66d
  5. 01 6月, 2010 1 次提交
    • D
      ALSA: usb-audio: parse clock topology of UAC2 devices · 79f920fb
      Daniel Mack 提交于
      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: NDaniel Mack <daniel@caiaq.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      79f920fb
  6. 05 3月, 2010 3 次提交