Lines Matching +full:slider +full:-

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * usbusx2y.c - ALSA USB US-428 Driver
5 2005-04-14 Karsten Wiese
8 Tested ok with kernel 2.6.12-rc2.
10 2004-12-14 Karsten Wiese
12 …snd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device bei…
14 2004-12-02 Karsten Wiese
18 2004-10-26 Karsten Wiese
22 2004-10-21 Karsten Wiese
26 2004-10-03 Karsten Wiese
30 2004-09-30 Karsten Wiese
34 2004-09-20 Karsten Wiese
38 2004-07-13 Karsten Wiese
43 2004-06-21 Karsten Wiese
48 2004-06-12 Karsten Wiese
53 2004-04-06 Karsten Wiese
55 Runs on 2.6.5 kernel without any "--with-debug=" things.
58 2004-01-14 Karsten Wiese
62 2003-12-30 Karsten Wiese
66 2003-11-27 Karsten Wiese, Martin Langer
71 2003-11-03 Karsten Wiese
74 "arecord -D hw:1 -c 2 -r 48000 -M -f S24_3LE|aplay -D hw:1 -c 2 -r 48000 -M -f S24_3LE" works.
76 2003-08-22 Karsten Wiese
78 Removed EZUSB Firmware. First Stage Firmwaredownload is now done by tascam-firmware downloader.
80 http://usb-midi-fw.sourceforge.net/tascam-firmware.tar.gz
82 2003-06-18 Karsten Wiese
86 2002-10-16 Karsten Wiese
88 compiles again with alsa-current.
90 urb->start_frame is calculated here now, some calls inside usb-driver don't need to happen anymore.
93 …Disable APM-support in the kernel as APM-BIOS calls (once each second) hard disable interrupt for …
97 To autoload snd-usb-midi append a line
98 post-install snd-usb-us428 modprobe snd-usb-midi
102 sliders, knobs, lights not yet handled except MASTER Volume slider.
103 "pcm -c 2" doesn't work. "pcm -c 2 -m direct_interleaved" does.
106 2002-08-31 Karsten Wiese
112 2002-08-09 Karsten Wiese
113 Version 0.0.2: midi works with snd-usb-midi, audio (only fullduplex now) with i.e. bristol.
114 The firmware has been sniffed from win2k us-428 driver 3.09.
116 * Copyright (c) 2002 - 2004 Karsten Wiese
138 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */
160 if (urb->status) { in i_usx2y_out04_int()
162 struct usx2ydev *usx2y = urb->context; in i_usx2y_out04_int()
164 for (i = 0; i < 10 && usx2y->as04.urb[i] != urb; i++) in i_usx2y_out04_int()
166 dev_dbg(&urb->dev->dev, "%s urb %i status=%i\n", __func__, i, urb->status); in i_usx2y_out04_int()
174 struct usx2ydev *usx2y = urb->context; in i_usx2y_in04_int()
175 struct us428ctls_sharedmem *us428ctls = usx2y->us428ctls_sharedmem; in i_usx2y_in04_int()
179 usx2y->in04_int_calls++; in i_usx2y_in04_int()
181 if (urb->status) { in i_usx2y_in04_int()
182 dev_dbg(&urb->dev->dev, "Interrupt Pipe 4 came back with status=%i\n", urb->status); in i_usx2y_in04_int()
187 diff = -1; in i_usx2y_in04_int()
188 if (us428ctls->ctl_snapshot_last == -2) { in i_usx2y_in04_int()
190 memcpy(usx2y->in04_last, usx2y->in04_buf, sizeof(usx2y->in04_last)); in i_usx2y_in04_int()
191 us428ctls->ctl_snapshot_last = -1; in i_usx2y_in04_int()
194 if (usx2y->in04_last[i] != ((char *)usx2y->in04_buf)[i]) { in i_usx2y_in04_int()
197 usx2y->in04_last[i] = ((char *)usx2y->in04_buf)[i]; in i_usx2y_in04_int()
202 n = us428ctls->ctl_snapshot_last + 1; in i_usx2y_in04_int()
205 memcpy(us428ctls->ctl_snapshot + n, usx2y->in04_buf, sizeof(us428ctls->ctl_snapshot[0])); in i_usx2y_in04_int()
206 us428ctls->ctl_snapshot_differs_at[n] = diff; in i_usx2y_in04_int()
207 us428ctls->ctl_snapshot_last = n; in i_usx2y_in04_int()
208 wake_up(&usx2y->us428ctls_wait_queue_head); in i_usx2y_in04_int()
212 if (usx2y->us04) { in i_usx2y_in04_int()
213 if (!usx2y->us04->submitted) { in i_usx2y_in04_int()
215 err = usb_submit_urb(usx2y->us04->urb[usx2y->us04->submitted++], GFP_ATOMIC); in i_usx2y_in04_int()
216 } while (!err && usx2y->us04->submitted < usx2y->us04->len); in i_usx2y_in04_int()
219 if (us428ctls && us428ctls->p4out_last >= 0 && us428ctls->p4out_last < N_US428_P4OUT_BUFS) { in i_usx2y_in04_int()
220 if (us428ctls->p4out_last != us428ctls->p4out_sent) { in i_usx2y_in04_int()
221 send = us428ctls->p4out_sent + 1; in i_usx2y_in04_int()
225 if (!usx2y->as04.urb[j]->status) { in i_usx2y_in04_int()
226 p4out = us428ctls->p4out + send; // FIXME if more than 1 p4out is new, 1 gets lost. in i_usx2y_in04_int()
227 usb_fill_bulk_urb(usx2y->as04.urb[j], usx2y->dev, in i_usx2y_in04_int()
228 usb_sndbulkpipe(usx2y->dev, 0x04), &p4out->val.vol, in i_usx2y_in04_int()
229 p4out->type == ELT_LIGHT ? sizeof(struct us428_lights) : 5, in i_usx2y_in04_int()
231 err = usb_submit_urb(usx2y->as04.urb[j], GFP_ATOMIC); in i_usx2y_in04_int()
232 us428ctls->p4out_sent = send; in i_usx2y_in04_int()
241 dev_err(&urb->dev->dev, "in04_int() usb_submit_urb err=%i\n", err); in i_usx2y_in04_int()
243 urb->dev = usx2y->dev; in i_usx2y_in04_int()
254 if (WARN_ON(usx2y->as04.buffer)) in usx2y_async_seq04_init()
255 return -EBUSY; in usx2y_async_seq04_init()
257 usx2y->as04.buffer = kmalloc_array(URBS_ASYNC_SEQ, in usx2y_async_seq04_init()
259 if (!usx2y->as04.buffer) { in usx2y_async_seq04_init()
260 err = -ENOMEM; in usx2y_async_seq04_init()
263 usx2y->as04.urb[i] = usb_alloc_urb(0, GFP_KERNEL); in usx2y_async_seq04_init()
264 if (!usx2y->as04.urb[i]) { in usx2y_async_seq04_init()
265 err = -ENOMEM; in usx2y_async_seq04_init()
268 usb_fill_bulk_urb(usx2y->as04.urb[i], usx2y->dev, in usx2y_async_seq04_init()
269 usb_sndbulkpipe(usx2y->dev, 0x04), in usx2y_async_seq04_init()
270 usx2y->as04.buffer + URB_DATA_LEN_ASYNC_SEQ * i, 0, in usx2y_async_seq04_init()
272 err = usb_urb_ep_type_check(usx2y->as04.urb[i]); in usx2y_async_seq04_init()
278 usx2y_unlinkseq(&usx2y->as04); in usx2y_async_seq04_init()
286 if (WARN_ON(usx2y->in04_urb)) in usx2y_in04_init()
287 return -EBUSY; in usx2y_in04_init()
289 usx2y->in04_urb = usb_alloc_urb(0, GFP_KERNEL); in usx2y_in04_init()
290 if (!usx2y->in04_urb) { in usx2y_in04_init()
291 err = -ENOMEM; in usx2y_in04_init()
295 usx2y->in04_buf = kmalloc(21, GFP_KERNEL); in usx2y_in04_init()
296 if (!usx2y->in04_buf) { in usx2y_in04_init()
297 err = -ENOMEM; in usx2y_in04_init()
301 init_waitqueue_head(&usx2y->in04_wait_queue); in usx2y_in04_init()
302 usb_fill_int_urb(usx2y->in04_urb, usx2y->dev, usb_rcvintpipe(usx2y->dev, 0x4), in usx2y_in04_init()
303 usx2y->in04_buf, 21, in usx2y_in04_init()
306 if (usb_urb_ep_type_check(usx2y->in04_urb)) { in usx2y_in04_init()
307 err = -EINVAL; in usx2y_in04_init()
310 return usb_submit_urb(usx2y->in04_urb, GFP_KERNEL); in usx2y_in04_init()
313 kfree(usx2y->in04_buf); in usx2y_in04_init()
314 usb_free_urb(usx2y->in04_urb); in usx2y_in04_init()
315 usx2y->in04_buf = NULL; in usx2y_in04_init()
316 usx2y->in04_urb = NULL; in usx2y_in04_init()
325 if (!s->urb[i]) in usx2y_unlinkseq()
327 usb_kill_urb(s->urb[i]); in usx2y_unlinkseq()
328 usb_free_urb(s->urb[i]); in usx2y_unlinkseq()
329 s->urb[i] = NULL; in usx2y_unlinkseq()
331 kfree(s->buffer); in usx2y_unlinkseq()
332 s->buffer = NULL; in usx2y_unlinkseq()
367 return -ENODEV; in usx2y_create_card()
368 err = snd_card_new(&intf->dev, index[dev], id[dev], THIS_MODULE, in usx2y_create_card()
372 snd_usx2y_card_used[usx2y(card)->card_index = dev] = 1; in usx2y_create_card()
373 card->private_free = snd_usx2y_card_private_free; in usx2y_create_card()
374 usx2y(card)->dev = device; in usx2y_create_card()
375 init_waitqueue_head(&usx2y(card)->prepare_wait_queue); in usx2y_create_card()
376 init_waitqueue_head(&usx2y(card)->us428ctls_wait_queue_head); in usx2y_create_card()
377 mutex_init(&usx2y(card)->pcm_mutex); in usx2y_create_card()
378 INIT_LIST_HEAD(&usx2y(card)->midi_list); in usx2y_create_card()
379 strcpy(card->driver, "USB "NAME_ALLCAPS""); in usx2y_create_card()
380 sprintf(card->shortname, "TASCAM "NAME_ALLCAPS""); in usx2y_create_card()
381 sprintf(card->longname, "%s (%x:%x if %d at %03d/%03d)", in usx2y_create_card()
382 card->shortname, in usx2y_create_card()
383 le16_to_cpu(device->descriptor.idVendor), in usx2y_create_card()
384 le16_to_cpu(device->descriptor.idProduct), in usx2y_create_card()
385 0,//us428(card)->usbmidi.ifnum, in usx2y_create_card()
386 usx2y(card)->dev->bus->busnum, usx2y(card)->dev->devnum); in usx2y_create_card()
395 kfree(usx2y->in04_buf); in snd_usx2y_card_private_free()
396 usb_free_urb(usx2y->in04_urb); in snd_usx2y_card_private_free()
397 if (usx2y->us428ctls_sharedmem) in snd_usx2y_card_private_free()
398 free_pages_exact(usx2y->us428ctls_sharedmem, in snd_usx2y_card_private_free()
400 if (usx2y->card_index >= 0 && usx2y->card_index < SNDRV_CARDS) in snd_usx2y_card_private_free()
401 snd_usx2y_card_used[usx2y->card_index] = 0; in snd_usx2y_card_private_free()
414 usx2y->chip_status = USX2Y_STAT_CHIP_HUP; in snd_usx2y_disconnect()
415 usx2y_unlinkseq(&usx2y->as04); in snd_usx2y_disconnect()
416 usb_kill_urb(usx2y->in04_urb); in snd_usx2y_disconnect()
420 list_for_each(p, &usx2y->midi_list) { in snd_usx2y_disconnect()
423 if (usx2y->us428ctls_sharedmem) in snd_usx2y_disconnect()
424 wake_up(&usx2y->us428ctls_wait_queue_head); in snd_usx2y_disconnect()
435 if (le16_to_cpu(device->descriptor.idVendor) != 0x1604 || in snd_usx2y_probe()
436 (le16_to_cpu(device->descriptor.idProduct) != USB_ID_US122 && in snd_usx2y_probe()
437 le16_to_cpu(device->descriptor.idProduct) != USB_ID_US224 && in snd_usx2y_probe()
438 le16_to_cpu(device->descriptor.idProduct) != USB_ID_US428)) in snd_usx2y_probe()
439 return -EINVAL; in snd_usx2y_probe()
451 dev_set_drvdata(&intf->dev, card); in snd_usx2y_probe()
460 .name = "snd-usb-usx2y",