Lines Matching refs:dg00x
22 struct snd_dg00x *dg00x = hwdep->private_data;
26 spin_lock_irq(&dg00x->lock);
28 while (!dg00x->dev_lock_changed && dg00x->msg == 0) {
29 prepare_to_wait(&dg00x->hwdep_wait, &wait, TASK_INTERRUPTIBLE);
30 spin_unlock_irq(&dg00x->lock);
32 finish_wait(&dg00x->hwdep_wait, &wait);
35 spin_lock_irq(&dg00x->lock);
39 if (dg00x->dev_lock_changed) {
41 event.lock_status.status = (dg00x->dev_lock_count > 0);
42 dg00x->dev_lock_changed = false;
48 event.digi00x_message.message = dg00x->msg;
49 dg00x->msg = 0;
54 spin_unlock_irq(&dg00x->lock);
65 struct snd_dg00x *dg00x = hwdep->private_data;
68 poll_wait(file, &dg00x->hwdep_wait, wait);
70 spin_lock_irq(&dg00x->lock);
71 if (dg00x->dev_lock_changed || dg00x->msg)
75 spin_unlock_irq(&dg00x->lock);
80 static int hwdep_get_info(struct snd_dg00x *dg00x, void __user *arg)
82 struct fw_device *dev = fw_parent_device(dg00x->unit);
99 static int hwdep_lock(struct snd_dg00x *dg00x)
103 spin_lock_irq(&dg00x->lock);
105 if (dg00x->dev_lock_count == 0) {
106 dg00x->dev_lock_count = -1;
112 spin_unlock_irq(&dg00x->lock);
117 static int hwdep_unlock(struct snd_dg00x *dg00x)
121 spin_lock_irq(&dg00x->lock);
123 if (dg00x->dev_lock_count == -1) {
124 dg00x->dev_lock_count = 0;
130 spin_unlock_irq(&dg00x->lock);
137 struct snd_dg00x *dg00x = hwdep->private_data;
139 spin_lock_irq(&dg00x->lock);
140 if (dg00x->dev_lock_count == -1)
141 dg00x->dev_lock_count = 0;
142 spin_unlock_irq(&dg00x->lock);
150 struct snd_dg00x *dg00x = hwdep->private_data;
154 return hwdep_get_info(dg00x, (void __user *)arg);
156 return hwdep_lock(dg00x);
158 return hwdep_unlock(dg00x);
175 int snd_dg00x_create_hwdep_device(struct snd_dg00x *dg00x)
187 err = snd_hwdep_new(dg00x->card, "Digi00x", 0, &hwdep);
194 hwdep->private_data = dg00x;