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 ------------------------------------
213 The attribute is read-only and signals if the function is ready (1) to be
218 ------------------------
229 Function-specific configfs interface
230 ------------------------------------
255 $ echo -ne \\x05\\x01\\x09\\x06\\xa1.....
258 ------------------------
262 - create the gadget
263 - connect the gadget to a host, preferably not the one used
265 - run a program which writes to /dev/hidg<N>, e.g.
272 - observe the keystrokes from the gadget
279 Function-specific configfs interface
280 ------------------------------------
291 -----------------------------
295 host: test-usb (tools/usb/testusb.c)
302 Function-specific configfs interface
303 ------------------------------------
336 read-only. This is implied if CD-ROM emulation
342 being a CD-ROM.
345 forced_eject This write-only file is useful only when
349 Any non-zero number of bytes written will
354 ---------------------------------
360 9. MIDI function
365 Function-specific configfs interface
366 ------------------------------------
368 The function name to use when creating the function directory is "midi".
369 The MIDI function provides these attributes in its function directory:
372 buflen MIDI buffer length
373 id ID string for the USB MIDI adapter
374 in_ports number of MIDI input ports
375 index index value for the USB MIDI adapter
376 out_ports number of MIDI output ports
380 Testing the MIDI function
381 -------------------------
390 $ arecordmidi -l
392 14:0 Midi Through Midi Through Port-0
393 24:0 MIDI Gadget MIDI Gadget MIDI 1
394 $ arecordmidi -p 24:0 from_gadget.mid
398 $ aplaymidi -l
402 $ aplaymidi -p 20:0 to_host.mid
408 $ arecordmidi -l
412 $ arecordmidi -p 20:0 from_host.mid
416 $ aplaymidi -l
418 14:0 Midi Through Midi Through Port-0
419 24:0 MIDI Gadget MIDI Gadget MIDI 1
421 $ aplaymidi -p24:0 to_gadget.mid
427 MIDI files can be played to speakers/headphones with e.g. timidity installed::
429 $ aplaymidi -l
431 14:0 Midi Through Midi Through Port-0
432 24:0 MIDI Gadget MIDI Gadget MIDI 1
438 $ aplaymidi -p 128:0 file.mid
440 MIDI ports can be logically connected using the aconnect utility, e.g.::
444 After the gadget's MIDI port is connected to timidity's MIDI port,
445 whatever is played at the gadget side with aplaymidi -l is audible
453 Function-specific configfs interface
454 ------------------------------------
478 ------------------------
495 Function-specific configfs interface
496 ------------------------------------
503 The attribute is read-only.
505 There can be at most 4 ACM/generic serial/OBEX ports in the system.
508 -------------------------
512 seriald -f /dev/ttyGS<Y> -s 1024
516 serialc -v <vendorID> -p <productID> -i<interface#> -a1 -s1024 \
517 -t<out endpoint addr> -r<in endpoint addr>
521 https://github.com/felipebalbi/usb-tools.git master
528 Function-specific configfs interface
529 ------------------------------------
540 ---------------------------
546 http://www.spinics.net/lists/linux-usb/msg85689.html
550 git://git.gitorious.org/meego-cellular/phonet-utils.git
554 $ ./phonet -a 0x10 -i usbpn0
561 $ ./phonet -a 0x6c -i upnlink0
567 http://www.spinics.net/lists/linux-usb/msg85690.html
571 $ ./pnxmit -a 0x6c -r
575 $ ./pnxmit -a 0x10 -s 0x6c
582 $ ./pnxmit -a 0x10 -r
586 $ ./pnxmit -a 0x6c -s 0x10
593 Function-specific configfs interface
594 ------------------------------------
616 --------------------------
628 14. SERIAL function
633 Function-specific configfs interface
634 ------------------------------------
637 The SERIAL function provides just one attribute in its function directory:
641 The attribute is read-only.
643 There can be at most 4 ACM/generic serial/OBEX ports in the system.
645 Testing the SERIAL function
646 ---------------------------
651 echo VID PID >/sys/bus/usb-serial/drivers/generic/new_id
676 Function-specific configfs interface
677 ------------------------------------
685 isoc_maxpacket 0 - 1023 (fs), 0 - 1024 (hs/ss)
694 -------------------------------
698 host: test-usb (tools/usb/testusb.c)
706 Function-specific configfs interface
707 ------------------------------------
725 -------------------------
731 aplay -l # should list our USB Audio Gadget
738 Function-specific configfs interface
739 ------------------------------------
746 c_srate list of capture sampling rates (comma-separated)
754 c_hs_bint capture bInterval for HS/SS (1-4: fixed, 0: auto)
757 p_srate list of playback sampling rates (comma-separated)
764 p_hs_bint playback bInterval for HS/SS (1-4: fixed, 0: auto)
765 req_number the number of pre-allocated request for both capture
786 -------------------------
789 host: aplay -l # should list our USB Audio Gadget
796 $ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
800 $ arecord -f dat -t wav -D hw:CARD=UAC2Gadget,DEV=0 | \
801 aplay -D default:CARD=OdroidU3
808 Function-specific configfs interface
809 ------------------------------------
845 # ln -s header/h class/fs
846 # ln -s header/h class/ss
847 # mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
856 # ln -s ../../uncompressed/u
858 # ln -s ../../header/h
860 # ln -s ../../header/h
862 # ln -s ../../header/h
866 ------------------------
870 # uvc-gadget -u /dev/video<uvc video node #> -v /dev/video<vivid video node #>
872 where uvc-gadget is this program:
873 http://git.ideasonboard.org/uvc-gadget.git
877 http://www.spinics.net/lists/linux-usb/msg99220.html
881 luvcview -f yuv
888 Function-specific configfs interface
889 ------------------------------------
900 ----------------------------
906 # ls -l /devices/virtual/usb_printer_gadget/
916 host->device transmission:
926 device->host transmission::
945 Function-specific configfs interface
946 ------------------------------------
953 c_srate list of capture sampling rates (comma-separated)
961 p_srate list of playback sampling rates (comma-separated)
968 req_number the number of pre-allocated requests for both capture
984 -------------------------
987 host: aplay -l # should list our USB Audio Gadget
994 $ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
998 $ arecord -f dat -t wav -D hw:CARD=UAC1Gadget,DEV=0 | \
999 aplay -D default:CARD=OdroidU3
1011 Function-specific configfs interface
1012 ------------------------------------
1016 as the card top-level information:
1025 attributes for a UMP Endpoint (which is a pair of USB MIDI Endpoints):
1028 protocol_caps MIDI protocol capabilities;
1029 1: MIDI 1.0, 2: MIDI 2.0, or 3: both protocols
1030 protocol Default MIDI protocol (either 1 or 2)
1047 first_group The first UMP Group number (0-15)
1048 num_groups The number of groups in this FB (1-16)
1049 midi1_first_group The first UMP Group number for MIDI 1.0 (0-15)
1050 midi1_num_groups The number of groups for MIDI 1.0 (0-16)
1051 ui_hint UI-hint of this FB
1053 midi_ci_verison Supported MIDI-CI version number (8 bit)
1054 is_midi1 Legacy MIDI 1.0 device (0-2)
1055 0: MIDI 2.0 device,
1056 1: MIDI 1.0 without restriction, or
1057 2: MIDI 1.0 with low speed
1072 For emulating the old MIDI 2.0 device without UMP v1.1 support, pass 0
1076 --------------------------
1092 UMP MIDI client such as "MIDI 2.0 Gadget".
1097 For testing a MIDI input from the gadget to the host (e.g. emulating a
1098 MIDI keyboard), you can send a MIDI stream like the following.
1102 $ aconnect -o
1104 client 20: 'MIDI 2.0 Gadget' [type=kernel,card=1]
1105 0 'MIDI 2.0 '
1106 1 'Group 1 (MIDI 2.0 Gadget I/O)'
1107 $ aplaymidi -p 20:1 to_host.mid
1111 $ aconnect -i
1113 client 24: 'MIDI 2.0 Gadget' [type=kernel,card=2]
1114 0 'MIDI 2.0 '
1115 1 'Group 1 (MIDI 2.0 Gadget I/O)'
1116 $ arecordmidi -p 24:1 from_gadget.mid
1118 If you have a UMP-capable application, you can use the UMP port to
1122 $ aseqdump -u 2 -p 24:1
1128 For testing a MIDI output to the gadget to the host (e.g. emulating a
1129 MIDI synth), it'll be just other way round.
1133 $ arecordmidi -p 20:1 from_host.mid
1137 $ aplaymidi -p 24:1 to_gadget.mid
1139 The access to MIDI 1.0 on altset 0 on the host is supported, and it's
1146 $ amixer -c1 contents
1148 ; type=INTEGER,access=r--v----,values=1,min=0,max=2,step=0
1151 where 0 = unused, 1 = MIDI 1.0 (altset 0), 2 = MIDI 2.0 (altset 1).
1152 The example above shows it's running in 2, i.e. MIDI 2.0.