• Home
  • Raw
  • Download

Lines Matching refs:tscm

22 	struct snd_tscm *tscm = hwdep->private_data;  in hwdep_read()  local
28 spin_lock_irq(&tscm->lock); in hwdep_read()
30 while (!tscm->dev_lock_changed) { in hwdep_read()
31 prepare_to_wait(&tscm->hwdep_wait, &wait, TASK_INTERRUPTIBLE); in hwdep_read()
32 spin_unlock_irq(&tscm->lock); in hwdep_read()
34 finish_wait(&tscm->hwdep_wait, &wait); in hwdep_read()
37 spin_lock_irq(&tscm->lock); in hwdep_read()
40 event.lock_status.status = (tscm->dev_lock_count > 0); in hwdep_read()
41 tscm->dev_lock_changed = false; in hwdep_read()
43 spin_unlock_irq(&tscm->lock); in hwdep_read()
56 struct snd_tscm *tscm = hwdep->private_data; in hwdep_poll() local
59 poll_wait(file, &tscm->hwdep_wait, wait); in hwdep_poll()
61 spin_lock_irq(&tscm->lock); in hwdep_poll()
62 if (tscm->dev_lock_changed) in hwdep_poll()
66 spin_unlock_irq(&tscm->lock); in hwdep_poll()
71 static int hwdep_get_info(struct snd_tscm *tscm, void __user *arg) in hwdep_get_info() argument
73 struct fw_device *dev = fw_parent_device(tscm->unit); in hwdep_get_info()
90 static int hwdep_lock(struct snd_tscm *tscm) in hwdep_lock() argument
94 spin_lock_irq(&tscm->lock); in hwdep_lock()
96 if (tscm->dev_lock_count == 0) { in hwdep_lock()
97 tscm->dev_lock_count = -1; in hwdep_lock()
103 spin_unlock_irq(&tscm->lock); in hwdep_lock()
108 static int hwdep_unlock(struct snd_tscm *tscm) in hwdep_unlock() argument
112 spin_lock_irq(&tscm->lock); in hwdep_unlock()
114 if (tscm->dev_lock_count == -1) { in hwdep_unlock()
115 tscm->dev_lock_count = 0; in hwdep_unlock()
121 spin_unlock_irq(&tscm->lock); in hwdep_unlock()
128 struct snd_tscm *tscm = hwdep->private_data; in hwdep_release() local
130 spin_lock_irq(&tscm->lock); in hwdep_release()
131 if (tscm->dev_lock_count == -1) in hwdep_release()
132 tscm->dev_lock_count = 0; in hwdep_release()
133 spin_unlock_irq(&tscm->lock); in hwdep_release()
141 struct snd_tscm *tscm = hwdep->private_data; in hwdep_ioctl() local
145 return hwdep_get_info(tscm, (void __user *)arg); in hwdep_ioctl()
147 return hwdep_lock(tscm); in hwdep_ioctl()
149 return hwdep_unlock(tscm); in hwdep_ioctl()
174 int snd_tscm_create_hwdep_device(struct snd_tscm *tscm) in snd_tscm_create_hwdep_device() argument
179 err = snd_hwdep_new(tscm->card, "Tascam", 0, &hwdep); in snd_tscm_create_hwdep_device()
186 hwdep->private_data = tscm; in snd_tscm_create_hwdep_device()