Commit bd3c200e authored by David Henningsson's avatar David Henningsson Committed by Takashi Iwai
Browse files

ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@



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: default avatarDavid Henningsson <launchpad.web@epost.diwic.se>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 43189a38
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -648,7 +648,7 @@ static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate,
	    (inb(ICEMT1724(ice, DMA_PAUSE)) & DMA_PAUSES)) {
	    (inb(ICEMT1724(ice, DMA_PAUSE)) & DMA_PAUSES)) {
		/* running? we cannot change the rate now... */
		/* running? we cannot change the rate now... */
		spin_unlock_irqrestore(&ice->reg_lock, flags);
		spin_unlock_irqrestore(&ice->reg_lock, flags);
		return -EBUSY;
		return ((rate == ice->cur_rate) && !force) ? 0 : -EBUSY;
	}
	}
	if (!force && is_pro_rate_locked(ice)) {
	if (!force && is_pro_rate_locked(ice)) {
		spin_unlock_irqrestore(&ice->reg_lock, flags);
		spin_unlock_irqrestore(&ice->reg_lock, flags);