stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ALSA: line6: Fix -EBUSY error during active monitoring" has been added to the 4.1-stable tree
@ 2015-08-07 21:14 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-08-07 21:14 UTC (permalink / raw)
  To: tiwai, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ALSA: line6: Fix -EBUSY error during active monitoring

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-line6-fix-ebusy-error-during-active-monitoring.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 4d0e677523a999e1dec28e55cc314c47ba09ca12 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 14 Jul 2015 15:19:37 +0200
Subject: ALSA: line6: Fix -EBUSY error during active monitoring

From: Takashi Iwai <tiwai@suse.de>

commit 4d0e677523a999e1dec28e55cc314c47ba09ca12 upstream.

When a monitor stream is active, the next PCM stream access results in
EBUSY error because of the check in line6_stream_start().  Fix this by
just skipping the submission of pending URBs when the stream is
already running instead.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=101431
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/line6/pcm.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

--- a/sound/usb/line6/pcm.c
+++ b/sound/usb/line6/pcm.c
@@ -186,12 +186,8 @@ static int line6_stream_start(struct snd
 	int ret = 0;
 
 	spin_lock_irqsave(&pstr->lock, flags);
-	if (!test_and_set_bit(type, &pstr->running)) {
-		if (pstr->active_urbs || pstr->unlink_urbs) {
-			ret = -EBUSY;
-			goto error;
-		}
-
+	if (!test_and_set_bit(type, &pstr->running) &&
+	    !(pstr->active_urbs || pstr->unlink_urbs)) {
 		pstr->count = 0;
 		/* Submit all currently available URBs */
 		if (direction == SNDRV_PCM_STREAM_PLAYBACK)
@@ -199,7 +195,6 @@ static int line6_stream_start(struct snd
 		else
 			ret = line6_submit_audio_in_all_urbs(line6pcm);
 	}
- error:
 	if (ret < 0)
 		clear_bit(type, &pstr->running);
 	spin_unlock_irqrestore(&pstr->lock, flags);


Patches currently in stable-queue which might be from tiwai@suse.de are

queue-4.1/alsa-line6-fix-ebusy-error-during-active-monitoring.patch
queue-4.1/alsa-hda-add-new-amd-pci-ids-with-proper-driver-caps.patch
queue-4.1/alsa-usb-audio-add-midi-support-for-steinberg-mi2-mi4.patch
queue-4.1/alsa-hda-apply-fixup-for-another-toshiba-satellite-s50d.patch
queue-4.1/alsa-pcm-fix-lockdep-warning-with-nonatomic-pcm-ops.patch
queue-4.1/alsa-hda-add-new-gpu-codec-id-0x10de007d-to-snd-hda.patch
queue-4.1/alsa-usb-audio-add-db-range-mapping-for-some-devices.patch
queue-4.1/alsa-hda-add-headset-mic-support-for-acer-aspire-v5-573g.patch
queue-4.1/alsa-hda-apply-a-fixup-to-dell-vostro-5480.patch
queue-4.1/alsa-hda-fix-macbook-pro-5-2-quirk.patch
queue-4.1/alsa-hda-add-headset-mic-pin-quirk-for-a-dell-device.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-07 21:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-07 21:14 Patch "ALSA: line6: Fix -EBUSY error during active monitoring" has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).