Lines Matching refs:line6pcm
30 struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
35 spin_lock_irqsave(&line6pcm->lock_trigger, flags);
36 clear_bit(BIT_PREPARED, &line6pcm->flags);
44 spin_unlock_irqrestore(&line6pcm->lock_trigger,
55 spin_unlock_irqrestore(&line6pcm->lock_trigger,
68 spin_unlock_irqrestore(&line6pcm->lock_trigger, flags);
88 struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
91 ucontrol->value.integer.value[i] = line6pcm->volume[i];
101 struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
104 if (line6pcm->volume[i] != ucontrol->value.integer.value[i]) {
105 line6pcm->volume[i] = ucontrol->value.integer.value[i];
129 struct snd_line6_pcm *line6pcm = snd_pcm_chip(pcm);
132 if (line6pcm->urb_audio_out[i]) {
133 usb_kill_urb(line6pcm->urb_audio_out[i]);
134 usb_free_urb(line6pcm->urb_audio_out[i]);
136 if (line6pcm->urb_audio_in[i]) {
137 usb_kill_urb(line6pcm->urb_audio_in[i]);
138 usb_free_urb(line6pcm->urb_audio_in[i]);
144 static int snd_line6_new_pcm(struct snd_line6_pcm *line6pcm)
149 err = snd_pcm_new(line6pcm->line6->card,
150 (char *)line6pcm->line6->properties->name,
155 pcm->private_data = line6pcm;
157 line6pcm->pcm = pcm;
158 strcpy(pcm->name, line6pcm->line6->properties->name);
192 struct snd_line6_pcm *line6pcm;
240 line6pcm = kzalloc(sizeof(struct snd_line6_pcm), GFP_KERNEL);
242 if (line6pcm == NULL)
245 line6pcm->volume[0] = line6pcm->volume[1] = 128;
246 line6pcm->line6 = line6;
247 line6pcm->ep_audio_read = ep_read;
248 line6pcm->ep_audio_write = ep_write;
249 line6pcm->max_packet_size = usb_maxpacket(line6->usbdev,
253 line6pcm->properties = properties;
254 line6->line6pcm = line6pcm;
263 err = snd_line6_new_pcm(line6pcm);
267 spin_lock_init(&line6pcm->lock_audio_out);
268 spin_lock_init(&line6pcm->lock_audio_in);
269 spin_lock_init(&line6pcm->lock_trigger);
271 err = create_audio_out_urbs(line6pcm);
275 err = create_audio_in_urbs(line6pcm);
280 err = snd_ctl_add(line6->card, snd_ctl_new1(&line6_control, line6pcm));
290 struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
292 if (!test_and_set_bit(BIT_PREPARED, &line6pcm->flags)) {
293 unlink_wait_clear_audio_out_urbs(line6pcm);
294 line6pcm->pos_out = 0;
295 line6pcm->pos_out_done = 0;
297 unlink_wait_clear_audio_in_urbs(line6pcm);
298 line6pcm->bytes_out = 0;
299 line6pcm->pos_in_done = 0;
300 line6pcm->bytes_in = 0;