summaryrefslogtreecommitdiffstats
path: root/sound/usb/pcm.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-01-28 07:07:11 +0100
committerOlof Johansson <olof@lixom.net>2013-01-28 07:07:20 +0100
commit6b914c998787d65022e80d6262dfd0edef58cadb (patch)
treeec9d9605ae08e6e40664c4302a181979ab4fe1d3 /sound/usb/pcm.c
parentMerge tag 'cleanup_for_v3.9' of git://git.infradead.org/users/jcooper/linux i... (diff)
parentLinux 3.8-rc5 (diff)
downloadlinux-6b914c998787d65022e80d6262dfd0edef58cadb.tar.xz
linux-6b914c998787d65022e80d6262dfd0edef58cadb.zip
Merge tag 'v3.8-rc5' into next/cleanup
Linux 3.8-rc5 Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r--sound/usb/pcm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index c6593101c049..d82e378d37cb 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -511,6 +511,16 @@ static int configure_sync_endpoint(struct snd_usb_substream *subs)
struct snd_usb_substream *sync_subs =
&subs->stream->substream[subs->direction ^ 1];
+ if (subs->sync_endpoint->type != SND_USB_ENDPOINT_TYPE_DATA ||
+ !subs->stream)
+ return snd_usb_endpoint_set_params(subs->sync_endpoint,
+ subs->pcm_format,
+ subs->channels,
+ subs->period_bytes,
+ subs->cur_rate,
+ subs->cur_audiofmt,
+ NULL);
+
/* Try to find the best matching audioformat. */
list_for_each_entry(fp, &sync_subs->fmt_list, list) {
int score = match_endpoint_audioformats(fp, subs->cur_audiofmt,