1. 13 Apr, 2012 3 commits
    • Daniel Mack's avatar
      ALSA: snd-usb: switch over to new endpoint streaming logic · edcd3633
      Daniel Mack authored
      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: default avatarDaniel Mack <zonque@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      edcd3633
    • Daniel Mack's avatar
      ALSA: snd-usb: implement new endpoint streaming model · 8fdff6a3
      Daniel Mack authored
      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: default avatarDaniel Mack <zonque@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      8fdff6a3
    • Daniel Mack's avatar
      ALSA: snd-usb: add snd_usb_audio-wide mutex · 596580d0
      Daniel Mack authored
      This is needed for new card-wide list operations.
      Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      596580d0
  2. 31 Mar, 2012 37 commits