From: Takashi Iwai Subject: Re: alsa and locking Date: Fri, 19 May 2006 19:01:33 +0200 Message-ID: References: <1148055062.6228.19.camel@johannes.berg> <1148057163.6228.26.camel@johannes.berg> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1148057163.6228.26.camel@johannes.berg> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Johannes Berg Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Fri, 19 May 2006 18:46:03 +0200, Johannes Berg wrote: > > [1 ] > On Fri, 2006-05-19 at 18:21 +0200, Takashi Iwai wrote: > > > Some descriptions are found in the atomicity section of my tutorial. > > Yes, I've seen that. Rather vague though. > > > All control callbacks are not protected, except for rwsem against > > addition/removal of elements. > > Alright, so it's possible that a user actually changes two controls at > the same time. IOW I have to protect against that. Yes. > > The PCM trigger, pointer and ack callbacks shall be atomic, where > > protected with spinlock and irq disabled. Other PCM callbacks are > > not protected but for open mutex. > > Right. What about prepare and all the other pcm stuff? Can it race > against the same when two apps open capture/playback etc? Yes. open/close are protected via open_mutex in the PCM core level for avoiding open races, but otherwise it's responsibility of the driver. Takashi ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642