All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch: for Maestro3 on SMP
       [not found] <E19fjn6-0006Fx-00@sc8-sf-list2.sourceforge.net>
@ 2003-07-24 17:35 ` shivaken
  2003-07-24 19:06   ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: shivaken @ 2003-07-24 17:35 UTC (permalink / raw)
  To: alsa-devel

Hi,

Maestro3 driver of linux-2.6.0-test1 (and may be before) has a problem with 
SMP. 
# cannot record properly and sometimes interrupted to play.

Here is a patch.
It worked fine. But I'm new for alsa.
So please test and check alsa-driver's maestro3.c

--- linux-2.6.0-test1/sound/pci/maestro3.c.orig	2003-07-14 12:34:50 +0900
+++ linux-2.6.0-test1/sound/pci/maestro3.c	2003-07-25 02:13:47 +0900
@@ -1526,9 +1526,15 @@
 snd_m3_pcm_pointer(snd_pcm_substream_t * subs)
 {
 	m3_t *chip = snd_pcm_substream_chip(subs);
+        size_t ptr;
+  
+        spin_lock(&chip->reg_lock);
 	m3_dma_t *s = (m3_dma_t*)subs->runtime->private_data;
 	snd_assert(s != NULL, return 0);
-	return bytes_to_frames(subs->runtime, snd_m3_get_pointer(chip, s, subs));
+        ptr = bytes_to_frames(subs->runtime, snd_m3_get_pointer(chip, s, 
subs));
+        spin_unlock(&chip->reg_lock);
+
+	return ptr;
 }

-- 
-- shivaken
antshell: Ant command line front end
http://www.antshell.org


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch: for Maestro3 on SMP
  2003-07-24 17:35 ` Patch: for Maestro3 on SMP shivaken
@ 2003-07-24 19:06   ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2003-07-24 19:06 UTC (permalink / raw)
  To: shivaken; +Cc: alsa-devel

At Fri, 25 Jul 2003 02:35:43 +0900,
shivaken wrote:
> 
> Hi,
> 
> Maestro3 driver of linux-2.6.0-test1 (and may be before) has a problem with 
> SMP. 
> # cannot record properly and sometimes interrupted to play.
> 
> Here is a patch.
> It worked fine. But I'm new for alsa.
> So please test and check alsa-driver's maestro3.c

yes, it should be protected by spinlock.
i modifed the cvs code now.

thanks!


Takashi


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-24 19:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E19fjn6-0006Fx-00@sc8-sf-list2.sourceforge.net>
2003-07-24 17:35 ` Patch: for Maestro3 on SMP shivaken
2003-07-24 19:06   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.