diff options
author | Daniel Mack <zonque@gmail.com> | 2012-08-30 18:52:30 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-08-31 21:03:48 +0200 |
commit | 245baf983cc39524cce39c24d01b276e6e653c9e (patch) | |
tree | 2fbd88aebcbbe95b60a6ae62d946a840ae1ff28b /sound/usb/endpoint.h | |
parent | fbcfbf5f673847657ccd98afb4d8e13af7fdc372 (diff) |
ALSA: snd-usb: fix calls to next_packet_size
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
now.
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: Daniel Mack <zonque@gmail.com>
Cc: stable@kernel.org [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.h')
-rw-r--r-- | sound/usb/endpoint.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/endpoint.h b/sound/usb/endpoint.h index a8e60c1408e..cbbbdf226d6 100644 --- a/sound/usb/endpoint.h +++ b/sound/usb/endpoint.h @@ -21,6 +21,7 @@ int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep); void snd_usb_endpoint_free(struct list_head *head); int snd_usb_endpoint_implict_feedback_sink(struct snd_usb_endpoint *ep); +int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep); void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep, struct snd_usb_endpoint *sender, |