Skip to contentSkip to conversation

PATCH: ESI Juli@ fails to set sample rate

PATCH David Henningsson 2 participants 4 messages Oct 9, 2009 – Oct 11, 2009 Sound

lore
Share & tools
lore
#0 lore raw

This one-line patch fixes bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/441446
and is likely to fix bug https://bugzilla.redhat.com/show_bug.cgi?id=525595
as well.

The problem for me is that if two streams are started immediately after one another (such as a playback and a recording stream, e g pulseaudio does that on startup), the call to hw_params fail with EBUSY. This patch makes the call succeed, and playback and recording works.

I do not have any other ice1724 soundcard than the ESI Juli@ so I don't know if/how this patch will affect them.

// David

sound/pci/ice1712/ice1724.c +1 -1
index cc84a83..56d1bd8 100644
@@ -643,7 +643,7 @@ static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate,
 	    (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);

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Fri, 09 Oct 2009 21:29:55 +0200,

Quoted 7 lines · David Henningsson

[1 <text/plain; ISO-8859-1 (7bit)>]
This one-line patch fixes bug
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/441446
and is likely to fix bug https://bugzilla.redhat.com/show_bug.cgi?id=525595
as well.

Quoted 7 lines

The problem for me is that if two streams are started immediately after one another (such as a playback and a recording stream, e g pulseaudio does that on startup), the call to hw_params fail with EBUSY. This patch makes the call succeed, and playback and recording works.

I do not have any other ice1724 soundcard than the ESI Juli@ so I don't know if/how this patch will affect them.

Looks good and safe to me. Could you give your sign-off?

thanks,

Takashi

Quoted 21 lines

// David
[2 ice1724-hwparams-fail.patch <text/x-patch (7bit)>]

sound/pci/ice1712/ice1724.c +1 -1
index cc84a83..56d1bd8 100644
@@ -643,7 +643,7 @@ static int snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate,
 	    (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);

[3 <text/plain; us-ascii (7bit)>]
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
Quoted 13 lines · Takashi Iwai

At Fri, 09 Oct 2009 21:29:55 +0200,

Quoted 11 lines · David Henningsson

[1 <text/plain; ISO-8859-1 (7bit)>]
This one-line patch fixes bug
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/441446
and is likely to fix bug https://bugzilla.redhat.com/show_bug.cgi?id=525595
as well.

The problem for me is that if two streams are started immediately after one another (such as a playback and a recording stream, e g pulseaudio does that on startup), the call to hw_params fail with EBUSY. This patch makes the call succeed, and playback and recording works.

Quoted 4 lines
Quoted 2 lines

I do not have any other ice1724 soundcard than the ESI Juli@ so I don't know if/how this patch will affect them.

Looks good and safe to me. Could you give your sign-off?

Hopefully I got the things right this time (see the other message posted to alsa-devel). If the diff does not apply cleanly, it might be that I'm diffing against the wrong git tree, so to avoid that in the future, exactly what git tree would you like to be diffed against?

// David

#3 lore raw

At Sun, 11 Oct 2009 11:42:12 +0200,

Quoted 15 lines · David Henningsson
Quoted 13 lines · Takashi Iwai

At Fri, 09 Oct 2009 21:29:55 +0200,

Quoted 11 lines · David Henningsson

[1 <text/plain; ISO-8859-1 (7bit)>]
This one-line patch fixes bug
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/441446
and is likely to fix bug https://bugzilla.redhat.com/show_bug.cgi?id=525595
as well.

The problem for me is that if two streams are started immediately after one another (such as a playback and a recording stream, e g pulseaudio does that on startup), the call to hw_params fail with EBUSY. This patch makes the call succeed, and playback and recording works.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

I do not have any other ice1724 soundcard than the ESI Juli@ so I don't know if/how this patch will affect them.

Looks good and safe to me. Could you give your sign-off?

Hopefully I got the things right this time (see the other message posted to alsa-devel).

Applied now. It'd be helpful if you add me to Cc at the next time.

Quoted 5 lines

If the diff does not apply cleanly, it might be that I'm diffing against the wrong git
tree, so to avoid that in the future, exactly what git tree would you like to be diffed
against?

Depends. If the patch is a quick fix for the upstream Linus tree, then make a diff against Linus git tree. If the patch is for next next kernel release, diff against my sound git tree, either master or for-next branch:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git

thanks,

Takashi