Patchworkβ [76/99] ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@

login
register
about
Submitter Greg Kroah-Hartman
Date 2009-11-06 22:15:14
Message ID <20091106221549.324518938@mini.kroah.org>
Download mbox | patch
Permalink /patch/58169/
State New
Headers show

Comments

Greg Kroah-Hartman - 2009-11-06 22:15:14
2.6.31-stable review patch.  If anyone has any objections, please let us know.

------------------
From: David Henningsson <launchpad.web@epost.diwic.se>

commit bd3c200e6d5495343c91db66d2acf1853b57a141 upstream.

If two streams are started immediately after one another (such as a
playback and a recording stream), the call to set hw params fails with
EBUSY. This patch makes the call succeed, so playback and recording will
work properly.

Signed-off-by: David Henningsson <launchpad.web@epost.diwic.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/ice1712/ice1724.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch

--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -643,7 +643,7 @@  static int snd_vt1724_set_pro_rate(struc
 	    (inb(ICEMT1724(ice, DMA_PAUSE)) & DMA_PAUSES)) {
 		/* running? we cannot change the rate now... */
 		spin_unlock_irqrestore(&ice->reg_lock, flags);
-		return -EBUSY;
+		return ((rate == ice->cur_rate) && !force) ? 0 : -EBUSY;
 	}
 	if (!force && is_pro_rate_locked(ice)) {
 		spin_unlock_irqrestore(&ice->reg_lock, flags);