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 ------------------------------------
468 ------------------------
485 Function-specific configfs interface
486 ------------------------------------
493 The attribute is read-only.
495 There can be at most 4 ACM/generic serial/OBEX ports in the system.
498 -------------------------
502 seriald -f /dev/ttyGS<Y> -s 1024
506 serialc -v <vendorID> -p <productID> -i<interface#> -a1 -s1024 \
507 -t<out endpoint addr> -r<in endpoint addr>
511 https://github.com/felipebalbi/usb-tools.git master
518 Function-specific configfs interface
519 ------------------------------------
530 ---------------------------
536 http://www.spinics.net/lists/linux-usb/msg85689.html
540 git://git.gitorious.org/meego-cellular/phonet-utils.git
544 $ ./phonet -a 0x10 -i usbpn0
551 $ ./phonet -a 0x6c -i upnlink0
557 http://www.spinics.net/lists/linux-usb/msg85690.html
561 $ ./pnxmit -a 0x6c -r
565 $ ./pnxmit -a 0x10 -s 0x6c
572 $ ./pnxmit -a 0x10 -r
576 $ ./pnxmit -a 0x6c -s 0x10
583 Function-specific configfs interface
584 ------------------------------------
606 --------------------------
618 14. SERIAL function
623 Function-specific configfs interface
624 ------------------------------------
627 The SERIAL function provides just one attribute in its function directory:
631 The attribute is read-only.
633 There can be at most 4 ACM/generic serial/OBEX ports in the system.
635 Testing the SERIAL function
636 ---------------------------
641 echo VID PID >/sys/bus/usb-serial/drivers/generic/new_id
666 Function-specific configfs interface
667 ------------------------------------
675 isoc_maxpacket 0 - 1023 (fs), 0 - 1024 (hs/ss)
684 -------------------------------
688 host: test-usb (tools/usb/testusb.c)
696 Function-specific configfs interface
697 ------------------------------------
715 -------------------------
721 aplay -l # should list our USB Audio Gadget
728 Function-specific configfs interface
729 ------------------------------------
736 c_srate list of capture sampling rates (comma-separated)
744 c_hs_bint capture bInterval for HS/SS (1-4: fixed, 0: auto)
747 p_srate list of playback sampling rates (comma-separated)
754 p_hs_bint playback bInterval for HS/SS (1-4: fixed, 0: auto)
755 req_number the number of pre-allocated request for both capture
763 -------------------------
766 host: aplay -l # should list our USB Audio Gadget
773 $ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
777 $ arecord -f dat -t wav -D hw:CARD=UAC2Gadget,DEV=0 | \
778 aplay -D default:CARD=OdroidU3
785 Function-specific configfs interface
786 ------------------------------------
822 # ln -s header/h class/fs
823 # ln -s header/h class/ss
824 # mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
833 # ln -s ../../uncompressed/u
835 # ln -s ../../header/h
837 # ln -s ../../header/h
839 # ln -s ../../header/h
843 ------------------------
847 # uvc-gadget -u /dev/video<uvc video node #> -v /dev/video<vivid video node #>
849 where uvc-gadget is this program:
850 http://git.ideasonboard.org/uvc-gadget.git
854 http://www.spinics.net/lists/linux-usb/msg99220.html
858 luvcview -f yuv
865 Function-specific configfs interface
866 ------------------------------------
877 ----------------------------
883 # ls -l /devices/virtual/usb_printer_gadget/
893 host->device transmission:
903 device->host transmission::
922 Function-specific configfs interface
923 ------------------------------------
930 c_srate list of capture sampling rates (comma-separated)
938 p_srate list of playback sampling rates (comma-separated)
945 req_number the number of pre-allocated requests for both capture
953 -------------------------
956 host: aplay -l # should list our USB Audio Gadget
963 $ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
967 $ arecord -f dat -t wav -D hw:CARD=UAC1Gadget,DEV=0 | \
968 aplay -D default:CARD=OdroidU3
980 Function-specific configfs interface
981 ------------------------------------
985 as the card top-level information:
994 attributes for a UMP Endpoint (which is a pair of USB MIDI Endpoints):
997 protocol_caps MIDI protocol capabilities;
998 1: MIDI 1.0, 2: MIDI 2.0, or 3: both protocols
999 protocol Default MIDI protocol (either 1 or 2)
1016 first_group The first UMP Group number (0-15)
1017 num_groups The number of groups in this FB (1-16)
1018 midi1_first_group The first UMP Group number for MIDI 1.0 (0-15)
1019 midi1_num_groups The number of groups for MIDI 1.0 (0-16)
1020 ui_hint UI-hint of this FB
1022 midi_ci_verison Supported MIDI-CI version number (8 bit)
1023 is_midi1 Legacy MIDI 1.0 device (0-2)
1024 0: MIDI 2.0 device,
1025 1: MIDI 1.0 without restriction, or
1026 2: MIDI 1.0 with low speed
1041 For emulating the old MIDI 2.0 device without UMP v1.1 support, pass 0
1045 --------------------------
1061 UMP MIDI client such as "MIDI 2.0 Gadget".
1066 For testing a MIDI input from the gadget to the host (e.g. emulating a
1067 MIDI keyboard), you can send a MIDI stream like the following.
1071 $ aconnect -o
1073 client 20: 'MIDI 2.0 Gadget' [type=kernel,card=1]
1074 0 'MIDI 2.0 '
1075 1 'Group 1 (MIDI 2.0 Gadget I/O)'
1076 $ aplaymidi -p 20:1 to_host.mid
1080 $ aconnect -i
1082 client 24: 'MIDI 2.0 Gadget' [type=kernel,card=2]
1083 0 'MIDI 2.0 '
1084 1 'Group 1 (MIDI 2.0 Gadget I/O)'
1085 $ arecordmidi -p 24:1 from_gadget.mid
1087 If you have a UMP-capable application, you can use the UMP port to
1091 $ aseqdump -u 2 -p 24:1
1097 For testing a MIDI output to the gadget to the host (e.g. emulating a
1098 MIDI synth), it'll be just other way round.
1102 $ arecordmidi -p 20:1 from_host.mid
1106 $ aplaymidi -p 24:1 to_gadget.mid
1108 The access to MIDI 1.0 on altset 0 on the host is supported, and it's
1115 $ amixer -c1 contents
1117 ; type=INTEGER,access=r--v----,values=1,min=0,max=2,step=0
1120 where 0 = unused, 1 = MIDI 1.0 (altset 0), 2 = MIDI 2.0 (altset 1).
1121 The example above shows it's running in 2, i.e. MIDI 2.0.