Lines Matching +full:serial +full:- +full:midi

18    9. MIDI function
23 14. SERIAL function
38 Function-specific configfs interface
39 ------------------------------------
46 The attribute is read-only.
48 There can be at most 4 ACM/generic serial/OBEX ports in the system.
52 ------------------------
77 Function-specific configfs interface
78 ------------------------------------
100 ------------------------
117 Function-specific configfs interface
118 ------------------------------------
140 -------------------------------
157 Function-specific configfs interface
158 ------------------------------------
180 ------------------------
197 Function-specific configfs interface
198 ------------------------------------
210 ------------------------
221 Function-specific configfs interface
222 ------------------------------------
247 $ echo -ne \\x05\\x01\\x09\\x06\\xa1.....
250 ------------------------
254 - create the gadget
255 - connect the gadget to a host, preferably not the one used
257 - run a program which writes to /dev/hidg<N>, e.g.
264 - observe the keystrokes from the gadget
271 Function-specific configfs interface
272 ------------------------------------
283 -----------------------------
287 host: test-usb (tools/usb/testusb.c)
294 Function-specific configfs interface
295 ------------------------------------
328 read-only. This is implied if CD-ROM emulation
334 being a CD-ROM.
337 forced_eject This write-only file is useful only when
341 Any non-zero number of bytes written will
346 ---------------------------------
352 9. MIDI function
357 Function-specific configfs interface
358 ------------------------------------
360 The function name to use when creating the function directory is "midi".
361 The MIDI function provides these attributes in its function directory:
364 buflen MIDI buffer length
365 id ID string for the USB MIDI adapter
366 in_ports number of MIDI input ports
367 index index value for the USB MIDI adapter
368 out_ports number of MIDI output ports
372 Testing the MIDI function
373 -------------------------
382 $ arecordmidi -l
384 14:0 Midi Through Midi Through Port-0
385 24:0 MIDI Gadget MIDI Gadget MIDI 1
386 $ arecordmidi -p 24:0 from_gadget.mid
390 $ aplaymidi -l
394 $ aplaymidi -p 20:0 to_host.mid
400 $ arecordmidi -l
404 $ arecordmidi -p 20:0 from_host.mid
408 $ aplaymidi -l
410 14:0 Midi Through Midi Through Port-0
411 24:0 MIDI Gadget MIDI Gadget MIDI 1
413 $ aplaymidi -p24:0 to_gadget.mid
419 MIDI files can be played to speakers/headphones with e.g. timidity installed::
421 $ aplaymidi -l
423 14:0 Midi Through Midi Through Port-0
424 24:0 MIDI Gadget MIDI Gadget MIDI 1
430 $ aplaymidi -p 128:0 file.mid
432 MIDI ports can be logically connected using the aconnect utility, e.g.::
436 After the gadget's MIDI port is connected to timidity's MIDI port,
437 whatever is played at the gadget side with aplaymidi -l is audible
445 Function-specific configfs interface
446 ------------------------------------
470 ------------------------
487 Function-specific configfs interface
488 ------------------------------------
495 The attribute is read-only.
497 There can be at most 4 ACM/generic serial/OBEX ports in the system.
500 -------------------------
504 seriald -f /dev/ttyGS<Y> -s 1024
508 serialc -v <vendorID> -p <productID> -i<interface#> -a1 -s1024 \
509 -t<out endpoint addr> -r<in endpoint addr>
513 https://github.com/felipebalbi/usb-tools.git master
520 Function-specific configfs interface
521 ------------------------------------
532 ---------------------------
538 http://www.spinics.net/lists/linux-usb/msg85689.html
542 git://git.gitorious.org/meego-cellular/phonet-utils.git
546 $ ./phonet -a 0x10 -i usbpn0
553 $ ./phonet -a 0x6c -i upnlink0
559 http://www.spinics.net/lists/linux-usb/msg85690.html
563 $ ./pnxmit -a 0x6c -r
567 $ ./pnxmit -a 0x10 -s 0x6c
574 $ ./pnxmit -a 0x10 -r
578 $ ./pnxmit -a 0x6c -s 0x10
585 Function-specific configfs interface
586 ------------------------------------
608 --------------------------
620 14. SERIAL function
625 Function-specific configfs interface
626 ------------------------------------
629 The SERIAL function provides just one attribute in its function directory:
633 The attribute is read-only.
635 There can be at most 4 ACM/generic serial/OBEX ports in the system.
637 Testing the SERIAL function
638 ---------------------------
643 echo VID PID >/sys/bus/usb-serial/drivers/generic/new_id
668 Function-specific configfs interface
669 ------------------------------------
677 isoc_maxpacket 0 - 1023 (fs), 0 - 1024 (hs/ss)
686 -------------------------------
690 host: test-usb (tools/usb/testusb.c)
698 Function-specific configfs interface
699 ------------------------------------
717 -------------------------
723 aplay -l # should list our USB Audio Gadget
730 Function-specific configfs interface
731 ------------------------------------
738 c_srate list of capture sampling rates (comma-separated)
746 c_hs_bint capture bInterval for HS/SS (1-4: fixed, 0: auto)
749 p_srate list of playback sampling rates (comma-separated)
756 p_hs_bint playback bInterval for HS/SS (1-4: fixed, 0: auto)
757 req_number the number of pre-allocated request for both capture
767 -------------------------
770 host: aplay -l # should list our USB Audio Gadget
777 $ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
781 $ arecord -f dat -t wav -D hw:CARD=UAC2Gadget,DEV=0 | \
782 aplay -D default:CARD=OdroidU3
789 Function-specific configfs interface
790 ------------------------------------
826 # ln -s header/h class/fs
827 # ln -s header/h class/ss
828 # mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
837 # ln -s ../../uncompressed/u
839 # ln -s ../../header/h
841 # ln -s ../../header/h
843 # ln -s ../../header/h
847 ------------------------
851 # uvc-gadget -u /dev/video<uvc video node #> -v /dev/video<vivid video node #>
853 where uvc-gadget is this program:
854 http://git.ideasonboard.org/uvc-gadget.git
858 http://www.spinics.net/lists/linux-usb/msg99220.html
862 luvcview -f yuv
869 Function-specific configfs interface
870 ------------------------------------
881 ----------------------------
887 # ls -l /devices/virtual/usb_printer_gadget/
897 host->device transmission:
907 device->host transmission::
926 Function-specific configfs interface
927 ------------------------------------
934 c_srate list of capture sampling rates (comma-separated)
942 p_srate list of playback sampling rates (comma-separated)
949 req_number the number of pre-allocated requests for both capture
957 -------------------------
960 host: aplay -l # should list our USB Audio Gadget
967 $ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
971 $ arecord -f dat -t wav -D hw:CARD=UAC1Gadget,DEV=0 | \
972 aplay -D default:CARD=OdroidU3
984 Function-specific configfs interface
985 ------------------------------------
989 as the card top-level information:
998 attributes for a UMP Endpoint (which is a pair of USB MIDI Endpoints):
1001 protocol_caps MIDI protocol capabilities;
1002 1: MIDI 1.0, 2: MIDI 2.0, or 3: both protocols
1003 protocol Default MIDI protocol (either 1 or 2)
1020 first_group The first UMP Group number (0-15)
1021 num_groups The number of groups in this FB (1-16)
1022 midi1_first_group The first UMP Group number for MIDI 1.0 (0-15)
1023 midi1_num_groups The number of groups for MIDI 1.0 (0-16)
1024 ui_hint UI-hint of this FB
1026 midi_ci_verison Supported MIDI-CI version number (8 bit)
1027 is_midi1 Legacy MIDI 1.0 device (0-2)
1028 0: MIDI 2.0 device,
1029 1: MIDI 1.0 without restriction, or
1030 2: MIDI 1.0 with low speed
1045 For emulating the old MIDI 2.0 device without UMP v1.1 support, pass 0
1049 --------------------------
1065 UMP MIDI client such as "MIDI 2.0 Gadget".
1070 For testing a MIDI input from the gadget to the host (e.g. emulating a
1071 MIDI keyboard), you can send a MIDI stream like the following.
1075 $ aconnect -o
1077 client 20: 'MIDI 2.0 Gadget' [type=kernel,card=1]
1078 0 'MIDI 2.0 '
1079 1 'Group 1 (MIDI 2.0 Gadget I/O)'
1080 $ aplaymidi -p 20:1 to_host.mid
1084 $ aconnect -i
1086 client 24: 'MIDI 2.0 Gadget' [type=kernel,card=2]
1087 0 'MIDI 2.0 '
1088 1 'Group 1 (MIDI 2.0 Gadget I/O)'
1089 $ arecordmidi -p 24:1 from_gadget.mid
1091 If you have a UMP-capable application, you can use the UMP port to
1095 $ aseqdump -u 2 -p 24:1
1101 For testing a MIDI output to the gadget to the host (e.g. emulating a
1102 MIDI synth), it'll be just other way round.
1106 $ arecordmidi -p 20:1 from_host.mid
1110 $ aplaymidi -p 24:1 to_gadget.mid
1112 The access to MIDI 1.0 on altset 0 on the host is supported, and it's
1119 $ amixer -c1 contents
1121 ; type=INTEGER,access=r--v----,values=1,min=0,max=2,step=0
1124 where 0 = unused, 1 = MIDI 1.0 (altset 0), 2 = MIDI 2.0 (altset 1).
1125 The example above shows it's running in 2, i.e. MIDI 2.0.