* Is the mixer interface in the kernel protect against concurrent access?
@ 2007-12-17 14:13 Hans-Christian Egtvedt
2007-12-17 15:43 ` Jaroslav Kysela
0 siblings, 1 reply; 3+ messages in thread
From: Hans-Christian Egtvedt @ 2007-12-17 14:13 UTC (permalink / raw)
To: alsa-devel
Hi,
I am solving a locking bug in the at73c213 SPI sound driver, and
wondered if the mixer API is protected against concurrent access in
ALSA? Or should I implement a mutex to protect my hardware against
concurrent access?
--
Mvh
Hans-Christian Egtvedt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is the mixer interface in the kernel protect against concurrent access?
2007-12-17 14:13 Is the mixer interface in the kernel protect against concurrent access? Hans-Christian Egtvedt
@ 2007-12-17 15:43 ` Jaroslav Kysela
2007-12-17 16:07 ` Hans-Christian Egtvedt
0 siblings, 1 reply; 3+ messages in thread
From: Jaroslav Kysela @ 2007-12-17 15:43 UTC (permalink / raw)
To: Hans-Christian Egtvedt; +Cc: alsa-devel
On Mon, 17 Dec 2007, Hans-Christian Egtvedt wrote:
> Hi,
>
> I am solving a locking bug in the at73c213 SPI sound driver, and
> wondered if the mixer API is protected against concurrent access in
> ALSA? Or should I implement a mutex to protect my hardware against
> concurrent access?
Control r/w callbacks are protected with a semaphore -
card->controls_rwsem . See sound/core/control.c for more details. Anyway,
you need to protect your registers with spinlocks (if required of
course).
Jaroslav
-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is the mixer interface in the kernel protect against concurrent access?
2007-12-17 15:43 ` Jaroslav Kysela
@ 2007-12-17 16:07 ` Hans-Christian Egtvedt
0 siblings, 0 replies; 3+ messages in thread
From: Hans-Christian Egtvedt @ 2007-12-17 16:07 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
On Mon, 2007-12-17 at 16:43 +0100, Jaroslav Kysela wrote:
> On Mon, 17 Dec 2007, Hans-Christian Egtvedt wrote:
> > I am solving a locking bug in the at73c213 SPI sound driver, and
> > wondered if the mixer API is protected against concurrent access in
> > ALSA? Or should I implement a mutex to protect my hardware against
> > concurrent access?
>
> Control r/w callbacks are protected with a semaphore -
> card->controls_rwsem . See sound/core/control.c for more details. Anyway,
> you need to protect your registers with spinlocks (if required of
> course).
>
Thanks for the feedback. I settled upon a mutex since the SPI driver can
not use spinlocks due to a might sleepy spi_sync function call.
--
Mvh
Hans-Christian Egtvedt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-17 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-17 14:13 Is the mixer interface in the kernel protect against concurrent access? Hans-Christian Egtvedt
2007-12-17 15:43 ` Jaroslav Kysela
2007-12-17 16:07 ` Hans-Christian Egtvedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).