sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/usb/gadget-testingmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/usb/gadget-testingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/usb/gadget-testingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/usb/gadget-testingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/usb/gadget-testingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/usb/gadget-testingmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hGadget Testingh]hGadget Testing}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/usb/gadget-testing.rsthKubh paragraph)}(hWThis file summarizes information on basic testing of USB functions provided by gadgets.h]hWThis file summarizes information on basic testing of USB functions provided by gadgets.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhcomment)}(hXcontents 1. ACM function 2. ECM function 3. ECM subset function 4. EEM function 5. FFS function 6. HID function 7. LOOPBACK function 8. MASS STORAGE function 9. MIDI function 10. NCM function 11. OBEX function 12. PHONET function 13. RNDIS function 14. SERIAL function 15. SOURCESINK function 16. UAC1 function (legacy implementation) 17. UAC2 function 18. UVC function 19. PRINTER function 20. UAC1 function (new API) 21. MIDI2 functionh]hXcontents 1. ACM function 2. ECM function 3. ECM subset function 4. EEM function 5. FFS function 6. HID function 7. LOOPBACK function 8. MASS STORAGE function 9. MIDI function 10. NCM function 11. OBEX function 12. PHONET function 13. RNDIS function 14. SERIAL function 15. SOURCESINK function 16. UAC1 function (legacy implementation) 17. UAC2 function 18. UVC function 19. PRINTER function 20. UAC1 function (new API) 21. MIDI2 function}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhhhK ubh)}(hhh](h)}(h1. ACM functionh]h1. ACM function}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK"ubh)}(h0The function is provided by usb_f_acm.ko module.h]h0The function is provided by usb_f_acm.ko module.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hhhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK'ubh)}(hThe function name to use when creating the function directory is "acm". The ACM function provides just one attribute in its function directory:h]hThe function name to use when creating the function directory is “acm”. The ACM function provides just one attribute in its function directory:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hhhhubh block_quote)}(h port_num h]h)}(hport_numh]hport_num}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jhhhK,hhhhubh)}(hThe attribute is read-only.h]hThe attribute is read-only.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hhhhubh)}(hCThere can be at most 4 ACM/generic serial/OBEX ports in the system.h]hCThere can be at most 4 ACM/generic serial/OBEX ports in the system.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hhhhubeh}(h]$function-specific-configfs-interfaceah ]h"]h$]$function-specific configfs interfaceah&]uh1hhhhhhhhK' referencedKubh)}(hhh](h)}(hTesting the ACM functionh]hTesting the ACM function}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhhhhhK4ubh)}(h On the host::h]h On the host:}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjVhhubh literal_block)}(hcat > /dev/ttyACMh]hcat > /dev/ttyACM}hjwsbah}(h]h ]h"]h$]h&]hhuh1juhhhK8hjVhhubh)}(hOn the device::h]hOn the device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjVhhubjv)}(hcat /dev/ttyGSh]hcat /dev/ttyGS}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhKhjVhhubh)}(hOn the device::h]hOn the device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hjVhhubjv)}(hcat > /dev/ttyGSh]hcat > /dev/ttyGS}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhKBhjVhhubh)}(h On the host::h]h On the host:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjVhhubjv)}(hcat /dev/ttyACMh]hcat /dev/ttyACM}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhKFhjVhhubeh}(h]testing-the-acm-functionah ]h"]testing the acm functionah$]h&]uh1hhhhhhhhK4ubeh}(h] acm-functionah ]h"]1. acm functionah$]h&]uh1hhhhhhhhK"ubh)}(hhh](h)}(h2. ECM functionh]h2. ECM function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKIubh)}(h0The function is provided by usb_f_ecm.ko module.h]h0The function is provided by usb_f_ecm.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKNubh)}(hThe function name to use when creating the function directory is "ecm". The ECM function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “ecm”. The ECM function provides these attributes in its function directory:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjhhubj)}(hX=============== ================================================== ifname network device interface name associated with this function instance qmult queue length multiplier for high and super speed host_addr MAC address of host's end of this Ethernet over USB link dev_addr MAC address of device's end of this Ethernet over USB link =============== ================================================== h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj@ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jChj@ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hifnameh]hifname}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjeubah}(h]h ]h"]h$]h&]uh1jchj`ubjd)}(hhh]h)}(hDnetwork device interface name associated with this function instanceh]hDnetwork device interface name associated with this function instance}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThj|ubah}(h]h ]h"]h$]h&]uh1jchj`ubeh}(h]h ]h"]h$]h&]uh1j^hj[ubj_)}(hhh](jd)}(hhh]h)}(hqmulth]hqmult}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h0queue length multiplier for high and super speedh]h0queue length multiplier for high and super speed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hj[ubj_)}(hhh](jd)}(hhh]h)}(h host_addrh]h host_addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h8MAC address of host's end of this Ethernet over USB linkh]h:MAC address of host’s end of this Ethernet over USB link}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hj[ubj_)}(hhh](jd)}(hhh]h)}(hdev_addrh]hdev_addr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhj ubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h:MAC address of device's end of this Ethernet over USB linkh]hhj;ubah}(h]h ]h"]h$]h&]uh1j9hj5ubah}(h]h ]h"]h$]h&]uh1jhhhKShjhhubh)}(hXdand after creating the functions/ecm. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as "usb%d", which will cause the net core to choose the next free usbX interface. By default, it is set to "usb%d".h]hXland after creating the functions/ecm. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as “usb%d”, which will cause the net core to choose the next free usbX interface. By default, it is set to “usb%d”.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjhhubeh}(h]id1ah ]h"]h$]jSah&]uh1hhjhhhhhKNjUKubh)}(hhh](h)}(hTesting the ECM functionh]hTesting the ECM function}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhhhhhKdubh)}(h8Configure IP addresses of the device and the host. Then:h]h8Configure IP addresses of the device and the host. Then:}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjlhhubh)}(hOn the device::h]hOn the device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjlhhubjv)}(hping h]hping }hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhKjhjlhhubh)}(h On the host::h]h On the host:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjlhhubjv)}(hping h]hping }hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhKnhjlhhubeh}(h]testing-the-ecm-functionah ]h"]testing the ecm functionah$]h&]uh1hhjhhhhhKdubeh}(h] ecm-functionah ]h"]2. ecm functionah$]h&]uh1hhhhhhhhKIubh)}(hhh](h)}(h3. ECM subset functionh]h3. ECM subset function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKqubh)}(h7The function is provided by usb_f_ecm_subset.ko module.h]h7The function is provided by usb_f_ecm_subset.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKvubh)}(hThe function name to use when creating the function directory is "geth". The ECM subset function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “geth”. The ECM subset function provides these attributes in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjhhubj)}(hX=============== ================================================== ifname network device interface name associated with this function instance qmult queue length multiplier for high and super speed host_addr MAC address of host's end of this Ethernet over USB link dev_addr MAC address of device's end of this Ethernet over USB link =============== ================================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jChjubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hifnameh]hifname}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj5ubah}(h]h ]h"]h$]h&]uh1jchj2ubjd)}(hhh]h)}(hDnetwork device interface name associated with this function instanceh]hDnetwork device interface name associated with this function instance}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjLubah}(h]h ]h"]h$]h&]uh1jchj2ubeh}(h]h ]h"]h$]h&]uh1j^hj/ubj_)}(hhh](jd)}(hhh]h)}(hqmulth]hqmult}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hjlubah}(h]h ]h"]h$]h&]uh1jchjiubjd)}(hhh]h)}(h0queue length multiplier for high and super speedh]h0queue length multiplier for high and super speed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hjubah}(h]h ]h"]h$]h&]uh1jchjiubeh}(h]h ]h"]h$]h&]uh1j^hj/ubj_)}(hhh](jd)}(hhh]h)}(h host_addrh]h host_addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h8MAC address of host's end of this Ethernet over USB linkh]h:MAC address of host’s end of this Ethernet over USB link}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hj/ubj_)}(hhh](jd)}(hhh]h)}(hdev_addrh]hdev_addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h:MAC address of device's end of this Ethernet over USB linkh]hhjubah}(h]h ]h"]h$]h&]uh1j9hjubah}(h]h ]h"]h$]h&]uh1jhhhK{hjhhubh)}(hXdand after creating the functions/ecm. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as "usb%d", which will cause the net core to choose the next free usbX interface. By default, it is set to "usb%d".h]hXland after creating the functions/ecm. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as “usb%d”, which will cause the net core to choose the next free usbX interface. By default, it is set to “usb%d”.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]id2ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhKvjUKubh)}(hhh](h)}(hTesting the ECM subset functionh]hTesting the ECM subset function}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hhhhhKubh)}(h8Configure IP addresses of the device and the host. Then:h]h8Configure IP addresses of the device and the host. Then:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=hhubh)}(hOn the device::h]hOn the device:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=hhubjv)}(hping h]hping }hjjsbah}(h]h ]h"]h$]h&]hhuh1juhhhKhj=hhubh)}(h On the host::h]h On the host:}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=hhubjv)}(hping h]hping }hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhKhj=hhubeh}(h]testing-the-ecm-subset-functionah ]h"]testing the ecm subset functionah$]h&]uh1hhjhhhhhKubeh}(h]ecm-subset-functionah ]h"]3. ecm subset functionah$]h&]uh1hhhhhhhhKqubh)}(hhh](h)}(h4. EEM functionh]h4. EEM function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h0The function is provided by usb_f_eem.ko module.h]h0The function is provided by usb_f_eem.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe function name to use when creating the function directory is "eem". The EEM function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “eem”. The EEM function provides these attributes in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hX=============== ================================================== ifname network device interface name associated with this function instance qmult queue length multiplier for high and super speed host_addr MAC address of host's end of this Ethernet over USB link dev_addr MAC address of device's end of this Ethernet over USB link =============== ================================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jChjubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hifnameh]hifname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hDnetwork device interface name associated with this function instanceh]hDnetwork device interface name associated with this function instance}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hqmulth]hqmult}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj=ubah}(h]h ]h"]h$]h&]uh1jchj:ubjd)}(hhh]h)}(h0queue length multiplier for high and super speedh]h0queue length multiplier for high and super speed}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjTubah}(h]h ]h"]h$]h&]uh1jchj:ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h host_addrh]h host_addr}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjtubah}(h]h ]h"]h$]h&]uh1jchjqubjd)}(hhh]h)}(h8MAC address of host's end of this Ethernet over USB linkh]h:MAC address of host’s end of this Ethernet over USB link}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjqubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hdev_addrh]hdev_addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h:MAC address of device's end of this Ethernet over USB linkh]hhjubah}(h]h ]h"]h$]h&]uh1j9hjubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(hXdand after creating the functions/eem. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as "usb%d", which will cause the net core to choose the next free usbX interface. By default, it is set to "usb%d".h]hXland after creating the functions/eem. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as “usb%d”, which will cause the net core to choose the next free usbX interface. By default, it is set to “usb%d”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]id3ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhKjUKubh)}(hhh](h)}(hTesting the EEM functionh]hTesting the EEM function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h8Configure IP addresses of the device and the host. Then:h]h8Configure IP addresses of the device and the host. Then:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hOn the device::h]hOn the device:}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjv)}(hping h]hping }hj;sbah}(h]h ]h"]h$]h&]hhuh1juhhhKhjhhubh)}(h On the host::h]h On the host:}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjv)}(hping h]hping }hjWsbah}(h]h ]h"]h$]h&]hhuh1juhhhKhjhhubeh}(h]testing-the-eem-functionah ]h"]testing the eem functionah$]h&]uh1hhjhhhhhKubeh}(h] eem-functionah ]h"]4. eem functionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h5. FFS functionh]h5. FFS function}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhhhhhKubh)}(h/The function is provided by usb_f_fs.ko module.h]h/The function is provided by usb_f_fs.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe function name to use when creating the function directory is "ffs". The function directory is intentionally empty and not modifiable.h]hThe function name to use when creating the function directory is “ffs”. The function directory is intentionally empty and not modifiable.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXkAfter creating the directory there is a new instance (a "device") of FunctionFS available in the system. Once a "device" is available, the user should follow the standard procedure for using FunctionFS (mount it, run the userspace process which implements the function proper). The gadget should be enabled by writing a suitable string to usb_gadget//UDC.h]hXsAfter creating the directory there is a new instance (a “device”) of FunctionFS available in the system. Once a “device” is available, the user should follow the standard procedure for using FunctionFS (mount it, run the userspace process which implements the function proper). The gadget should be enabled by writing a suitable string to usb_gadget//UDC.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hGThe FFS function provides just one attribute in its function directory:h]hGThe FFS function provides just one attribute in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hready h]h)}(hreadyh]hready}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(hThe attribute is read-only and signals if the function is ready (1) to be used, E.G. if userspace has written descriptors and strings to ep0, so the gadget can be enabled.h]hThe attribute is read-only and signals if the function is ready (1) to be used, E.G. if userspace has written descriptors and strings to ep0, so the gadget can be enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]id4ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjuhhhhhKjUKubh)}(hhh](h)}(hTesting the FFS functionh]hTesting the FFS function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hGOn the device: start the function's userspace daemon, enable the gadgeth]hIOn the device: start the function’s userspace daemon, enable the gadget}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h8On the host: use the USB function provided by the deviceh]h8On the host: use the USB function provided by the device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]testing-the-ffs-functionah ]h"]testing the ffs functionah$]h&]uh1hhjuhhhhhKubeh}(h] ffs-functionah ]h"]5. ffs functionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h6. HID functionh]h6. HID function}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hhhhhKubh)}(h0The function is provided by usb_f_hid.ko module.h]h0The function is provided by usb_f_hid.ko module.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj:hhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhhhhhKubh)}(hThe function name to use when creating the function directory is "hid". The HID function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “hid”. The HID function provides these attributes in its function directory:}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjYhhubj)}(hXG=============== =========================================== protocol HID protocol to use report_desc data to be used in HID reports, except data passed with /dev/hidg report_length HID report length subclass HID subclass to use =============== =========================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK+uh1jChjubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hprotocolh]hprotocol}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hHID protocol to useh]hHID protocol to use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h report_desch]h report_desc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hDdata to be used in HID reports, except data passed with /dev/hidgh]hDdata to be used in HID reports, except data passed with /dev/hidg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h report_lengthh]h report_length}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(hHID report lengthh]hHID report length}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj! ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hsubclassh]hsubclass}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjA ubah}(h]h ]h"]h$]h&]uh1jchj> ubjd)}(hhh]h)}(hHID subclass to useh]hHID subclass to use}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjX ubah}(h]h ]h"]h$]h&]uh1jchj> ubeh}(h]h ]h"]h$]h&]uh1j^hjubeh}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]colsKuh1j>hj|ubah}(h]h ]h"]h$]h&]uh1j9hjxubah}(h]h ]h"]h$]h&]uh1jhhhKhjYhhubh)}(hfFor a keyboard the protocol and the subclass are 1, the report_length is 8, while the report_desc is::h]heFor a keyboard the protocol and the subclass are 1, the report_length is 8, while the report_desc is:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjYhhubjv)}(hXW$ hd my_report_desc 00000000 05 01 09 06 a1 01 05 07 19 e0 29 e7 15 00 25 01 |..........)...%.| 00000010 75 01 95 08 81 02 95 01 75 08 81 03 95 05 75 01 |u.......u.....u.| 00000020 05 08 19 01 29 05 91 02 95 01 75 03 91 03 95 06 |....).....u.....| 00000030 75 08 15 00 25 65 05 07 19 00 29 65 81 00 c0 |u...%e....)e...| 0000003fh]hXW$ hd my_report_desc 00000000 05 01 09 06 a1 01 05 07 19 e0 29 e7 15 00 25 01 |..........)...%.| 00000010 75 01 95 08 81 02 95 01 75 08 81 03 95 05 75 01 |u.......u.....u.| 00000020 05 08 19 01 29 05 91 02 95 01 75 03 91 03 95 06 |....).....u.....| 00000030 75 08 15 00 25 65 05 07 19 00 29 65 81 00 c0 |u...%e....)e...| 0000003f}hj sbah}(h]h ]h"]h$]h&]hhuh1juhhhKhjYhhubh)}(hCSuch a sequence of bytes can be stored to the attribute with echo::h]hBSuch a sequence of bytes can be stored to the attribute with echo:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjYhhubjv)}(h)$ echo -ne \\x05\\x01\\x09\\x06\\xa1.....h]h)$ echo -ne \\x05\\x01\\x09\\x06\\xa1.....}hj sbah}(h]h ]h"]h$]h&]hhuh1juhhhKhjYhhubeh}(h]id5ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhj:hhhhhKjUKubh)}(hhh](h)}(hTesting the HID functionh]hTesting the HID function}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hDevice:h]hDevice:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh bullet_list)}(hhh](h list_item)}(hcreate the gadgeth]h)}(hj h]hcreate the gadget}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj hhhhhNubj )}(hOconnect the gadget to a host, preferably not the one used to control the gadgeth]h)}(hOconnect the gadget to a host, preferably not the one used to control the gadgeth]hOconnect the gadget to a host, preferably not the one used to control the gadget}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j hj hhhhhNubj )}(hrun a program which writes to /dev/hidg, e.g. a userspace program found in Documentation/usb/gadget_hid.rst:: $ ./hid_gadget_test /dev/hidg0 keyboard h](h)}(hprun a program which writes to /dev/hidg, e.g. a userspace program found in Documentation/usb/gadget_hid.rst::h]horun a program which writes to /dev/hidg, e.g. a userspace program found in Documentation/usb/gadget_hid.rst:}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj# ubjv)}(h'$ ./hid_gadget_test /dev/hidg0 keyboardh]h'$ ./hid_gadget_test /dev/hidg0 keyboard}hj5 sbah}(h]h ]h"]h$]h&]hhuh1juhhhM hj# ubeh}(h]h ]h"]h$]h&]uh1j hj hhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1j hhhMhj hhubh)}(hHost:h]hHost:}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj )}(hhh]j )}(h'observe the keystrokes from the gadget h]h)}(h&observe the keystrokes from the gadgeth]h&observe the keystrokes from the gadget}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb ubah}(h]h ]h"]h$]h&]uh1j hj_ hhhhhNubah}(h]h ]h"]h$]h&]jO jP uh1j hhhMhj hhubeh}(h]testing-the-hid-functionah ]h"]testing the hid functionah$]h&]uh1hhj:hhhhhMubeh}(h] hid-functionah ]h"]6. hid functionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h7. LOOPBACK functionh]h7. LOOPBACK function}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(h2The function is provided by usb_f_ss_lb.ko module.h]h2The function is provided by usb_f_ss_lb.ko module.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhMubh)}(hThe function name to use when creating the function directory is "Loopback". The LOOPBACK function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “Loopback”. The LOOPBACK function provides these attributes in its function directory:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(h=============== ======================= qlen depth of loopback queue bulk_buflen buffer length =============== ======================= h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hqlenh]hqlen}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(hdepth of loopback queueh]hdepth of loopback queue}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hj ubj_)}(hhh](jd)}(hhh]h)}(h bulk_buflenh]h bulk_buflen}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj) ubah}(h]h ]h"]h$]h&]uh1jchj& ubjd)}(hhh]h)}(h buffer lengthh]h buffer length}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ ubah}(h]h ]h"]h$]h&]uh1jchj& ubeh}(h]h ]h"]h$]h&]uh1j^hj ubeh}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj ubah}(h]h ]h"]h$]h&]uh1j9hj ubah}(h]h ]h"]h$]h&]uh1jhhhMhj hhubeh}(h]id6ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhj hhhhhMjUKubh)}(hhh](h)}(hTesting the LOOPBACK functionh]hTesting the LOOPBACK function}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ hhhhhM#ubh)}(hdevice: run the gadgeth]hdevice: run the gadget}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj~ hhubh)}(h$host: test-usb (tools/usb/testusb.c)h]h$host: test-usb (tools/usb/testusb.c)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj~ hhubeh}(h]testing-the-loopback-functionah ]h"]testing the loopback functionah$]h&]uh1hhj hhhhhM#ubeh}(h]loopback-functionah ]h"]7. loopback functionah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h8. MASS STORAGE functionh]h8. MASS STORAGE function}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM*ubh)}(h9The function is provided by usb_f_mass_storage.ko module.h]h9The function is provided by usb_f_mass_storage.ko module.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj hhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhM/ubh)}(hThe function name to use when creating the function directory is "mass_storage". The MASS STORAGE function provides these attributes in its directory: files:h]hThe function name to use when creating the function directory is “mass_storage”. The MASS STORAGE function provides these attributes in its directory: files:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj hhubj)}(hX=============== ============================================== stall Set to permit function to halt bulk endpoints. Disabled on some USB devices known not to work correctly. You should set it to true. num_buffers Number of pipeline buffers. Valid numbers are 2..4. Available only if CONFIG_USB_GADGET_DEBUG_FILES is set. =============== ============================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK.uh1jChj ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hstallh]hstall}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(hSet to permit function to halt bulk endpoints. Disabled on some USB devices known not to work correctly. You should set it to true.h]hSet to permit function to halt bulk endpoints. Disabled on some USB devices known not to work correctly. You should set it to true.}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj4 ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hj ubj_)}(hhh](jd)}(hhh]h)}(h num_buffersh]h num_buffers}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjT ubah}(h]h ]h"]h$]h&]uh1jchjQ ubjd)}(hhh]h)}(hkNumber of pipeline buffers. Valid numbers are 2..4. Available only if CONFIG_USB_GADGET_DEBUG_FILES is set.h]hkNumber of pipeline buffers. Valid numbers are 2..4. Available only if CONFIG_USB_GADGET_DEBUG_FILES is set.}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjk ubah}(h]h ]h"]h$]h&]uh1jchjQ ubeh}(h]h ]h"]h$]h&]uh1j^hj ubeh}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj ubah}(h]h ]h"]h$]h&]uh1j9hj ubah}(h]h ]h"]h$]h&]uh1jhhhM5hj hhubh)}(h;and a default lun.0 directory corresponding to SCSI LUN #0.h]h;and a default lun.0 directory corresponding to SCSI LUN #0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj hhubh)}(h#A new lun can be added with mkdir::h]h"A new lun can be added with mkdir:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj hhubjv)}(h,$ mkdir functions/mass_storage.0/partition.5h]h,$ mkdir functions/mass_storage.0/partition.5}hj sbah}(h]h ]h"]h$]h&]hhuh1juhhhMBhj hhubh)}(hX8Lun numbering does not have to be continuous, except for lun #0 which is created by default. A maximum of 8 luns can be specified and they all must be named following the . scheme. The numbers can be 0..8. Probably a good convention is to name the luns "lun.", although it is not mandatory.h]hX<Lun numbering does not have to be continuous, except for lun #0 which is created by default. A maximum of 8 luns can be specified and they all must be named following the . scheme. The numbers can be 0..8. Probably a good convention is to name the luns “lun.”, although it is not mandatory.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhj hhubh)}(h>In each lun directory there are the following attribute files:h]h>In each lun directory there are the following attribute files:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhj hhubj)}(hX;=============== ============================================== file The path to the backing file for the LUN. Required if LUN is not marked as removable. ro Flag specifying access to the LUN shall be read-only. This is implied if CD-ROM emulation is enabled as well as when it was impossible to open "filename" in R/W mode. removable Flag specifying that LUN shall be indicated as being removable. cdrom Flag specifying that LUN shall be reported as being a CD-ROM. nofua Flag specifying that FUA flag in SCSI WRITE(10,12) forced_eject This write-only file is useful only when the function is active. It causes the backing file to be forcibly detached from the LUN, regardless of whether the host has allowed it. Any non-zero number of bytes written will result in ejection. =============== ============================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK.uh1jChj ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hfileh]hfile}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(hUThe path to the backing file for the LUN. Required if LUN is not marked as removable.h]hUThe path to the backing file for the LUN. Required if LUN is not marked as removable.}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj" ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hj ubj_)}(hhh](jd)}(hhh]h)}(hroh]hro}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjB ubah}(h]h ]h"]h$]h&]uh1jchj? ubjd)}(hhh]h)}(hFlag specifying access to the LUN shall be read-only. This is implied if CD-ROM emulation is enabled as well as when it was impossible to open "filename" in R/W mode.h]hFlag specifying access to the LUN shall be read-only. This is implied if CD-ROM emulation is enabled as well as when it was impossible to open “filename” in R/W mode.}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjY ubah}(h]h ]h"]h$]h&]uh1jchj? ubeh}(h]h ]h"]h$]h&]uh1j^hj ubj_)}(hhh](jd)}(hhh]h)}(h removableh]h removable}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjy ubah}(h]h ]h"]h$]h&]uh1jchjv ubjd)}(hhh]h)}(h?Flag specifying that LUN shall be indicated as being removable.h]h?Flag specifying that LUN shall be indicated as being removable.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj ubah}(h]h ]h"]h$]h&]uh1jchjv ubeh}(h]h ]h"]h$]h&]uh1j^hj ubj_)}(hhh](jd)}(hhh]h)}(hcdromh]hcdrom}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(h=Flag specifying that LUN shall be reported as being a CD-ROM.h]h=Flag specifying that LUN shall be reported as being a CD-ROM.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hj ubj_)}(hhh](jd)}(hhh]h)}(hnofuah]hnofua}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(h2Flag specifying that FUA flag in SCSI WRITE(10,12)h]h2Flag specifying that FUA flag in SCSI WRITE(10,12)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hj ubj_)}(hhh](jd)}(hhh]h)}(h forced_ejecth]h forced_eject}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hThis write-only file is useful only when the function is active. It causes the backing file to be forcibly detached from the LUN, regardless of whether the host has allowed it. Any non-zero number of bytes written will result in ejection.h]hThis write-only file is useful only when the function is active. It causes the backing file to be forcibly detached from the LUN, regardless of whether the host has allowed it. Any non-zero number of bytes written will result in ejection.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhj5ubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hj ubeh}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj ubah}(h]h ]h"]h$]h&]uh1j9hj ubah}(h]h ]h"]h$]h&]uh1jhhhMLhj hhubeh}(h]id7ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhj hhhhhM/jUKubh)}(hhh](h)}(h!Testing the MASS STORAGE functionh]h!Testing the MASS STORAGE function}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshhhhhMbubh)}(hzdevice: connect the gadget, enable it host: dmesg, see the USB drives appear (if system configured to automatically mount)h]hzdevice: connect the gadget, enable it host: dmesg, see the USB drives appear (if system configured to automatically mount)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjshhubeh}(h]!testing-the-mass-storage-functionah ]h"]!testing the mass storage functionah$]h&]uh1hhj hhhhhMbubeh}(h]mass-storage-functionah ]h"]8. mass storage functionah$]h&]uh1hhhhhhhhM*ubh)}(hhh](h)}(h9. MIDI functionh]h9. MIDI function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMiubh)}(h1The function is provided by usb_f_midi.ko module.h]h1The function is provided by usb_f_midi.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMnubh)}(hThe function name to use when creating the function directory is "midi". The MIDI function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “midi”. The MIDI function provides these attributes in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjhhubj)}(hXz=============== ==================================== buflen MIDI buffer length id ID string for the USB MIDI adapter in_ports number of MIDI input ports index index value for the USB MIDI adapter out_ports number of MIDI output ports qlen USB read request queue length =============== ==================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK$uh1jChjubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hMIDI buffer lengthh]hMIDI buffer length}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hidh]hid}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj;ubah}(h]h ]h"]h$]h&]uh1jchj8ubjd)}(hhh]h)}(h"ID string for the USB MIDI adapterh]h"ID string for the USB MIDI adapter}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjRubah}(h]h ]h"]h$]h&]uh1jchj8ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hin_portsh]hin_ports}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjrubah}(h]h ]h"]h$]h&]uh1jchjoubjd)}(hhh]h)}(hnumber of MIDI input portsh]hnumber of MIDI input ports}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjubah}(h]h ]h"]h$]h&]uh1jchjoubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hindexh]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h$index value for the USB MIDI adapterh]h$index value for the USB MIDI adapter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h out_portsh]h out_ports}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hnumber of MIDI output portsh]hnumber of MIDI output ports}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hqlenh]hqlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hUSB read request queue lengthh]hUSB read request queue length}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj.ubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubeh}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]colsKuh1j>hjubah}(h]h ]h"]h$]h&]uh1j9hjubah}(h]h ]h"]h$]h&]uh1jhhhMshjhhubeh}(h]id8ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhMnjUKubh)}(hhh](h)}(hTesting the MIDI functionh]hTesting the MIDI function}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhhhhhM}ubh)}(hmThere are two cases: playing a mid from the gadget to the host and playing a mid from the host to the gadget.h]hmThere are two cases: playing a mid from the gadget to the host and playing a mid from the host to the gadget.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubhenumerated_list)}(hhh]j )}(h+Playing a mid from the gadget to the host: h]h)}(h*Playing a mid from the gadget to the host:h]h*Playing a mid from the gadget to the host:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubah}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1jhjlhhhhhMubh)}(hhost::h]hhost:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjv)}(h$ arecordmidi -l Port Client name Port name 14:0 Midi Through Midi Through Port-0 24:0 MIDI Gadget MIDI Gadget MIDI 1 $ arecordmidi -p 24:0 from_gadget.midh]h$ arecordmidi -l Port Client name Port name 14:0 Midi Through Midi Through Port-0 24:0 MIDI Gadget MIDI Gadget MIDI 1 $ arecordmidi -p 24:0 from_gadget.mid}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjlhhubh)}(hgadget::h]hgadget:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjv)}(h$ aplaymidi -l Port Client name Port name 20:0 f_midi f_midi $ aplaymidi -p 20:0 to_host.midh]h$ aplaymidi -l Port Client name Port name 20:0 f_midi f_midi $ aplaymidi -p 20:0 to_host.mid}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjlhhubj)}(hhh]j )}(h*Playing a mid from the host to the gadget h]h)}(h)Playing a mid from the host to the gadgeth]h)Playing a mid from the host to the gadget}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubah}(h]h ]h"]h$]h&]jjjhjjstartKuh1jhjlhhhhhMubh)}(hgadget::h]hgadget:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjv)}(h$ arecordmidi -l Port Client name Port name 20:0 f_midi f_midi $ arecordmidi -p 20:0 from_host.midh]h$ arecordmidi -l Port Client name Port name 20:0 f_midi f_midi $ arecordmidi -p 20:0 from_host.mid}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjlhhubh)}(hhost::h]hhost:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjv)}(h$ aplaymidi -l Port Client name Port name 14:0 Midi Through Midi Through Port-0 24:0 MIDI Gadget MIDI Gadget MIDI 1 $ aplaymidi -p24:0 to_gadget.midh]h$ aplaymidi -l Port Client name Port name 14:0 Midi Through Midi Through Port-0 24:0 MIDI Gadget MIDI Gadget MIDI 1 $ aplaymidi -p24:0 to_gadget.mid}hj7sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjlhhubh)}(h>The from_gadget.mid should sound identical to the to_host.mid.h]h>The from_gadget.mid should sound identical to the to_host.mid.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubh)}(h=The from_host.id should sound identical to the to_gadget.mid.h]h=The from_host.id should sound identical to the to_gadget.mid.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubh)}(hNMIDI files can be played to speakers/headphones with e.g. timidity installed::h]hMMIDI files can be played to speakers/headphones with e.g. timidity installed:}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjv)}(hX$ aplaymidi -l Port Client name Port name 14:0 Midi Through Midi Through Port-0 24:0 MIDI Gadget MIDI Gadget MIDI 1 128:0 TiMidity TiMidity port 0 128:1 TiMidity TiMidity port 1 128:2 TiMidity TiMidity port 2 128:3 TiMidity TiMidity port 3 $ aplaymidi -p 128:0 file.midh]hX$ aplaymidi -l Port Client name Port name 14:0 Midi Through Midi Through Port-0 24:0 MIDI Gadget MIDI Gadget MIDI 1 128:0 TiMidity TiMidity port 0 128:1 TiMidity TiMidity port 1 128:2 TiMidity TiMidity port 2 128:3 TiMidity TiMidity port 3 $ aplaymidi -p 128:0 file.mid}hjosbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjlhhubh)}(hHMIDI ports can be logically connected using the aconnect utility, e.g.::h]hGMIDI ports can be logically connected using the aconnect utility, e.g.:}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjv)}(h*$ aconnect 24:0 128:0 # try it on the hosth]h*$ aconnect 24:0 128:0 # try it on the host}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjlhhubh)}(hAfter the gadget's MIDI port is connected to timidity's MIDI port, whatever is played at the gadget side with aplaymidi -l is audible in host's speakers/headphones.h]hAfter the gadget’s MIDI port is connected to timidity’s MIDI port, whatever is played at the gadget side with aplaymidi -l is audible in host’s speakers/headphones.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubeh}(h]testing-the-midi-functionah ]h"]testing the midi functionah$]h&]uh1hhjhhhhhM}ubeh}(h] midi-functionah ]h"]9. midi functionah$]h&]uh1hhhhhhhhMiubh)}(hhh](h)}(h10. NCM functionh]h10. NCM function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h0The function is provided by usb_f_ncm.ko module.h]h0The function is provided by usb_f_ncm.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThe function name to use when creating the function directory is "ncm". The NCM function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “ncm”. The NCM function provides these attributes in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hX======================= ================================================== ifname network device interface name associated with this function instance qmult queue length multiplier for high and super speed host_addr MAC address of host's end of this Ethernet over USB link dev_addr MAC address of device's end of this Ethernet over USB link max_segment_size Segment size required for P2P connections. This will set MTU to 14 bytes ======================= ================================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jChjubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hifnameh]hifname}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hDnetwork device interface name associated with this function instanceh]hDnetwork device interface name associated with this function instance}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hqmulth]hqmult}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1jchjMubjd)}(hhh]h)}(h0queue length multiplier for high and super speedh]h0queue length multiplier for high and super speed}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjgubah}(h]h ]h"]h$]h&]uh1jchjMubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h host_addrh]h host_addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h8MAC address of host's end of this Ethernet over USB linkh]h:MAC address of host’s end of this Ethernet over USB link}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hdev_addrh]hdev_addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h:MAC address of device's end of this Ethernet over USB linkh]hhjubah}(h]h ]h"]h$]h&]uh1j9hjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubh)}(hXdand after creating the functions/ncm. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as "usb%d", which will cause the net core to choose the next free usbX interface. By default, it is set to "usb%d".h]hXland after creating the functions/ncm. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as “usb%d”, which will cause the net core to choose the next free usbX interface. By default, it is set to “usb%d”.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]id9ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhMjUKubh)}(hhh](h)}(hTesting the NCM functionh]hTesting the NCM function}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhhhhhMubh)}(h8Configure IP addresses of the device and the host. Then:h]h8Configure IP addresses of the device and the host. Then:}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXhhubh)}(hOn the device::h]hOn the device:}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXhhubjv)}(hping h]hping }hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjXhhubh)}(h On the host::h]h On the host:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXhhubjv)}(hping h]hping }hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjXhhubeh}(h]testing-the-ncm-functionah ]h"]testing the ncm functionah$]h&]uh1hhjhhhhhMubeh}(h] ncm-functionah ]h"]10. ncm functionah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h11. OBEX functionh]h11. OBEX function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h1The function is provided by usb_f_obex.ko module.h]h1The function is provided by usb_f_obex.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThe function name to use when creating the function directory is "obex". The OBEX function provides just one attribute in its function directory:h]hThe function name to use when creating the function directory is “obex”. The OBEX function provides just one attribute in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(h port_num h]h)}(hport_numh]hport_num}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubh)}(hThe attribute is read-only.h]hThe attribute is read-only.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hCThere can be at most 4 ACM/generic serial/OBEX ports in the system.h]hCThere can be at most 4 ACM/generic serial/OBEX ports in the system.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]id10ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhMjUKubh)}(hhh](h)}(hTesting the OBEX functionh]hTesting the OBEX function}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hhhhhMubh)}(h On device::h]h On device:}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubjv)}(h seriald -f /dev/ttyGS -s 1024h]h seriald -f /dev/ttyGS -s 1024}hjXsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj9hhubh)}(h On host::h]hOn host:}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubjv)}(hsserialc -v -p -i -a1 -s1024 \ -t -rh]hsserialc -v -p -i -a1 -s1024 \ -t -r}hjtsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj9hhubh)}(hwhere seriald and serialc are Felipe’s utilities found here:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9hhubj)}(h4https://github.com/felipebalbi/usb-tools.git master h]h)}(h3https://github.com/felipebalbi/usb-tools.git masterh](h reference)}(h,https://github.com/felipebalbi/usb-tools.gith]h,https://github.com/felipebalbi/usb-tools.git}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubh master}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhhhM hj9hhubeh}(h]testing-the-obex-functionah ]h"]testing the obex functionah$]h&]uh1hhjhhhhhMubeh}(h] obex-functionah ]h"]11. obex functionah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h12. PHONET functionh]h12. PHONET function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubh)}(h3The function is provided by usb_f_phonet.ko module.h]h3The function is provided by usb_f_phonet.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThe function name to use when creating the function directory is "phonet". The PHONET function provides just one attribute in its function directory:h]hThe function name to use when creating the function directory is “phonet”. The PHONET function provides just one attribute in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(h=============== ================================================== ifname network device interface name associated with this function instance =============== ================================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jChjubjZ)}(hhh]j_)}(hhh](jd)}(hhh]h)}(hifnameh]hifname}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jchj(ubjd)}(hhh]h)}(hDnetwork device interface name associated with this function instanceh]hDnetwork device interface name associated with this function instance}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jchj(ubeh}(h]h ]h"]h$]h&]uh1j^hj%ubah}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]colsKuh1j>hj ubah}(h]h ]h"]h$]h&]uh1j9hjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h]id11ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhMjUKubh)}(hhh](h)}(hTesting the PHONET functionh]hTesting the PHONET function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hIt is not possible to test the SOCK_STREAM protocol without a specific piece of hardware, so only SOCK_DGRAM has been tested. For the latter to work, in the past I had to apply the patch mentioned here:h]hIt is not possible to test the SOCK_STREAM protocol without a specific piece of hardware, so only SOCK_DGRAM has been tested. For the latter to work, in the past I had to apply the patch mentioned here:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h4http://www.spinics.net/lists/linux-usb/msg85689.htmlh]j)}(hjh]h4http://www.spinics.net/lists/linux-usb/msg85689.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubh)}(hThese tools are required:h]hThese tools are required:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjhhubh)}(h7git://git.gitorious.org/meego-cellular/phonet-utils.gith]h7git://git.gitorious.org/meego-cellular/phonet-utils.git}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjhhubh)}(h On the host::h]h On the host:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjhhubjv)}(hh$ ./phonet -a 0x10 -i usbpn0 $ ./pnroute add 0x6c usbpn0 $./pnroute add 0x10 usbpn0 $ ifconfig usbpn0 uph]hh$ ./phonet -a 0x10 -i usbpn0 $ ./pnroute add 0x6c usbpn0 $./pnroute add 0x10 usbpn0 $ ifconfig usbpn0 up}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhM*hjhhubh)}(hOn the device::h]hOn the device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjhhubjv)}(hS$ ./phonet -a 0x6c -i upnlink0 $ ./pnroute add 0x10 upnlink0 $ ifconfig upnlink0 uph]hS$ ./phonet -a 0x6c -i upnlink0 $ ./pnroute add 0x10 upnlink0 $ ifconfig upnlink0 up}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhM1hjhhubh)}(h!Then a test program can be used::h]h Then a test program can be used:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjhhubjv)}(h4http://www.spinics.net/lists/linux-usb/msg85690.htmlh]h4http://www.spinics.net/lists/linux-usb/msg85690.html}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhM7hjhhubh)}(hOn the device::h]hOn the device:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjhhubjv)}(h$ ./pnxmit -a 0x6c -rh]h$ ./pnxmit -a 0x6c -r}hj5sbah}(h]h ]h"]h$]h&]hhuh1juhhhM;hjhhubh)}(h On the host::h]h On the host:}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjhhubjv)}(h$ ./pnxmit -a 0x10 -s 0x6ch]h$ ./pnxmit -a 0x10 -s 0x6c}hjQsbah}(h]h ]h"]h$]h&]hhuh1juhhhM?hjhhubh)}(hSAs a result some data should be sent from host to device. Then the other way round:h]hSAs a result some data should be sent from host to device. Then the other way round:}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjhhubh)}(h On the host::h]h On the host:}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjhhubjv)}(h$ ./pnxmit -a 0x10 -rh]h$ ./pnxmit -a 0x10 -r}hj{sbah}(h]h ]h"]h$]h&]hhuh1juhhhMFhjhhubh)}(hOn the device::h]hOn the device:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjhhubjv)}(h$ ./pnxmit -a 0x6c -s 0x10h]h$ ./pnxmit -a 0x6c -s 0x10}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMJhjhhubeh}(h]testing-the-phonet-functionah ]h"]testing the phonet functionah$]h&]uh1hhjhhhhhMubeh}(h]phonet-functionah ]h"]12. phonet functionah$]h&]uh1hhhhhhhhM ubh)}(hhh](h)}(h13. RNDIS functionh]h13. RNDIS function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMMubh)}(h2The function is provided by usb_f_rndis.ko module.h]h2The function is provided by usb_f_rndis.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMRubh)}(hThe function name to use when creating the function directory is "rndis". The RNDIS function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “rndis”. The RNDIS function provides these attributes in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjhhubj)}(hX=============== ================================================== ifname network device interface name associated with this function instance qmult queue length multiplier for high and super speed host_addr MAC address of host's end of this Ethernet over USB link dev_addr MAC address of device's end of this Ethernet over USB link =============== ================================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jChjubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hifnameh]hifname}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hDnetwork device interface name associated with this function instanceh]hDnetwork device interface name associated with this function instance}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj.ubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hqmulth]hqmult}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjNubah}(h]h ]h"]h$]h&]uh1jchjKubjd)}(hhh]h)}(h0queue length multiplier for high and super speedh]h0queue length multiplier for high and super speed}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjeubah}(h]h ]h"]h$]h&]uh1jchjKubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h host_addrh]h host_addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h8MAC address of host's end of this Ethernet over USB linkh]h:MAC address of host’s end of this Ethernet over USB link}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hdev_addrh]hdev_addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h:MAC address of device's end of this Ethernet over USB linkh]hhjubah}(h]h ]h"]h$]h&]uh1j9hjubah}(h]h ]h"]h$]h&]uh1jhhhMWhjhhubh)}(hXfand after creating the functions/rndis. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as "usb%d", which will cause the net core to choose the next free usbX interface. By default, it is set to "usb%d".h]hXnand after creating the functions/rndis. they contain default values: qmult is 5, dev_addr and host_addr are randomly selected. The ifname can be written to if the function is not bound. A write must be an interface pattern such as “usb%d”, which will cause the net core to choose the next free usbX interface. By default, it is set to “usb%d”.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahjhhubeh}(h]id12ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhMRjUKubh)}(hhh](h)}(hTesting the RNDIS functionh]hTesting the RNDIS function}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMhubh)}(h8Configure IP addresses of the device and the host. Then:h]h8Configure IP addresses of the device and the host. Then:}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjhhubh)}(hOn the device::h]hOn the device:}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjhhubjv)}(hping h]hping }hjLsbah}(h]h ]h"]h$]h&]hhuh1juhhhMnhjhhubh)}(h On the host::h]h On the host:}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjhhubjv)}(hping h]hping }hjhsbah}(h]h ]h"]h$]h&]hhuh1juhhhMrhjhhubeh}(h]testing-the-rndis-functionah ]h"]testing the rndis functionah$]h&]uh1hhjhhhhhMhubeh}(h]rndis-functionah ]h"]13. rndis functionah$]h&]uh1hhhhhhhhMMubh)}(hhh](h)}(h14. SERIAL functionh]h14. SERIAL function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMuubh)}(h1The function is provided by usb_f_gser.ko module.h]h1The function is provided by usb_f_gser.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMzubh)}(hThe function name to use when creating the function directory is "gser". The SERIAL function provides just one attribute in its function directory:h]hThe function name to use when creating the function directory is “gser”. The SERIAL function provides just one attribute in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjhhubj)}(h port_num h]h)}(hport_numh]hport_num}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubh)}(hThe attribute is read-only.h]hThe attribute is read-only.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hCThere can be at most 4 ACM/generic serial/OBEX ports in the system.h]hCThere can be at most 4 ACM/generic serial/OBEX ports in the system.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]id13ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhMzjUKubh)}(hhh](h)}(hTesting the SERIAL functionh]hTesting the SERIAL function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h On host::h]hOn host:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjv)}(hIinsmod usbserial echo VID PID >/sys/bus/usb-serial/drivers/generic/new_idh]hIinsmod usbserial echo VID PID >/sys/bus/usb-serial/drivers/generic/new_id}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjhhubh)}(h On host::h]hOn host:}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjv)}(hcat > /dev/ttyUSBh]hcat > /dev/ttyUSB}hj;sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjhhubh)}(h On target::h]h On target:}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjv)}(hcat /dev/ttyGSh]hcat /dev/ttyGS}hjWsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjhhubh)}(hthen the other way roundh]hthen the other way round}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h On target::h]h On target:}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjv)}(hcat > /dev/ttyGSh]hcat > /dev/ttyGS}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjhhubh)}(h On host::h]hOn host:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjv)}(hcat /dev/ttyUSBh]hcat /dev/ttyUSB}hjsbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjhhubeh}(h]testing-the-serial-functionah ]h"]testing the serial functionah$]h&]uh1hhjhhhhhMubeh}(h]serial-functionah ]h"]14. serial functionah$]h&]uh1hhhhhhhhMuubh)}(hhh](h)}(h15. SOURCESINK functionh]h15. SOURCESINK function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h2The function is provided by usb_f_ss_lb.ko module.h]h2The function is provided by usb_f_ss_lb.ko module.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hThe function name to use when creating the function directory is "SourceSink". The SOURCESINK function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “SourceSink”. The SOURCESINK function provides these attributes in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hX=============== ================================== pattern 0 (all zeros), 1 (mod63), 2 (none) isoc_interval 1..16 isoc_maxpacket 0 - 1023 (fs), 0 - 1024 (hs/ss) isoc_mult 0..2 (hs/ss only) isoc_maxburst 0..15 (ss only) bulk_buflen buffer length bulk_qlen depth of queue for bulk iso_qlen depth of queue for iso =============== ================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK"uh1jChjubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hpatternh]hpattern}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h"0 (all zeros), 1 (mod63), 2 (none)h]h"0 (all zeros), 1 (mod63), 2 (none)}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h isoc_intervalh]h isoc_interval}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jchjQubjd)}(hhh]h)}(h1..16h]h1..16}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjkubah}(h]h ]h"]h$]h&]uh1jchjQubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hisoc_maxpacketh]hisoc_maxpacket}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h0 - 1023 (fs), 0 - 1024 (hs/ss)h]h0 - 1023 (fs), 0 - 1024 (hs/ss)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h isoc_multh]h isoc_mult}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h0..2 (hs/ss only)h]h0..2 (hs/ss only)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h isoc_maxbursth]h isoc_maxburst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h0..15 (ss only)h]h0..15 (ss only)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h bulk_buflenh]h bulk_buflen}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jchj-ubjd)}(hhh]h)}(h buffer lengthh]h buffer length}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1jchj-ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h bulk_qlenh]h bulk_qlen}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjgubah}(h]h ]h"]h$]h&]uh1jchjdubjd)}(hhh]h)}(hdepth of queue for bulkh]hdepth of queue for bulk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1jchjdubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hiso_qlenh]hiso_qlen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hdepth of queue for isoh]hdepth of queue for iso}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubeh}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]colsKuh1j>hjubah}(h]h ]h"]h$]h&]uh1j9hjubah}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h]id14ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjhhhhhMjUKubh)}(hhh](h)}(hTesting the SOURCESINK functionh]hTesting the SOURCESINK function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hdevice: run the gadgeth]hdevice: run the gadget}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h$host: test-usb (tools/usb/testusb.c)h]h$host: test-usb (tools/usb/testusb.c)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]testing-the-sourcesink-functionah ]h"]testing the sourcesink functionah$]h&]uh1hhjhhhhhMubeh}(h]sourcesink-functionah ]h"]15. sourcesink functionah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h)16. UAC1 function (legacy implementation)h]h)16. UAC1 function (legacy implementation)}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhMubh)}(h8The function is provided by usb_f_uac1_legacy.ko module.h]h8The function is provided by usb_f_uac1_legacy.ko module.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0hhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhhhhhMubh)}(hThe function name to use when creating the function directory is "uac1_legacy". The uac1 function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “uac1_legacy”. The uac1 function provides these attributes in its function directory:}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubj)}(hXt=============== ==================================== audio_buf_size audio buffer size fn_cap capture pcm device file name fn_cntl control device file name fn_play playback pcm device file name req_buf_size ISO OUT endpoint request buffer size req_count ISO OUT endpoint request count =============== ==================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjuubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK$uh1jChjuubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(haudio_buf_sizeh]haudio_buf_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(haudio buffer sizeh]haudio buffer size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hfn_caph]hfn_cap}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hcapture pcm device file nameh]hcapture pcm device file name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hfn_cntlh]hfn_cntl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hcontrol device file nameh]hcontrol device file name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hfn_playh]hfn_play}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jchj4ubjd)}(hhh]h)}(hplayback pcm device file nameh]hplayback pcm device file name}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjNubah}(h]h ]h"]h$]h&]uh1jchj4ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h req_buf_sizeh]h req_buf_size}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjnubah}(h]h ]h"]h$]h&]uh1jchjkubjd)}(hhh]h)}(h$ISO OUT endpoint request buffer sizeh]h$ISO OUT endpoint request buffer size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjkubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h req_counth]h req_count}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hISO OUT endpoint request counth]hISO OUT endpoint request count}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubeh}(h]h ]h"]h$]h&]uh1jYhjuubeh}(h]h ]h"]h$]h&]colsKuh1j>hjrubah}(h]h ]h"]h$]h&]uh1j9hjnubah}(h]h ]h"]h$]h&]uh1jhhhMhjOhhubh)}(h(The attributes have sane default values.h]h(The attributes have sane default values.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOhhubeh}(h]id15ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhj0hhhhhMjUKubh)}(hhh](h)}(hTesting the UAC1 functionh]hTesting the UAC1 function}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hdevice: run the gadgeth]hdevice: run the gadget}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hhost::h]hhost:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjv)}(h+aplay -l # should list our USB Audio Gadgeth]h+aplay -l # should list our USB Audio Gadget}hj5sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjhhubeh}(h]testing-the-uac1-functionah ]h"]h$]testing the uac1 functionah&]uh1hhj0hhhhhMjUKubeh}(h]#uac1-function-legacy-implementationah ]h"])16. uac1 function (legacy implementation)ah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h17. UAC2 functionh]h17. UAC2 function}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShhhhhMubh)}(h1The function is provided by usb_f_uac2.ko module.h]h1The function is provided by usb_f_uac2.ko module.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjShhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhhhhhMubh)}(hThe function name to use when creating the function directory is "uac2". The uac2 function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “uac2”. The uac2 function provides these attributes in its function directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrhhubj)}(hX================ ==================================================== c_chmask capture channel mask c_srate list of capture sampling rates (comma-separated) c_ssize capture sample size (bytes) c_sync capture synchronization type (async/adaptive) c_mute_present capture mute control enable c_volume_present capture volume control enable c_volume_min capture volume control min value (in 1/256 dB) c_volume_max capture volume control max value (in 1/256 dB) c_volume_res capture volume control resolution (in 1/256 dB) c_hs_bint capture bInterval for HS/SS (1-4: fixed, 0: auto) fb_max maximum extra bandwidth in async mode p_chmask playback channel mask p_srate list of playback sampling rates (comma-separated) p_ssize playback sample size (bytes) p_mute_present playback mute control enable p_volume_present playback volume control enable p_volume_min playback volume control min value (in 1/256 dB) p_volume_max playback volume control max value (in 1/256 dB) p_volume_res playback volume control resolution (in 1/256 dB) p_hs_bint playback bInterval for HS/SS (1-4: fixed, 0: auto) req_number the number of pre-allocated request for both capture and playback function_name name of the interface if_ctrl_name topology control name clksrc_in_name input clock name clksrc_out_name output clock name p_it_name playback input terminal name p_it_ch_name playback input first channel name p_ot_name playback output terminal name p_fu_vol_name playback function unit name c_it_name capture input terminal name c_it_ch_name capture input first channel name c_ot_name capture output terminal name c_fu_vol_name capture functional unit name c_terminal_type code of the capture terminal type p_terminal_type code of the playback terminal type ================ ==================================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChjubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK4uh1jChjubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hc_chmaskh]hc_chmask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hcapture channel maskh]hcapture channel mask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hc_srateh]hc_srate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h0list of capture sampling rates (comma-separated)h]h0list of capture sampling rates (comma-separated)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hc_ssizeh]hc_ssize}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(hcapture sample size (bytes)h]hcapture sample size (bytes)}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hc_synch]hc_sync}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1jchjWubjd)}(hhh]h)}(h-capture synchronization type (async/adaptive)h]h-capture synchronization type (async/adaptive)}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjqubah}(h]h ]h"]h$]h&]uh1jchjWubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hc_mute_presenth]hc_mute_present}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hcapture mute control enableh]hcapture mute control enable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hc_volume_presenth]hc_volume_present}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(hcapture volume control enableh]hcapture volume control enable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h c_volume_minh]h c_volume_min}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jchjubjd)}(hhh]h)}(h.capture volume control min value (in 1/256 dB)h]h.capture volume control min value (in 1/256 dB)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jchjubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h c_volume_maxh]h c_volume_max}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6 ubah}(h]h ]h"]h$]h&]uh1jchj3 ubjd)}(hhh]h)}(h.capture volume control max value (in 1/256 dB)h]h.capture volume control max value (in 1/256 dB)}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjM ubah}(h]h ]h"]h$]h&]uh1jchj3 ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h c_volume_resh]h c_volume_res}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjm ubah}(h]h ]h"]h$]h&]uh1jchjj ubjd)}(hhh]h)}(h/capture volume control resolution (in 1/256 dB)h]h/capture volume control resolution (in 1/256 dB)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jchjj ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h c_hs_binth]h c_hs_bint}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(h1capture bInterval for HS/SS (1-4: fixed, 0: auto)h]h1capture bInterval for HS/SS (1-4: fixed, 0: auto)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hfb_maxh]hfb_max}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jchj ubjd)}(hhh]h)}(h%maximum extra bandwidth in async modeh]h%maximum extra bandwidth in async mode}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jchj ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hp_chmaskh]hp_chmask}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jchj!ubjd)}(hhh]h)}(hplayback channel maskh]hplayback channel mask}(hj,!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)!ubah}(h]h ]h"]h$]h&]uh1jchj!ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hp_srateh]hp_srate}(hjL!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjI!ubah}(h]h ]h"]h$]h&]uh1jchjF!ubjd)}(hhh]h)}(h1list of playback sampling rates (comma-separated)h]h1list of playback sampling rates (comma-separated)}(hjc!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`!ubah}(h]h ]h"]h$]h&]uh1jchjF!ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hp_ssizeh]hp_ssize}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jchj}!ubjd)}(hhh]h)}(hplayback sample size (bytes)h]hplayback sample size (bytes)}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jchj}!ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hp_mute_presenth]hp_mute_present}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jchj!ubjd)}(hhh]h)}(hplayback mute control enableh]hplayback mute control enable}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jchj!ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hp_volume_presenth]hp_volume_present}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jchj!ubjd)}(hhh]h)}(hplayback volume control enableh]hplayback volume control enable}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jchj!ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h p_volume_minh]h p_volume_min}(hj("hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%"ubah}(h]h ]h"]h$]h&]uh1jchj""ubjd)}(hhh]h)}(h/playback volume control min value (in 1/256 dB)h]h/playback volume control min value (in 1/256 dB)}(hj?"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<"ubah}(h]h ]h"]h$]h&]uh1jchj""ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h p_volume_maxh]h p_volume_max}(hj_"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\"ubah}(h]h ]h"]h$]h&]uh1jchjY"ubjd)}(hhh]h)}(h/playback volume control max value (in 1/256 dB)h]h/playback volume control max value (in 1/256 dB)}(hjv"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjs"ubah}(h]h ]h"]h$]h&]uh1jchjY"ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h p_volume_resh]h p_volume_res}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jchj"ubjd)}(hhh]h)}(h0playback volume control resolution (in 1/256 dB)h]h0playback volume control resolution (in 1/256 dB)}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jchj"ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h p_hs_binth]h p_hs_bint}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jchj"ubjd)}(hhh]h)}(h2playback bInterval for HS/SS (1-4: fixed, 0: auto)h]h2playback bInterval for HS/SS (1-4: fixed, 0: auto)}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jchj"ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h req_numberh]h req_number}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jchj"ubjd)}(hhh]h)}(hAthe number of pre-allocated request for both capture and playbackh]hAthe number of pre-allocated request for both capture and playback}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jchj"ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h function_nameh]h function_name}(hj;#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8#ubah}(h]h ]h"]h$]h&]uh1jchj5#ubjd)}(hhh]h)}(hname of the interfaceh]hname of the interface}(hjR#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjO#ubah}(h]h ]h"]h$]h&]uh1jchj5#ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h if_ctrl_nameh]h if_ctrl_name}(hjr#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjo#ubah}(h]h ]h"]h$]h&]uh1jchjl#ubjd)}(hhh]h)}(htopology control nameh]htopology control name}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jchjl#ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hclksrc_in_nameh]hclksrc_in_name}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jchj#ubjd)}(hhh]h)}(hinput clock nameh]hinput clock name}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jchj#ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hclksrc_out_nameh]hclksrc_out_name}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jchj#ubjd)}(hhh]h)}(houtput clock nameh]houtput clock name}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jchj#ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h p_it_nameh]h p_it_name}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jchj$ubjd)}(hhh]h)}(hplayback input terminal nameh]hplayback input terminal name}(hj.$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+$ubah}(h]h ]h"]h$]h&]uh1jchj$ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h p_it_ch_nameh]h p_it_ch_name}(hjN$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK$ubah}(h]h ]h"]h$]h&]uh1jchjH$ubjd)}(hhh]h)}(h!playback input first channel nameh]h!playback input first channel name}(hje$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb$ubah}(h]h ]h"]h$]h&]uh1jchjH$ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h p_ot_nameh]h p_ot_name}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jchj$ubjd)}(hhh]h)}(hplayback output terminal nameh]hplayback output terminal name}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jchj$ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h p_fu_vol_nameh]h p_fu_vol_name}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jchj$ubjd)}(hhh]h)}(hplayback function unit nameh]hplayback function unit name}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jchj$ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h c_it_nameh]h c_it_name}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jchj$ubjd)}(hhh]h)}(hcapture input terminal nameh]hcapture input terminal name}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jchj$ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h c_it_ch_nameh]h c_it_ch_name}(hj*%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'%ubah}(h]h ]h"]h$]h&]uh1jchj$%ubjd)}(hhh]h)}(h capture input first channel nameh]h capture input first channel name}(hjA%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>%ubah}(h]h ]h"]h$]h&]uh1jchj$%ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h c_ot_nameh]h c_ot_name}(hja%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj^%ubah}(h]h ]h"]h$]h&]uh1jchj[%ubjd)}(hhh]h)}(hcapture output terminal nameh]hcapture output terminal name}(hjx%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hju%ubah}(h]h ]h"]h$]h&]uh1jchj[%ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(h c_fu_vol_nameh]h c_fu_vol_name}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj%ubah}(h]h ]h"]h$]h&]uh1jchj%ubjd)}(hhh]h)}(hcapture functional unit nameh]hcapture functional unit name}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj%ubah}(h]h ]h"]h$]h&]uh1jchj%ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hc_terminal_typeh]hc_terminal_type}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj%ubah}(h]h ]h"]h$]h&]uh1jchj%ubjd)}(hhh]h)}(h!code of the capture terminal typeh]h!code of the capture terminal type}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj%ubah}(h]h ]h"]h$]h&]uh1jchj%ubeh}(h]h ]h"]h$]h&]uh1j^hjubj_)}(hhh](jd)}(hhh]h)}(hp_terminal_typeh]hp_terminal_type}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj&ubah}(h]h ]h"]h$]h&]uh1jchj&ubjd)}(hhh]h)}(h"code of the playback terminal typeh]h"code of the playback terminal type}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj&ubah}(h]h ]h"]h$]h&]uh1jchj&ubeh}(h]h ]h"]h$]h&]uh1j^hjubeh}(h]h ]h"]h$]h&]uh1jYhjubeh}(h]h ]h"]h$]h&]colsKuh1j>hjubah}(h]h ]h"]h$]h&]uh1j9hjubah}(h]h ]h"]h$]h&]uh1jhhhMhjrhhubh)}(h(The attributes have sane default values.h]h(The attributes have sane default values.}(hjP&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrhhubeh}(h]id16ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhjShhhhhMjUKubh)}(hhh](h)}(hTesting the UAC2 functionh]hTesting the UAC2 function}(hji&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf&hhhhhMubh)}(hHdevice: run the gadget host: aplay -l # should list our USB Audio Gadgeth]hHdevice: run the gadget host: aplay -l # should list our USB Audio Gadget}(hjw&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf&hhubh)}(hThis function does not require real hardware support, it just sends a stream of audio data to/from the host. In order to actually hear something at the device side, a command similar to this must be used at the device side::h]hThis function does not require real hardware support, it just sends a stream of audio data to/from the host. In order to actually hear something at the device side, a command similar to this must be used at the device side:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf&hhubjv)}(h5$ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &h]h5$ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &}hj&sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhjf&hhubh)}(he.g.::h]he.g.:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf&hhubjv)}(hX$ arecord -f dat -t wav -D hw:CARD=UAC2Gadget,DEV=0 | \ aplay -D default:CARD=OdroidU3h]hX$ arecord -f dat -t wav -D hw:CARD=UAC2Gadget,DEV=0 | \ aplay -D default:CARD=OdroidU3}hj&sbah}(h]h ]h"]h$]h&]hhuh1juhhhM hjf&hhubeh}(h]testing-the-uac2-functionah ]h"]testing the uac2 functionah$]h&]uh1hhjShhhhhMubeh}(h] uac2-functionah ]h"]17. uac2 functionah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h18. UVC functionh]h18. UVC function}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hhhhhM$ubh)}(h0The function is provided by usb_f_uvc.ko module.h]h0The function is provided by usb_f_uvc.ko module.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hj&hhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hhhhhM)ubh)}(hThe function name to use when creating the function directory is "uvc". The uvc function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “uvc”. The uvc function provides these attributes in its function directory:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hj&hhubj)}(hX=================== ================================================ streaming_interval interval for polling endpoint for data transfers streaming_maxburst bMaxBurst for super speed companion descriptor streaming_maxpacket maximum packet size this endpoint is capable of sending or receiving when this configuration is selected function_name name of the interface =================== ================================================ h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj'ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK0uh1jChj'ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hstreaming_intervalh]hstreaming_interval}(hj2'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj/'ubah}(h]h ]h"]h$]h&]uh1jchj,'ubjd)}(hhh]h)}(h0interval for polling endpoint for data transfersh]h0interval for polling endpoint for data transfers}(hjI'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjF'ubah}(h]h ]h"]h$]h&]uh1jchj,'ubeh}(h]h ]h"]h$]h&]uh1j^hj)'ubj_)}(hhh](jd)}(hhh]h)}(hstreaming_maxbursth]hstreaming_maxburst}(hji'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hjf'ubah}(h]h ]h"]h$]h&]uh1jchjc'ubjd)}(hhh]h)}(h.bMaxBurst for super speed companion descriptorh]h.bMaxBurst for super speed companion descriptor}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj}'ubah}(h]h ]h"]h$]h&]uh1jchjc'ubeh}(h]h ]h"]h$]h&]uh1j^hj)'ubj_)}(hhh](jd)}(hhh]h)}(hstreaming_maxpacketh]hstreaming_maxpacket}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj'ubah}(h]h ]h"]h$]h&]uh1jchj'ubjd)}(hhh]h)}(hhmaximum packet size this endpoint is capable of sending or receiving when this configuration is selectedh]hhmaximum packet size this endpoint is capable of sending or receiving when this configuration is selected}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj'ubah}(h]h ]h"]h$]h&]uh1jchj'ubeh}(h]h ]h"]h$]h&]uh1j^hj)'ubj_)}(hhh](jd)}(hhh]h)}(h function_nameh]h function_name}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj'ubah}(h]h ]h"]h$]h&]uh1jchj'ubjd)}(hhh]h)}(hname of the interfaceh]hname of the interface}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj'ubah}(h]h ]h"]h$]h&]uh1jchj'ubeh}(h]h ]h"]h$]h&]uh1j^hj)'ubeh}(h]h ]h"]h$]h&]uh1jYhj'ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj'ubah}(h]h ]h"]h$]h&]uh1j9hj 'ubah}(h]h ]h"]h$]h&]uh1jhhhM.hj&hhubh)}(hThere are also "control" and "streaming" subdirectories, each of which contain a number of their subdirectories. There are some sane defaults provided, but the user must provide the following:h]hThere are also “control” and “streaming” subdirectories, each of which contain a number of their subdirectories. There are some sane defaults provided, but the user must provide the following:}(hj!(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj&hhubj)}(hXz================== ==================================================== control header create in control/header, link from control/class/fs and/or control/class/ss streaming header create in streaming/header, link from streaming/class/fs and/or streaming/class/hs and/or streaming/class/ss format description create in streaming/mjpeg and/or streaming/uncompressed frame description create in streaming/mjpeg/ and/or in streaming/uncompressed/ ================== ==================================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj6(ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK4uh1jChj6(ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hcontrol headerh]hcontrol header}(hjV(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjS(ubah}(h]h ]h"]h$]h&]uh1jchjP(ubjd)}(hhh]h)}(hLcreate in control/header, link from control/class/fs and/or control/class/ssh]hLcreate in control/header, link from control/class/fs and/or control/class/ss}(hjm(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjj(ubah}(h]h ]h"]h$]h&]uh1jchjP(ubeh}(h]h ]h"]h$]h&]uh1j^hjM(ubj_)}(hhh](jd)}(hhh]h)}(hstreaming headerh]hstreaming header}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj(ubah}(h]h ]h"]h$]h&]uh1jchj(ubjd)}(hhh]h)}(hlcreate in streaming/header, link from streaming/class/fs and/or streaming/class/hs and/or streaming/class/ssh]hlcreate in streaming/header, link from streaming/class/fs and/or streaming/class/hs and/or streaming/class/ss}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj(ubah}(h]h ]h"]h$]h&]uh1jchj(ubeh}(h]h ]h"]h$]h&]uh1j^hjM(ubj_)}(hhh](jd)}(hhh]h)}(hformat descriptionh]hformat description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj(ubah}(h]h ]h"]h$]h&]uh1jchj(ubjd)}(hhh]h)}(h7create in streaming/mjpeg and/or streaming/uncompressedh]h7create in streaming/mjpeg and/or streaming/uncompressed}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj(ubah}(h]h ]h"]h$]h&]uh1jchj(ubeh}(h]h ]h"]h$]h&]uh1j^hjM(ubj_)}(hhh](jd)}(hhh]h)}(hframe descriptionh]hframe description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj(ubah}(h]h ]h"]h$]h&]uh1jchj(ubjd)}(hhh]h)}(hLcreate in streaming/mjpeg/ and/or in streaming/uncompressed/h]hLcreate in streaming/mjpeg/ and/or in streaming/uncompressed/}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj)ubah}(h]h ]h"]h$]h&]uh1jchj(ubeh}(h]h ]h"]h$]h&]uh1j^hjM(ubeh}(h]h ]h"]h$]h&]uh1jYhj6(ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj3(ubah}(h]h ]h"]h$]h&]uh1j9hj/(ubah}(h]h ]h"]h$]h&]uh1jhhhM;hj&hhubh)}(hEach frame description contains frame interval specification, and each such specification consists of a number of lines with an interval value in each line. The rules stated above are best illustrated with an example::h]hEach frame description contains frame interval specification, and each such specification consists of a number of lines with an interval value in each line. The rules stated above are best illustrated with an example:}(hjE)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhj&hhubjv)}(hX8# mkdir functions/uvc.usb0/control/header/h # cd functions/uvc.usb0/control/ # ln -s header/h class/fs # ln -s header/h class/ss # mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p # cat < functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval 666666 1000000 5000000 EOF # cd $GADGET_CONFIGFS_ROOT # mkdir functions/uvc.usb0/streaming/header/h # cd functions/uvc.usb0/streaming/header/h # ln -s ../../uncompressed/u # cd ../../class/fs # ln -s ../../header/h # cd ../../class/hs # ln -s ../../header/h # cd ../../class/ss # ln -s ../../header/hh]hX8# mkdir functions/uvc.usb0/control/header/h # cd functions/uvc.usb0/control/ # ln -s header/h class/fs # ln -s header/h class/ss # mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p # cat < functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval 666666 1000000 5000000 EOF # cd $GADGET_CONFIGFS_ROOT # mkdir functions/uvc.usb0/streaming/header/h # cd functions/uvc.usb0/streaming/header/h # ln -s ../../uncompressed/u # cd ../../class/fs # ln -s ../../header/h # cd ../../class/hs # ln -s ../../header/h # cd ../../class/ss # ln -s ../../header/h}hjS)sbah}(h]h ]h"]h$]h&]hhuh1juhhhMKhj&hhubeh}(h]id17ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhj&hhhhhM)jUKubh)}(hhh](h)}(hTesting the UVC functionh]hTesting the UVC function}(hjl)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji)hhhhhMbubh)}(h(device: run the gadget, modprobe vivid::h]h'device: run the gadget, modprobe vivid:}(hjz)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhji)hhubjv)}(hN# uvc-gadget -u /dev/video -v /dev/videoh]hN# uvc-gadget -u /dev/video -v /dev/video}hj)sbah}(h]h ]h"]h$]h&]hhuh1juhhhMfhji)hhubhdefinition_list)}(hhh]hdefinition_list_item)}(hMwhere uvc-gadget is this program: http://git.ideasonboard.org/uvc-gadget.git h](hterm)}(h!where uvc-gadget is this program:h]h!where uvc-gadget is this program:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hhhMihj)ubh definition)}(hhh]h)}(h*http://git.ideasonboard.org/uvc-gadget.gith]j)}(hj)h]h*http://git.ideasonboard.org/uvc-gadget.git}(hj)hhhNhNubah}(h]h ]h"]h$]h&]refurij)uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hhhhMihj)ubah}(h]h ]h"]h$]h&]uh1j)hj)ubeh}(h]h ]h"]h$]h&]uh1j)hhhMihj)ubah}(h]h ]h"]h$]h&]uh1j)hji)hhhhhNubh)}(hwith these patches:h]hwith these patches:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhji)hhubj)}(h5http://www.spinics.net/lists/linux-usb/msg99220.html h]h)}(h4http://www.spinics.net/lists/linux-usb/msg99220.htmlh]j)}(hj)h]h4http://www.spinics.net/lists/linux-usb/msg99220.html}(hj)hhhNhNubah}(h]h ]h"]h$]h&]refurij)uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hhhhMmhj)ubah}(h]h ]h"]h$]h&]uh1jhhhMmhji)hhubh)}(hhost::h]hhost:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohji)hhubjv)}(hluvcview -f yuvh]hluvcview -f yuv}hj*sbah}(h]h ]h"]h$]h&]hhuh1juhhhMqhji)hhubeh}(h]testing-the-uvc-functionah ]h"]testing the uvc functionah$]h&]uh1hhj&hhhhhMbubeh}(h] uvc-functionah ]h"]18. uvc functionah$]h&]uh1hhhhhhhhM$ubh)}(hhh](h)}(h19. PRINTER functionh]h19. PRINTER function}(hj?*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<*hhhhhMtubh)}(h4The function is provided by usb_f_printer.ko module.h]h4The function is provided by usb_f_printer.ko module.}(hjM*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj<*hhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hj^*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[*hhhhhMyubh)}(hThe function name to use when creating the function directory is "printer". The printer function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “printer”. The printer function provides these attributes in its function directory:}(hjl*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hj[*hhubj)}(h========== =========================================== pnp_string Data to be passed to the host in pnp string q_len Number of requests per endpoint ========== =========================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jChj*ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK+uh1jChj*ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(h pnp_stringh]h pnp_string}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jchj*ubjd)}(hhh]h)}(h+Data to be passed to the host in pnp stringh]h+Data to be passed to the host in pnp string}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jchj*ubeh}(h]h ]h"]h$]h&]uh1j^hj*ubj_)}(hhh](jd)}(hhh]h)}(hq_lenh]hq_len}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jchj*ubjd)}(hhh]h)}(hNumber of requests per endpointh]hNumber of requests per endpoint}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jchj*ubeh}(h]h ]h"]h$]h&]uh1j^hj*ubeh}(h]h ]h"]h$]h&]uh1jYhj*ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj~*ubah}(h]h ]h"]h$]h&]uh1j9hjz*ubah}(h]h ]h"]h$]h&]uh1jhhhM~hj[*hhubeh}(h]id18ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhj<*hhhhhMyjUKubh)}(hhh](h)}(hTesting the PRINTER functionh]hTesting the PRINTER function}(hj-+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*+hhhhhMubh)}(hThe most basic testing:h]hThe most basic testing:}(hj;+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubh)}(hdevice: run the gadget::h]hdevice: run the gadget:}(hjI+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubjv)}(h,# ls -l /devices/virtual/usb_printer_gadget/h]h,# ls -l /devices/virtual/usb_printer_gadget/}hjW+sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj*+hhubh)}(hshould show g_printer.h]hshould show g_printer.}(hje+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubh)}(hKIf udev is active, then /dev/g_printer should appear automatically.h]hKIf udev is active, then /dev/g_printer should appear automatically.}(hjs+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubh)}(hhost:h]hhost:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubh)}(h8If udev is active, then e.g. /dev/usb/lp0 should appear.h]h8If udev is active, then e.g. /dev/usb/lp0 should appear.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubh)}(hhost->device transmission:h]hhost->device transmission:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubh)}(hdevice::h]hdevice:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubjv)}(h# cat /dev/g_printerh]h# cat /dev/g_printer}hj+sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj*+hhubh)}(hhost::h]hhost:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubjv)}(h# cat > /dev/usb/lp0h]h# cat > /dev/usb/lp0}hj+sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj*+hhubh)}(hdevice->host transmission::h]hdevice->host transmission:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubjv)}(h# cat > /dev/g_printerh]h# cat > /dev/g_printer}hj+sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj*+hhubh)}(hhost::h]hhost:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubjv)}(h# cat /dev/usb/lp0h]h# cat /dev/usb/lp0}hj ,sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj*+hhubh)}(hiMore advanced testing can be done with the prn_example described in Documentation/usb/gadget_printer.rst.h]hiMore advanced testing can be done with the prn_example described in Documentation/usb/gadget_printer.rst.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*+hhubeh}(h]testing-the-printer-functionah ]h"]testing the printer functionah$]h&]uh1hhj<*hhhhhMubeh}(h]printer-functionah ]h"]19. printer functionah$]h&]uh1hhhhhhhhMtubh)}(hhh](h)}(h820. UAC1 function (virtual ALSA card, using u_audio API)h]h820. UAC1 function (virtual ALSA card, using u_audio API)}(hj<,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9,hhhhhMubh)}(hThe function is provided by usb_f_uac1.ko module. It will create a virtual ALSA card and the audio streams are simply sinked to and sourced from it.h]hThe function is provided by usb_f_uac1.ko module. It will create a virtual ALSA card and the audio streams are simply sinked to and sourced from it.}(hjJ,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9,hhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hj[,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX,hhhhhMubh)}(hThe function name to use when creating the function directory is "uac1". The uac1 function provides these attributes in its function directory:h]hThe function name to use when creating the function directory is “uac1”. The uac1 function provides these attributes in its function directory:}(hji,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjX,hhubj)}(hX================ ==================================================== c_chmask capture channel mask c_srate list of capture sampling rates (comma-separated) c_ssize capture sample size (bytes) c_mute_present capture mute control enable c_volume_present capture volume control enable c_volume_min capture volume control min value (in 1/256 dB) c_volume_max capture volume control max value (in 1/256 dB) c_volume_res capture volume control resolution (in 1/256 dB) p_chmask playback channel mask p_srate list of playback sampling rates (comma-separated) p_ssize playback sample size (bytes) p_mute_present playback mute control enable p_volume_present playback volume control enable p_volume_min playback volume control min value (in 1/256 dB) p_volume_max playback volume control max value (in 1/256 dB) p_volume_res playback volume control resolution (in 1/256 dB) req_number the number of pre-allocated requests for both capture and playback function_name name of the interface p_it_name playback input terminal name p_it_ch_name playback channels name p_ot_name playback output terminal name p_fu_vol_name playback mute/volume functional unit name c_it_name capture input terminal name c_it_ch_name capture channels name c_ot_name capture output terminal name c_fu_vol_name capture mute/volume functional unit name ================ ==================================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj~,ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK5uh1jChj~,ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hc_chmaskh]hc_chmask}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jchj,ubjd)}(hhh]h)}(hcapture channel maskh]hcapture channel mask}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jchj,ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hc_srateh]hc_srate}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jchj,ubjd)}(hhh]h)}(h0list of capture sampling rates (comma-separated)h]h0list of capture sampling rates (comma-separated)}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jchj,ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hc_ssizeh]hc_ssize}(hj -hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj -ubah}(h]h ]h"]h$]h&]uh1jchj-ubjd)}(hhh]h)}(hcapture sample size (bytes)h]hcapture sample size (bytes)}(hj#-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj -ubah}(h]h ]h"]h$]h&]uh1jchj-ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hc_mute_presenth]hc_mute_present}(hjC-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@-ubah}(h]h ]h"]h$]h&]uh1jchj=-ubjd)}(hhh]h)}(hcapture mute control enableh]hcapture mute control enable}(hjZ-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjW-ubah}(h]h ]h"]h$]h&]uh1jchj=-ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hc_volume_presenth]hc_volume_present}(hjz-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw-ubah}(h]h ]h"]h$]h&]uh1jchjt-ubjd)}(hhh]h)}(hcapture volume control enableh]hcapture volume control enable}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jchjt-ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h c_volume_minh]h c_volume_min}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jchj-ubjd)}(hhh]h)}(h.capture volume control min value (in 1/256 dB)h]h.capture volume control min value (in 1/256 dB)}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jchj-ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h c_volume_maxh]h c_volume_max}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jchj-ubjd)}(hhh]h)}(h.capture volume control max value (in 1/256 dB)h]h.capture volume control max value (in 1/256 dB)}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj-ubah}(h]h ]h"]h$]h&]uh1jchj-ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h c_volume_resh]h c_volume_res}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jchj.ubjd)}(hhh]h)}(h/capture volume control resolution (in 1/256 dB)h]h/capture volume control resolution (in 1/256 dB)}(hj6.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3.ubah}(h]h ]h"]h$]h&]uh1jchj.ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hp_chmaskh]hp_chmask}(hjV.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjS.ubah}(h]h ]h"]h$]h&]uh1jchjP.ubjd)}(hhh]h)}(hplayback channel maskh]hplayback channel mask}(hjm.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj.ubah}(h]h ]h"]h$]h&]uh1jchjP.ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hp_srateh]hp_srate}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jchj.ubjd)}(hhh]h)}(h1list of playback sampling rates (comma-separated)h]h1list of playback sampling rates (comma-separated)}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jchj.ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hp_ssizeh]hp_ssize}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jchj.ubjd)}(hhh]h)}(hplayback sample size (bytes)h]hplayback sample size (bytes)}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jchj.ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hp_mute_presenth]hp_mute_present}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jchj.ubjd)}(hhh]h)}(hplayback mute control enableh]hplayback mute control enable}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jchj.ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(hp_volume_presenth]hp_volume_present}(hj2/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj//ubah}(h]h ]h"]h$]h&]uh1jchj,/ubjd)}(hhh]h)}(hplayback volume control enableh]hplayback volume control enable}(hjI/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjF/ubah}(h]h ]h"]h$]h&]uh1jchj,/ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h p_volume_minh]h p_volume_min}(hji/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjf/ubah}(h]h ]h"]h$]h&]uh1jchjc/ubjd)}(hhh]h)}(h/playback volume control min value (in 1/256 dB)h]h/playback volume control min value (in 1/256 dB)}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}/ubah}(h]h ]h"]h$]h&]uh1jchjc/ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h p_volume_maxh]h p_volume_max}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jchj/ubjd)}(hhh]h)}(h/playback volume control max value (in 1/256 dB)h]h/playback volume control max value (in 1/256 dB)}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jchj/ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h p_volume_resh]h p_volume_res}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jchj/ubjd)}(hhh]h)}(h0playback volume control resolution (in 1/256 dB)h]h0playback volume control resolution (in 1/256 dB)}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jchj/ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h req_numberh]h req_number}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj 0ubah}(h]h ]h"]h$]h&]uh1jchj0ubjd)}(hhh]h)}(hBthe number of pre-allocated requests for both capture and playbackh]hBthe number of pre-allocated requests for both capture and playback}(hj%0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"0ubah}(h]h ]h"]h$]h&]uh1jchj0ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h function_nameh]h function_name}(hjE0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjB0ubah}(h]h ]h"]h$]h&]uh1jchj?0ubjd)}(hhh]h)}(hname of the interfaceh]hname of the interface}(hj\0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjY0ubah}(h]h ]h"]h$]h&]uh1jchj?0ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h p_it_nameh]h p_it_name}(hj|0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjy0ubah}(h]h ]h"]h$]h&]uh1jchjv0ubjd)}(hhh]h)}(hplayback input terminal nameh]hplayback input terminal name}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jchjv0ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h p_it_ch_nameh]h p_it_ch_name}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jchj0ubjd)}(hhh]h)}(hplayback channels nameh]hplayback channels name}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jchj0ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h p_ot_nameh]h p_ot_name}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jchj0ubjd)}(hhh]h)}(hplayback output terminal nameh]hplayback output terminal name}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jchj0ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h p_fu_vol_nameh]h p_fu_vol_name}(hj!1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jchj1ubjd)}(hhh]h)}(h)playback mute/volume functional unit nameh]h)playback mute/volume functional unit name}(hj81hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj51ubah}(h]h ]h"]h$]h&]uh1jchj1ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h c_it_nameh]h c_it_name}(hjX1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjU1ubah}(h]h ]h"]h$]h&]uh1jchjR1ubjd)}(hhh]h)}(hcapture input terminal nameh]hcapture input terminal name}(hjo1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjl1ubah}(h]h ]h"]h$]h&]uh1jchjR1ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h c_it_ch_nameh]h c_it_ch_name}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jchj1ubjd)}(hhh]h)}(hcapture channels nameh]hcapture channels name}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jchj1ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h c_ot_nameh]h c_ot_name}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jchj1ubjd)}(hhh]h)}(hcapture output terminal nameh]hcapture output terminal name}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jchj1ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubj_)}(hhh](jd)}(hhh]h)}(h c_fu_vol_nameh]h c_fu_vol_name}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1jchj1ubjd)}(hhh]h)}(h(capture mute/volume functional unit nameh]h(capture mute/volume functional unit name}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jchj1ubeh}(h]h ]h"]h$]h&]uh1j^hj,ubeh}(h]h ]h"]h$]h&]uh1jYhj~,ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj{,ubah}(h]h ]h"]h$]h&]uh1j9hjw,ubah}(h]h ]h"]h$]h&]uh1jhhhMhjX,hhubh)}(h(The attributes have sane default values.h]h(The attributes have sane default values.}(hjG2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjX,hhubeh}(h]id19ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhj9,hhhhhMjUKubh)}(hhh](h)}(hTesting the UAC1 functionh]hTesting the UAC1 function}(hj`2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]2hhhhhMubh)}(hHdevice: run the gadget host: aplay -l # should list our USB Audio Gadgeth]hHdevice: run the gadget host: aplay -l # should list our USB Audio Gadget}(hjn2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]2hhubh)}(hThis function does not require real hardware support, it just sends a stream of audio data to/from the host. In order to actually hear something at the device side, a command similar to this must be used at the device side::h]hThis function does not require real hardware support, it just sends a stream of audio data to/from the host. In order to actually hear something at the device side, a command similar to this must be used at the device side:}(hj|2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]2hhubjv)}(h5$ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &h]h5$ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &}hj2sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj]2hhubh)}(he.g.::h]he.g.:}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj]2hhubjv)}(hX$ arecord -f dat -t wav -D hw:CARD=UAC1Gadget,DEV=0 | \ aplay -D default:CARD=OdroidU3h]hX$ arecord -f dat -t wav -D hw:CARD=UAC1Gadget,DEV=0 | \ aplay -D default:CARD=OdroidU3}hj2sbah}(h]h ]h"]h$]h&]hhuh1juhhhMhj]2hhubeh}(h]id20ah ]h"]h$]jIah&]uh1hhj9,hhhhhMjUKubeh}(h]1uac1-function-virtual-alsa-card-using-u-audio-apiah ]h"]820. uac1 function (virtual alsa card, using u_audio api)ah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h21. MIDI2 functionh]h21. MIDI2 function}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhMubh)}(hXThe function is provided by usb_f_midi2.ko module. It will create a virtual ALSA card containing a UMP rawmidi device where the UMP packet is looped back. In addition, a legacy rawmidi device is created. The UMP rawmidi is bound with ALSA sequencer clients, too.h]hXThe function is provided by usb_f_midi2.ko module. It will create a virtual ALSA card containing a UMP rawmidi device where the UMP packet is looped back. In addition, a legacy rawmidi device is created. The UMP rawmidi is bound with ALSA sequencer clients, too.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2hhubh)}(hhh](h)}(h$Function-specific configfs interfaceh]h$Function-specific configfs interface}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhMubh)}(hThe function name to use when creating the function directory is "midi2". The midi2 function provides these attributes in its function directory as the card top-level information:h]hThe function name to use when creating the function directory is “midi2”. The midi2 function provides these attributes in its function directory as the card top-level information:}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2hhubj)}(hX*============= ================================================= process_ump Bool flag to process UMP Stream messages (0 or 1) static_block Bool flag for static blocks (0 or 1) iface_name Optional interface name string ============= ================================================= h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jChj3ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK1uh1jChj3ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(h process_umph]h process_ump}(hj(3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%3ubah}(h]h ]h"]h$]h&]uh1jchj"3ubjd)}(hhh]h)}(h1Bool flag to process UMP Stream messages (0 or 1)h]h1Bool flag to process UMP Stream messages (0 or 1)}(hj?3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<3ubah}(h]h ]h"]h$]h&]uh1jchj"3ubeh}(h]h ]h"]h$]h&]uh1j^hj3ubj_)}(hhh](jd)}(hhh]h)}(h static_blockh]h static_block}(hj_3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\3ubah}(h]h ]h"]h$]h&]uh1jchjY3ubjd)}(hhh]h)}(h$Bool flag for static blocks (0 or 1)h]h$Bool flag for static blocks (0 or 1)}(hjv3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjs3ubah}(h]h ]h"]h$]h&]uh1jchjY3ubeh}(h]h ]h"]h$]h&]uh1j^hj3ubj_)}(hhh](jd)}(hhh]h)}(h iface_nameh]h iface_name}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jchj3ubjd)}(hhh]h)}(hOptional interface name stringh]hOptional interface name string}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jchj3ubeh}(h]h ]h"]h$]h&]uh1j^hj3ubeh}(h]h ]h"]h$]h&]uh1jYhj3ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj3ubah}(h]h ]h"]h$]h&]uh1j9hj3ubah}(h]h ]h"]h$]h&]uh1jhhhMhj2hhubh)}(hThe directory contains a subdirectory "ep.0", and this provides the attributes for a UMP Endpoint (which is a pair of USB MIDI Endpoints):h]hThe directory contains a subdirectory “ep.0”, and this provides the attributes for a UMP Endpoint (which is a pair of USB MIDI Endpoints):}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2hhubj)}(hX+============= ================================================= protocol_caps MIDI protocol capabilities; 1: MIDI 1.0, 2: MIDI 2.0, or 3: both protocols protocol Default MIDI protocol (either 1 or 2) ep_name UMP Endpoint name string product_id Product ID string manufacturer Manufacture ID number (24 bit) family Device family ID number (16 bit) model Device model ID number (16 bit) sw_revision Software revision (32 bit) ============= ================================================= h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jChj3ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK1uh1jChj3ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(h protocol_capsh]h protocol_caps}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jchj4ubjd)}(hhh]h)}(hJMIDI protocol capabilities; 1: MIDI 1.0, 2: MIDI 2.0, or 3: both protocolsh]hJMIDI protocol capabilities; 1: MIDI 1.0, 2: MIDI 2.0, or 3: both protocols}(hj,4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)4ubah}(h]h ]h"]h$]h&]uh1jchj4ubeh}(h]h ]h"]h$]h&]uh1j^hj 4ubj_)}(hhh](jd)}(hhh]h)}(hprotocolh]hprotocol}(hjL4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjI4ubah}(h]h ]h"]h$]h&]uh1jchjF4ubjd)}(hhh]h)}(h%Default MIDI protocol (either 1 or 2)h]h%Default MIDI protocol (either 1 or 2)}(hjc4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`4ubah}(h]h ]h"]h$]h&]uh1jchjF4ubeh}(h]h ]h"]h$]h&]uh1j^hj 4ubj_)}(hhh](jd)}(hhh]h)}(hep_nameh]hep_name}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jchj}4ubjd)}(hhh]h)}(hUMP Endpoint name stringh]hUMP Endpoint name string}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jchj}4ubeh}(h]h ]h"]h$]h&]uh1j^hj 4ubj_)}(hhh](jd)}(hhh]h)}(h product_idh]h product_id}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jchj4ubjd)}(hhh]h)}(hProduct ID stringh]hProduct ID string}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jchj4ubeh}(h]h ]h"]h$]h&]uh1j^hj 4ubj_)}(hhh](jd)}(hhh]h)}(h manufacturerh]h manufacturer}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj4ubah}(h]h ]h"]h$]h&]uh1jchj4ubjd)}(hhh]h)}(hManufacture ID number (24 bit)h]hManufacture ID number (24 bit)}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj5ubah}(h]h ]h"]h$]h&]uh1jchj4ubeh}(h]h ]h"]h$]h&]uh1j^hj 4ubj_)}(hhh](jd)}(hhh]h)}(hfamilyh]hfamily}(hj(5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj%5ubah}(h]h ]h"]h$]h&]uh1jchj"5ubjd)}(hhh]h)}(h Device family ID number (16 bit)h]h Device family ID number (16 bit)}(hj?5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj<5ubah}(h]h ]h"]h$]h&]uh1jchj"5ubeh}(h]h ]h"]h$]h&]uh1j^hj 4ubj_)}(hhh](jd)}(hhh]h)}(hmodelh]hmodel}(hj_5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\5ubah}(h]h ]h"]h$]h&]uh1jchjY5ubjd)}(hhh]h)}(hDevice model ID number (16 bit)h]hDevice model ID number (16 bit)}(hjv5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjs5ubah}(h]h ]h"]h$]h&]uh1jchjY5ubeh}(h]h ]h"]h$]h&]uh1j^hj 4ubj_)}(hhh](jd)}(hhh]h)}(h sw_revisionh]h sw_revision}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj5ubah}(h]h ]h"]h$]h&]uh1jchj5ubjd)}(hhh]h)}(hSoftware revision (32 bit)h]hSoftware revision (32 bit)}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj5ubah}(h]h ]h"]h$]h&]uh1jchj5ubeh}(h]h ]h"]h$]h&]uh1j^hj 4ubeh}(h]h ]h"]h$]h&]uh1jYhj3ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj3ubah}(h]h ]h"]h$]h&]uh1j9hj3ubah}(h]h ]h"]h$]h&]uh1jhhhMhj2hhubh)}(hEach Endpoint subdirectory contains a subdirectory "block.0", which represents the Function Block for Block 0 information. Its attributes are:h]hEach Endpoint subdirectory contains a subdirectory “block.0”, which represents the Function Block for Block 0 information. Its attributes are:}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2hhubj)}(hX*================= =============================================== name Function Block name string direction Direction of this FB 1: input, 2: output, or 3: bidirectional first_group The first UMP Group number (0-15) num_groups The number of groups in this FB (1-16) midi1_first_group The first UMP Group number for MIDI 1.0 (0-15) midi1_num_groups The number of groups for MIDI 1.0 (0-16) ui_hint UI-hint of this FB 0: unknown, 1: receiver, 2: sender, 3: both midi_ci_version Supported MIDI-CI version number (8 bit) is_midi1 Legacy MIDI 1.0 device (0-2) 0: MIDI 2.0 device, 1: MIDI 1.0 without restriction, or 2: MIDI 1.0 with low speed sysex8_streams Max number of SysEx8 streams (8 bit) active Bool flag for FB activity (0 or 1) ================= =============================================== h]j:)}(hhh]j?)}(hhh](jD)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jChj5ubjD)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jChj5ubjZ)}(hhh](j_)}(hhh](jd)}(hhh]h)}(hnameh]hname}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jchj6ubjd)}(hhh]h)}(hFunction Block name stringh]hFunction Block name string}(hj,6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)6ubah}(h]h ]h"]h$]h&]uh1jchj6ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(h directionh]h direction}(hjL6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjI6ubah}(h]h ]h"]h$]h&]uh1jchjF6ubjd)}(hhh]h)}(h=Direction of this FB 1: input, 2: output, or 3: bidirectionalh]h=Direction of this FB 1: input, 2: output, or 3: bidirectional}(hjc6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`6ubah}(h]h ]h"]h$]h&]uh1jchjF6ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(h first_grouph]h first_group}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jchj}6ubjd)}(hhh]h)}(h!The first UMP Group number (0-15)h]h!The first UMP Group number (0-15)}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jchj}6ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(h num_groupsh]h num_groups}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jchj6ubjd)}(hhh]h)}(h&The number of groups in this FB (1-16)h]h&The number of groups in this FB (1-16)}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jchj6ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(hmidi1_first_grouph]hmidi1_first_group}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jchj6ubjd)}(hhh]h)}(h.The first UMP Group number for MIDI 1.0 (0-15)h]h.The first UMP Group number for MIDI 1.0 (0-15)}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jchj6ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(hmidi1_num_groupsh]hmidi1_num_groups}(hj(7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%7ubah}(h]h ]h"]h$]h&]uh1jchj"7ubjd)}(hhh]h)}(h(The number of groups for MIDI 1.0 (0-16)h]h(The number of groups for MIDI 1.0 (0-16)}(hj?7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<7ubah}(h]h ]h"]h$]h&]uh1jchj"7ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(hui_hinth]hui_hint}(hj_7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\7ubah}(h]h ]h"]h$]h&]uh1jchjY7ubjd)}(hhh]h)}(h>UI-hint of this FB 0: unknown, 1: receiver, 2: sender, 3: bothh]h>UI-hint of this FB 0: unknown, 1: receiver, 2: sender, 3: both}(hjv7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjs7ubah}(h]h ]h"]h$]h&]uh1jchjY7ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(hmidi_ci_versionh]hmidi_ci_version}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jchj7ubjd)}(hhh]h)}(h(Supported MIDI-CI version number (8 bit)h]h(Supported MIDI-CI version number (8 bit)}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jchj7ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(his_midi1h]his_midi1}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jchj7ubjd)}(hhh]h)}(hoLegacy MIDI 1.0 device (0-2) 0: MIDI 2.0 device, 1: MIDI 1.0 without restriction, or 2: MIDI 1.0 with low speedh]hoLegacy MIDI 1.0 device (0-2) 0: MIDI 2.0 device, 1: MIDI 1.0 without restriction, or 2: MIDI 1.0 with low speed}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj7ubah}(h]h ]h"]h$]h&]uh1jchj7ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(hsysex8_streamsh]hsysex8_streams}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj8ubah}(h]h ]h"]h$]h&]uh1jchj7ubjd)}(hhh]h)}(h$Max number of SysEx8 streams (8 bit)h]h$Max number of SysEx8 streams (8 bit)}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj8ubah}(h]h ]h"]h$]h&]uh1jchj7ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubj_)}(hhh](jd)}(hhh]h)}(hactiveh]hactive}(hj;8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj88ubah}(h]h ]h"]h$]h&]uh1jchj58ubjd)}(hhh]h)}(h"Bool flag for FB activity (0 or 1)h]h"Bool flag for FB activity (0 or 1)}(hjR8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjO8ubah}(h]h ]h"]h$]h&]uh1jchj58ubeh}(h]h ]h"]h$]h&]uh1j^hj 6ubeh}(h]h ]h"]h$]h&]uh1jYhj5ubeh}(h]h ]h"]h$]h&]colsKuh1j>hj5ubah}(h]h ]h"]h$]h&]uh1j9hj5ubah}(h]h ]h"]h$]h&]uh1jhhhMhj2hhubh)}(hXIf multiple Function Blocks are required, you can add more Function Blocks by creating subdirectories "block." with the corresponding Function Block number (1, 2, ....). The FB subdirectories can be dynamically removed, too. Note that the Function Block numbers must be continuous.h]hX"If multiple Function Blocks are required, you can add more Function Blocks by creating subdirectories “block.” with the corresponding Function Block number (1, 2, ....). The FB subdirectories can be dynamically removed, too. Note that the Function Block numbers must be continuous.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hj2hhubh)}(hSimilarly, if you multiple UMP Endpoints are required, you can add more Endpoints by creating subdirectories "ep.". The number must be continuous.h]hSimilarly, if you multiple UMP Endpoints are required, you can add more Endpoints by creating subdirectories “ep.”. The number must be continuous.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj2hhubh)}(hFor emulating the old MIDI 2.0 device without UMP v1.1 support, pass 0 to `process_ump` flag. Then the whole UMP v1.1 requests are ignored.h](hJFor emulating the old MIDI 2.0 device without UMP v1.1 support, pass 0 to }(hj8hhhNhNubhtitle_reference)}(h `process_ump`h]h process_ump}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj8ubh4 flag. Then the whole UMP v1.1 requests are ignored.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM0hj2hhubeh}(h]id21ah ]h"]h$]$function-specific configfs interfaceah&]uh1hhj2hhhhhMjUKubh)}(hhh](h)}(hTesting the MIDI2 functionh]hTesting the MIDI2 function}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhM4ubh)}(h,On the device: run the gadget, and running::h]h+On the device: run the gadget, and running:}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj8hhubjv)}(h$ cat /proc/asound/cardsh]h$ cat /proc/asound/cards}hj8sbah}(h]h ]h"]h$]h&]hhuh1juhhhM8hj8hhubh)}(h5will show a new sound card containing a MIDI2 device.h]h5will show a new sound card containing a MIDI2 device.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj8hhubh)}(hOTOH, on the host::h]hOTOH, on the host:}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hj8hhubjv)}(h$ cat /proc/asound/cardsh]h$ cat /proc/asound/cards}hj9sbah}(h]h ]h"]h$]h&]hhuh1juhhhM>hj8hhubh)}(htwill show a new sound card containing either MIDI1 or MIDI2 device, depending on the USB audio driver configuration.h]htwill show a new sound card containing either MIDI1 or MIDI2 device, depending on the USB audio driver configuration.}(hj"9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj8hhubh)}(hpOn both, when ALSA sequencer is enabled on the host, you can find the UMP MIDI client such as "MIDI 2.0 Gadget".h]htOn both, when ALSA sequencer is enabled on the host, you can find the UMP MIDI client such as “MIDI 2.0 Gadget”.}(hj09hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj8hhubh)}(h^As the driver simply loops back the data, there is no need for a real device just for testing.h]h^As the driver simply loops back the data, there is no need for a real device just for testing.}(hj>9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj8hhubh)}(hFor testing a MIDI input from the gadget to the host (e.g. emulating a MIDI keyboard), you can send a MIDI stream like the following.h]hFor testing a MIDI input from the gadget to the host (e.g. emulating a MIDI keyboard), you can send a MIDI stream like the following.}(hjL9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj8hhubh)}(hOn the gadget::h]hOn the gadget:}(hjZ9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj8hhubjv)}(h$ aconnect -o .... client 20: 'MIDI 2.0 Gadget' [type=kernel,card=1] 0 'MIDI 2.0 ' 1 'Group 1 (MIDI 2.0 Gadget I/O)' $ aplaymidi -p 20:1 to_host.midh]h$ aconnect -o .... client 20: 'MIDI 2.0 Gadget' [type=kernel,card=1] 0 'MIDI 2.0 ' 1 'Group 1 (MIDI 2.0 Gadget I/O)' $ aplaymidi -p 20:1 to_host.mid}hjh9sbah}(h]h ]h"]h$]h&]hhuh1juhhhMNhj8hhubh)}(h On the host::h]h On the host:}(hjv9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj8hhubjv)}(h$ aconnect -i .... client 24: 'MIDI 2.0 Gadget' [type=kernel,card=2] 0 'MIDI 2.0 ' 1 'Group 1 (MIDI 2.0 Gadget I/O)' $ arecordmidi -p 24:1 from_gadget.midh]h$ aconnect -i .... client 24: 'MIDI 2.0 Gadget' [type=kernel,card=2] 0 'MIDI 2.0 ' 1 'Group 1 (MIDI 2.0 Gadget I/O)' $ arecordmidi -p 24:1 from_gadget.mid}hj9sbah}(h]h ]h"]h$]h&]hhuh1juhhhMWhj8hhubh)}(hIf you have a UMP-capable application, you can use the UMP port to send/receive the raw UMP packets, too. For example, aseqdump program with UMP support can receive from UMP port. On the host::h]hIf you have a UMP-capable application, you can use the UMP port to send/receive the raw UMP packets, too. For example, aseqdump program with UMP support can receive from UMP port. On the host:}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hj8hhubjv)}(h$ aseqdump -u 2 -p 24:1 Waiting for data. Press Ctrl+C to end. Source Group Event Ch Data 24:1 Group 0, Program change 0, program 0, Bank select 0:0 24:1 Group 0, Channel pressure 0, value 0x80000000h]h$ aseqdump -u 2 -p 24:1 Waiting for data. Press Ctrl+C to end. Source Group Event Ch Data 24:1 Group 0, Program change 0, program 0, Bank select 0:0 24:1 Group 0, Channel pressure 0, value 0x80000000}hj9sbah}(h]h ]h"]h$]h&]hhuh1juhhhMbhj8hhubh)}(hqFor testing a MIDI output to the gadget to the host (e.g. emulating a MIDI synth), it'll be just other way round.h]hsFor testing a MIDI output to the gadget to the host (e.g. emulating a MIDI synth), it’ll be just other way round.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhj8hhubh)}(hOn the gadget::h]hOn the gadget:}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj8hhubjv)}(h#$ arecordmidi -p 20:1 from_host.midh]h#$ arecordmidi -p 20:1 from_host.mid}hj9sbah}(h]h ]h"]h$]h&]hhuh1juhhhMmhj8hhubh)}(h On the host::h]h On the host:}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohj8hhubjv)}(h!$ aplaymidi -p 24:1 to_gadget.midh]h!$ aplaymidi -p 24:1 to_gadget.mid}hj9sbah}(h]h ]h"]h$]h&]hhuh1juhhhMqhj8hhubh)}(hThe access to MIDI 1.0 on altset 0 on the host is supported, and it's translated from/to UMP packets on the gadget. It's bound to only Function Block 0.h]hThe access to MIDI 1.0 on altset 0 on the host is supported, and it’s translated from/to UMP packets on the gadget. It’s bound to only Function Block 0.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj8hhubh)}(h}The current operation mode can be observed in ALSA control element "Operation Mode" for SND_CTL_IFACE_RAWMIDI. For example::h]hThe current operation mode can be observed in ALSA control element “Operation Mode” for SND_CTL_IFACE_RAWMIDI. For example:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhj8hhubjv)}(h$ amixer -c1 contents numid=1,iface=RAWMIDI,name='Operation Mode' ; type=INTEGER,access=r--v----,values=1,min=0,max=2,step=0 : values=2h]h$ amixer -c1 contents numid=1,iface=RAWMIDI,name='Operation Mode' ; type=INTEGER,access=r--v----,values=1,min=0,max=2,step=0 : values=2}hj:sbah}(h]h ]h"]h$]h&]hhuh1juhhhMzhj8hhubh)}(h}where 0 = unused, 1 = MIDI 1.0 (altset 0), 2 = MIDI 2.0 (altset 1). The example above shows it's running in 2, i.e. MIDI 2.0.h]hwhere 0 = unused, 1 = MIDI 1.0 (altset 0), 2 = MIDI 2.0 (altset 1). The example above shows it’s running in 2, i.e. MIDI 2.0.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj8hhubeh}(h]testing-the-midi2-functionah ]h"]testing the midi2 functionah$]h&]uh1hhj2hhhhhM4ubeh}(h]midi2-functionah ]h"]21. midi2 functionah$]h&]uh1hhhhhhhhMubeh}(h]gadget-testingah ]h"]gadget testingah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjcfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjf:error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jA:j>:jj$function-specific configfs interfaceNjjjjjjjjjjjrjojjjgj7j4j/j,j j j j j j j j jjjjjjjjjjjjjjjjjjjjjjj{jxjjjjj-j*j%j"jPjMtesting the uac1 functionNj&j&j&j&j9*j6*j1*j.*j6,j3,j.,j+,j2j2j9:j6:j1:j.:u nametypes}(jA:jj:jjjjjjrjjj7j/j j j j jjjjjjjjjjjj{jjj-j%jPj:j&j&j9*j1*j6,j.,j2j9:j1:uh}(j>:hjhjOhjjVjjjgjjjljjj7jjj=jojjjjgjj4jujjj,jj j:j jYj j j j jx j j j~ jj jmj jjsjjjfjjjljjjRjjjXjjj3jjj9jjjzjjjjjjjjxjjjjjjjj*jjjj"jjMj0jjOjEjj&jSj`&jrj&jf&j6*j&jc)j&j.*ji)j3,j<*j$+j[*j+,j*+j2j9,jW2jX,j2j]2j6:j2j8j2j.:j8u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jt:KsRparse_messages](hsystem_message)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:ubah}(h]h ]h"]h$]h&]jgalevelKtypeINFOsourcehlineKNuh1j:hjhhhhhKNubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:ubah}(h]h ]h"]h$]h&]j7alevelKtypej:sourcehlineKvuh1j:hjhhhhhKvubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]jalevelKtypej:sourcehlineKuh1j:hjhhhhhKubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj!;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]jalevelKtypej:sourcehlineKuh1j:hjhhhhhKubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj<;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9;ubah}(h]h ]h"]h$]h&]j alevelKtypej:sourcehlineKuh1j:hjYhhhhhKubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hjW;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjT;ubah}(h]h ]h"]h$]h&]jx alevelKtypej:sourcehlineMuh1j:hj hhhhhMubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hjr;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo;ubah}(h]h ]h"]h$]h&]jmalevelKtypej:sourcehlineM/uh1j:hj hhhhhM/ubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]jfalevelKtypej:sourcehlineMnuh1j:hjhhhhhMnubj:)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "2" (ordinal 2)h]h>Enumerated list start value not ordinal-1: “2” (ordinal 2)}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]levelKtypej:sourcehlineKuh1j:hjlhhhhhMubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]jRalevelKtypej:sourcehlineMuh1j:hjhhhhhMubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]j3alevelKtypej:sourcehlineMuh1j:hjhhhhhMubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]jzalevelKtypej:sourcehlineMuh1j:hjhhhhhMubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]jalevelKtypej:sourcehlineMRuh1j:hjhhhhhMRubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj/<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,<ubah}(h]h ]h"]h$]h&]jalevelKtypej:sourcehlineMzuh1j:hjhhhhhMzubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hjJ<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjG<ubah}(h]h ]h"]h$]h&]jalevelKtypej:sourcehlineMuh1j:hjhhhhhMubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hje<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb<ubah}(h]h ]h"]h$]h&]jalevelKtypej:sourcehlineMuh1j:hjOhhhhhMubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}<ubah}(h]h ]h"]h$]h&]j`&alevelKtypej:sourcehlineMuh1j:hjrhhhhhMubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]jc)alevelKtypej:sourcehlineM)uh1j:hj&hhhhhM)ubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]j$+alevelKtypej:sourcehlineMyuh1j:hj[*hhhhhMyubj:)}(hhh]h)}(hGDuplicate implicit target name: "function-specific configfs interface".h]hKDuplicate implicit target name: “function-specific configfs interface”.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]jW2alevelKtypej:sourcehlineMuh1j:hjX,hhhhhMubj:)}(hhh]h)}(h