This project is mirrored from Pull mirroring updated .
  1. 04 Apr, 2013 1 commit
  2. 18 Mar, 2013 1 commit
  3. 11 Feb, 2013 1 commit
  4. 25 Jan, 2013 1 commit
    • Takashi Iwai's avatar
      ALSA: Make snd_printd() and snd_printdd() inline · 86b27237
      Takashi Iwai authored
      Because currently snd_printd() and snd_printdd() macros are expanded
      to empty when CONFIG_SND_DEBUG=n, a compile warning like below
      appears sometimes, and we had to covert it by ugly ifdefs:
        sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’:
        sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable]
      For "fixing" these issues better, this patch replaces snd_printd() and
      snd_printdd() definitions with empty inline functions instead of
      macros.  This should have the same effect but shut up warnings like
      But since we had already put ifdefs, changing to inline functions
      would trigger compile errors.  So, such ifdefs is removed in this
      In addition, snd_pci_quirk name field is defined only when
      CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in
      snd_printdd() argument triggers the build errors, too.  For avoiding
      these errors, introduce a new macro snd_pci_quirk_name() that is
      defined no matter how the debug option is set.
      Reported-by: default avatarStratos Karafotis <>
      Signed-off-by: default avatarTakashi Iwai <>
  5. 11 Jan, 2013 1 commit
  6. 24 Dec, 2012 1 commit
  7. 04 Dec, 2012 1 commit
    • Eldad Zack's avatar
      ALSA: usb-audio: sync ep init fix for audioformat mismatch · 0d9741c0
      Eldad Zack authored
      Commit 947d2996
       , "ALSA: snd-usb:
      properly initialize the sync endpoint", while correcting the
      initialization of the sync endpoint when opening just the data
      endpoint, prevents devices that has a sync endpoint, with a channel
      number different than that of the data endpoint, from functioning.
      Due to a different channel and period bytes count, attempting to
      initialize the sync endpoint will fail at the usb host driver.
      For example, when using xhci:
       cannot submit urb 0, error -90: internal error
      With this patch, if a sync endpoint has multiple audioformats, a
      matching audioformat is preferred. An audioformat must be found
      with at least one channel and support the requested sample rate
      and PCM format, otherwise the stream will not be opened.
      If the number of channels differ between the selected audioformat
      and the requested format, adjust the period bytes count accordingly.
      It is safe to perform the calculation on the basis of the channel
      count, since the requested PCM audio format and the rate must be
      supported by the selected audioformat.
      Cc: Jeffrey Barish <>
      Cc: Daniel Mack <>
      Signed-off-by: default avatarEldad Zack <>
      Signed-off-by: default avatarTakashi Iwai <>
  8. 29 Nov, 2012 2 commits
  9. 23 Nov, 2012 2 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: fix delay account during pause · 48779a0b
      Takashi Iwai authored
      When a playback stream is paused, the stream isn't actually stopped,
      thus we still need to take care of the in-flight data amount for the
      delay calculation.  Otherwise the value of subs->last_delay is no
      longer reliable and can give a bogus value after resuming from pause.
      This will result in "delay: estimated XX, actual YY" error messages.
      Also, during pause after all in flight data are processed
      (i.e. last_delay = 0), we don't have to calculate the actual delay
      from the current frame.  Give a short path in such a case.
      Signed-off-by: default avatarTakashi Iwai <>
    • Takashi Iwai's avatar
      ALSA: usb-audio: ignore delay calculation for capture stream · 3f94fad0
      Takashi Iwai authored
      It doesn't make sense to calculate the delay for capture streams in
      the current implementation.  It's always zero, so we should skip the
      computation in snd_usb_pcm_pointer() in the case of capture.
      Signed-off-by: default avatarTakashi Iwai <>
  10. 22 Nov, 2012 1 commit
  11. 21 Nov, 2012 3 commits
  12. 08 Nov, 2012 1 commit
  13. 30 Oct, 2012 2 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Use rwsem for disconnect protection · 34f3c89f
      Takashi Iwai authored
      Replace mutex with rwsem for codec->shutdown protection so that
      concurrent accesses are allowed.
      Also add the protection to snd_usb_autosuspend() and
      snd_usb_autoresume(), too.
      Reported-by: default avatarMatthieu CASTET <>
      Cc: <>
      Signed-off-by: default avatarTakashi Iwai <>
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix races at disconnection · 978520b7
      Takashi Iwai authored
      Close some races at disconnection of a USB audio device by adding the
      chip->shutdown_mutex and chip->shutdown check at appropriate places.
      The spots to put bandaids are:
      - PCM prepare, hw_params and hw_free
      - where the usb device is accessed for communication or get speed, in
       mixer.c and others; the device speed is now cached in subs->speed
       instead of accessing to chip->dev
      The accesses in PCM open and close don't need the mutex protection
      because these are already handled in the core PCM disconnection code.
      The autosuspend/autoresume codes are still uncovered by this patch
      because of possible mutex deadlocks.  They'll be covered by the
      upcoming change to rwsem.
      Also the mixer codes are untouched, too.  These will be fixed in
      another patch, too.
      Reported-by: default avatarMatthieu CASTET <>
      Cc: <>
      Signed-off-by: default avatarTakashi Iwai <>
  14. 21 Oct, 2012 1 commit
  15. 19 Sep, 2012 4 commits
  16. 06 Sep, 2012 1 commit
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix bogus error messages for delay accounting · 1213a205
      Takashi Iwai authored
      The recent fix for the missing fine delayed time adjustment gives
      strange error messages at each start of the playback stream, such as
        delay: estimated 0, actual 352
        delay: estimated 353, actual 705
      These come from the sanity check in retire_playback_urb().  Before the
      stream is activated via start_endpoints(), a few silent packets have
      been already sent.  And at this point the delay account is still in
      the state as if the new packets are just queued, so the driver gets
      confused and spews the bogus error messages.
      For fixing the issue, we just need to check whether the received
      packet is valid, whether it's zero sized or not.
      Reported-by: default avatarMarkus Trippelsdorf <>
      Cc: <> [v3.5+]
      Signed-off-by: default avatarTakashi Iwai <>
  17. 31 Aug, 2012 3 commits
    • Daniel Mack's avatar
      ALSA: snd-usb: fix cross-interface streaming devices · 2e4a263c
      Daniel Mack authored
      Commit 68e67f40
       ("ALSA: snd-usb: move calls to usb_set_interface")
      saved us some unnecessary calls to snd_usb_set_interface() but ignored
      the fact that there is at least one device out there which operates on
      two endpoint in different interfaces simultaniously.
      Take care for this by catching the case where data and sync endpoints
      are located on different interfaces and calling snd_usb_set_interface()
      between the start of the two endpoints.
      Signed-off-by: default avatarDaniel Mack <>
      Reported-by: default avatarRobert M. Albrecht <>
      Cc: [v3.5+]
      Signed-off-by: default avatarTakashi Iwai <>
    • Daniel Mack's avatar
      ALSA: snd-usb: fix calls to next_packet_size · 245baf98
      Daniel Mack authored
      In order to support devices with implicit feedback streaming models,
      packet sizes are now stored with each individual urb, and the PCM
      handling code which fills the buffers purely relies on the size fields
      However, calling snd_usb_audio_next_packet_size() for all possible
      packets in an URB at once, prior to letting the PCM code do its job
      does in fact not lead to the same behaviour than what the old code did:
      The PCM code will break its loop once a period boundary is reached,
      consequently using up less packets that it really could.
      As snd_usb_audio_next_packet_size() implements a feedback mechanism to
      the endpoints phase accumulator, the number of calls to that function
      matters, and when called too often, the data rate runs out of bounds.
      Fix this by making the next_packet function public, and call it from the
      PCM code as before if the packet data sizes are not defined.
      Signed-off-by: default avatarDaniel Mack <>
      Cc: [v3.5+]
      Signed-off-by: default avatarTakashi Iwai <>
    • Daniel Mack's avatar
      ALSA: snd-usb: restore delay information · fbcfbf5f
      Daniel Mack authored
      Parts of commit 294c4fb8
       ("ALSA: usb: refine delay information with USB
      frame counter") were unfortunately lost during the refactoring of the
      snd-usb driver in 3.5.
      This patch adds them back, restoring the correct delay information
      Signed-off-by: default avatarDaniel Mack <>
      Cc: Pierre-Louis Bossart <>
      Cc: [3.5+]
      Signed-off-by: default avatarTakashi Iwai <>
  18. 30 Aug, 2012 1 commit
    • Daniel Mack's avatar
      ALSA: snd-usb: Fix URB cancellation at stream start · 015618b9
      Daniel Mack authored
      Commit e9ba389c
       ("ALSA: usb-audio: Fix scheduling-while-atomic bug in
      PCM capture stream") fixed a scheduling-while-atomic bug that happened
      when snd_usb_endpoint_start was called from the trigger callback, which
      is an atmic context. However, the patch breaks the idea of the endpoints
      reference counting, which is the reason why the driver has been
      refactored lately.
      Revert that commit and let snd_usb_endpoint_start() take care of the URB
      cancellation again. As this function is called from both atomic and
      non-atomic context, add a flag to denote whether the function may sleep.
      Signed-off-by: default avatarDaniel Mack <>
      Cc: [3.5+]
      Signed-off-by: default avatarTakashi Iwai <>
  19. 16 Aug, 2012 1 commit
  20. 13 Jul, 2012 1 commit
  21. 06 Jul, 2012 1 commit
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix the first PCM interface assignment · 9e9b5946
      Takashi Iwai authored
      In the new PCM streaming logic, the interface number is assigned to
      usb stream instance (subs->interface) after the format and rate setups
      are succeeded, but some codes are still passing subs->interface as the
      reference to helper functions.  This leads to initializing with an
      invalid iface number (-1).
      This patch replaces the wrong references with the ones from the target
      fmt correctly.
      Signed-off-by: default avatarTakashi Iwai <>
  22. 18 Jun, 2012 2 commits
  23. 31 May, 2012 1 commit
  24. 21 May, 2012 1 commit
  25. 13 Apr, 2012 2 commits
  26. 15 Mar, 2012 1 commit
  27. 27 Sep, 2011 1 commit
  28. 14 Sep, 2011 1 commit