All of lore.kernel.org
 help / color / mirror / Atom feed
* Why use spin_lock or spin_lock_irq in trigger callback (audio capture)?
@ 2010-02-25 21:32 Yiliang Bao
  2010-02-26  9:05 ` Clemens Ladisch
  0 siblings, 1 reply; 2+ messages in thread
From: Yiliang Bao @ 2010-02-25 21:32 UTC (permalink / raw)
  To: alsa-devel

Hi,

I looked at some PCI audio capture driver like BT878 (sound/pci/bt87x.c) or
SAA7134 (drivers/media/video/saa7134-alsa.c), I found that spin_lock instead
of spin_lock_irq (or spin_lock_irqsave) is used in trigger function. Is
there any reason for that?

Thanks,
Yiliang

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

* Re: Why use spin_lock or spin_lock_irq in trigger callback (audio capture)?
  2010-02-25 21:32 Why use spin_lock or spin_lock_irq in trigger callback (audio capture)? Yiliang Bao
@ 2010-02-26  9:05 ` Clemens Ladisch
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2010-02-26  9:05 UTC (permalink / raw)
  To: Yiliang Bao; +Cc: alsa-devel

Yiliang Bao wrote:
> I looked at some PCI audio capture driver like BT878 (sound/pci/bt87x.c) or
> SAA7134 (drivers/media/video/saa7134-alsa.c), I found that spin_lock instead
> of spin_lock_irq (or spin_lock_irqsave) is used in trigger function. Is
> there any reason for that?

Yes, the trigger callback is called with interrupts already disabled.
http://www.alsa-project.org/~tiwai/writing-an-alsa-driver/ch05s08.html


Regards,
Clemens

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

end of thread, other threads:[~2010-02-26  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25 21:32 Why use spin_lock or spin_lock_irq in trigger callback (audio capture)? Yiliang Bao
2010-02-26  9:05 ` Clemens Ladisch

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.