• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/core/

Lines Matching refs:hw

58 	struct snd_hwdep *hw = file->private_data;
59 if (hw->ops.llseek)
60 return hw->ops.llseek(hw, file, offset, orig);
67 struct snd_hwdep *hw = file->private_data;
68 if (hw->ops.read)
69 return hw->ops.read(hw, buf, count, offset);
76 struct snd_hwdep *hw = file->private_data;
77 if (hw->ops.write)
78 return hw->ops.write(hw, buf, count, offset);
85 struct snd_hwdep *hw;
90 hw = snd_lookup_minor_data(iminor(inode),
94 hw = snd_lookup_oss_minor_data(iminor(inode),
99 if (hw == NULL)
102 if (!try_module_get(hw->card->module))
106 add_wait_queue(&hw->open_wait, &wait);
107 mutex_lock(&hw->open_mutex);
109 if (hw->exclusive && hw->used > 0) {
113 if (!hw->ops.open) {
117 err = hw->ops.open(hw, file);
128 mutex_unlock(&hw->open_mutex);
130 mutex_lock(&hw->open_mutex);
136 remove_wait_queue(&hw->open_wait, &wait);
138 err = snd_card_file_add(hw->card, file);
140 file->private_data = hw;
141 hw->used++;
143 if (hw->ops.release)
144 hw->ops.release(hw, file);
147 mutex_unlock(&hw->open_mutex);
149 module_put(hw->card->module);
156 struct snd_hwdep *hw = file->private_data;
157 struct module *mod = hw->card->module;
159 mutex_lock(&hw->open_mutex);
160 if (hw->ops.release)
161 err = hw->ops.release(hw, file);
162 if (hw->used > 0)
163 hw->used--;
164 mutex_unlock(&hw->open_mutex);
165 wake_up(&hw->open_wait);
167 snd_card_file_remove(hw->card, file);
174 struct snd_hwdep *hw = file->private_data;
175 if (hw->ops.poll)
176 return hw->ops.poll(hw, file, wait);
180 static int snd_hwdep_info(struct snd_hwdep *hw,
186 info.card = hw->card->number;
187 strlcpy(info.id, hw->id, sizeof(info.id));
188 strlcpy(info.name, hw->name, sizeof(info.name));
189 info.iface = hw->iface;
195 static int snd_hwdep_dsp_status(struct snd_hwdep *hw,
201 if (! hw->ops.dsp_status)
204 info.dsp_loaded = hw->dsp_loaded;
205 if ((err = hw->ops.dsp_status(hw, &info)) < 0)
212 static int snd_hwdep_dsp_load(struct snd_hwdep *hw,
218 if (! hw->ops.dsp_load)
224 if (hw->dsp_loaded & (1 << info.index))
228 err = hw->ops.dsp_load(hw, &info);
231 hw->dsp_loaded |= (1 << info.index);
238 struct snd_hwdep *hw = file->private_data;
244 return snd_hwdep_info(hw, argp);
246 return snd_hwdep_dsp_status(hw, argp);
248 return snd_hwdep_dsp_load(hw, argp);
250 if (hw->ops.ioctl)
251 return hw->ops.ioctl(hw, file, cmd, arg);
257 struct snd_hwdep *hw = file->private_data;
258 if (hw->ops.mmap)
259 return hw->ops.mmap(hw, file, vma);