[alsa-devel] Why use spin_lock or spin_lock_irq in trigger callback (audio capture)?
25 Feb
2010
25 Feb
'10
10:32 p.m.
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
26 Feb
26 Feb
10:05 a.m.
New subject: [alsa-devel] Why use spin_lock or spin_lock_irq in trigger callback (audio capture)?
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
5413
Age (days ago)
5414
Last active (days ago)
1 comments
2 participants
participants (2)
-
Clemens Ladisch
-
Yiliang Bao