Lines Matching refs:bebob
22 struct snd_bebob *bebob = hwdep->private_data; in hwdep_read() local
26 spin_lock_irq(&bebob->lock); in hwdep_read()
28 while (!bebob->dev_lock_changed) { in hwdep_read()
29 prepare_to_wait(&bebob->hwdep_wait, &wait, TASK_INTERRUPTIBLE); in hwdep_read()
30 spin_unlock_irq(&bebob->lock); in hwdep_read()
32 finish_wait(&bebob->hwdep_wait, &wait); in hwdep_read()
35 spin_lock_irq(&bebob->lock); in hwdep_read()
41 event.lock_status.status = (bebob->dev_lock_count > 0); in hwdep_read()
42 bebob->dev_lock_changed = false; in hwdep_read()
44 spin_unlock_irq(&bebob->lock); in hwdep_read()
55 struct snd_bebob *bebob = hwdep->private_data; in hwdep_poll() local
58 poll_wait(file, &bebob->hwdep_wait, wait); in hwdep_poll()
60 spin_lock_irq(&bebob->lock); in hwdep_poll()
61 if (bebob->dev_lock_changed) in hwdep_poll()
65 spin_unlock_irq(&bebob->lock); in hwdep_poll()
71 hwdep_get_info(struct snd_bebob *bebob, void __user *arg) in hwdep_get_info() argument
73 struct fw_device *dev = fw_parent_device(bebob->unit); in hwdep_get_info()
91 hwdep_lock(struct snd_bebob *bebob) in hwdep_lock() argument
95 spin_lock_irq(&bebob->lock); in hwdep_lock()
97 if (bebob->dev_lock_count == 0) { in hwdep_lock()
98 bebob->dev_lock_count = -1; in hwdep_lock()
104 spin_unlock_irq(&bebob->lock); in hwdep_lock()
110 hwdep_unlock(struct snd_bebob *bebob) in hwdep_unlock() argument
114 spin_lock_irq(&bebob->lock); in hwdep_unlock()
116 if (bebob->dev_lock_count == -1) { in hwdep_unlock()
117 bebob->dev_lock_count = 0; in hwdep_unlock()
123 spin_unlock_irq(&bebob->lock); in hwdep_unlock()
131 struct snd_bebob *bebob = hwdep->private_data; in hwdep_release() local
133 spin_lock_irq(&bebob->lock); in hwdep_release()
134 if (bebob->dev_lock_count == -1) in hwdep_release()
135 bebob->dev_lock_count = 0; in hwdep_release()
136 spin_unlock_irq(&bebob->lock); in hwdep_release()
145 struct snd_bebob *bebob = hwdep->private_data; in hwdep_ioctl() local
149 return hwdep_get_info(bebob, (void __user *)arg); in hwdep_ioctl()
151 return hwdep_lock(bebob); in hwdep_ioctl()
153 return hwdep_unlock(bebob); in hwdep_ioctl()
171 int snd_bebob_create_hwdep_device(struct snd_bebob *bebob) in snd_bebob_create_hwdep_device() argument
183 err = snd_hwdep_new(bebob->card, "BeBoB", 0, &hwdep); in snd_bebob_create_hwdep_device()
189 hwdep->private_data = bebob; in snd_bebob_create_hwdep_device()