Commit Graph

29 Commits

Author SHA1 Message Date
Bin Liu 1a2e91e795 Documentation: usb: fix typo in UVC gadgetfs config command
This seems to be a copy&paste error. With the fix the uvc gadget now can
be created by following the instrucitons.

Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-11 18:39:52 +01:00
Tom Saeger 4269a69110 Documentation: fix usb related doc refs
Update ref to usb proc_usb_info.txt.

Signed-off-by: Tom Saeger <tom.saeger@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-10-12 11:15:48 -06:00
Ruslan Bilovol 0591bc2360 usb: gadget: add f_uac1 variant based on a new u_audio api
This patch adds a new function 'f_uac1'
(f_uac1 with virtual "ALSA card") that
uses recently created u_audio API. Comparing
to legacy f_uac1 function implementation it
doesn't require any real Audio codec to be
present on the device. In f_uac1 audio
streams are simply sinked to and sourced
from a virtual ALSA sound card created
using u_audio API.

Legacy f_uac1 approach is to write audio
samples directly to existing ALSA sound
card

f_uac1 approach is more generic/flexible
one - create an ALSA sound card that
represents USB Audio function and allows to
be used by userspace application that
may choose to do whatever it wants with the
data received from the USB Host and choose
to provide whatever it wants as audio data
to the USB Host.

f_uac1 also has capture support (gadget->host)
thanks to easy implementation via u_audio.
By default, capture interface has 48000kHz/2ch
configuration, same as playback channel has.

f_uac1 descriptors naming convention
uses f_uac2 driver naming convention that
makes it more common and meaningful.

Comparing to f_uac1_legacy, the f_uac1 doesn't
have volume/mute functionality. This is because
the f_uac1 volume/mute feature unit was dummy
implementation since that driver creation (2009)
and never had any real volume control or mute
functionality, so there is no any difference
here.

Since f_uac1 functionality, exposed
interface to userspace (virtual ALSA card),
input parameters are so different comparing
to f_uac1_legacy, that there is no any
reason to keep them in the same file/module,
and separate function was created.

g_audio can be built using one of existing
UAC functions (f_uac1, f_uac1_legacy or f_uac2)

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-06-19 09:22:47 +03:00
Ruslan Bilovol d355339eec usb: gadget: function: make current f_uac1 implementation legacy
Before introducing new f_uac1 function (with virtual
ALSA card) make current implementation legacy.

This includes renaming of existing files, some
variables, config options and documentation

Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-06-19 09:22:47 +03:00
Peter Chen e92b9d449d usb: gadget: uac2: add req_number as parameter
There are only two requests for uac2, it may not be enough at high
loading system which usb interrupt handler can't be serviced on
time, then the data will be lost since it is isoc transfer for audio.

In this patch, we introduce a parameter for the number for usb request,
and the user can override it if current number for request is not enough
for his/her use case.

Besides, update this parameter for legacy audio gadget and documentation.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-01-24 11:04:21 +02:00
Robert Baldyga f310abb33b Documentation: usb: update usb-tools repository address
It seems that gitorious repository is no longer accessible, so we
replace it with address to active repository.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-12-16 10:07:30 -06:00
Peter Chen df001894e3 Documentation: usb: gadget-testing: add description for depth of queue
Add both bulk and iso depth of queue for sourcesink.

Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-12-15 09:12:41 -06:00
Peter Chen f811a38300 doc: usb: gadget-testing: using the updated testusb.c
testusb.c at http://www.linux-usb.org/usbtest/ is out of date,
using the one at the kernel source folder.

Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-07-31 09:02:07 -05:00
Andrzej Pietrasiewicz d6d22922d9 usb: gadget: rndis: remove the limit of available rndis connections
RNDIS function has a limitation on the number of allowed instances.
So far it has been RNDIS_MAX_CONFIGS, which happens to be one.
In order to eliminate this kind of arbitrary limitation we should not
preallocate a predefined (RNDIS_MAX_CONFIGS) array of struct rndis_params
instances but instead allow allocating them on demand.

This patch allocates struct rndis_params on demand in rndis_register().
Coversly, the structure is free()'d in rndis_deregister().
If CONFIG_USB_GADGET_DEBUG_FILES is set, the proc files are created which
is the same behaviour as before, but the moment of creation is delayed
until struct rndis_params is actually allocated.

rnids_init() and rndis_exit() have nothing to do, so they are eliminated.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07 13:47:17 -05:00
Peter Chen 4e39acab03 usb: Documentation: gadget-testing: fix parameter for capture channel mask
Fix the UAC2 parameter capture channel mask

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-27 15:55:39 -05:00
Andrzej Pietrasiewicz ee1cd515e8 usb: gadget: printer: add configfs support
Add support for configfs interface so that f_printer can be used as a
component of usb gadgets composed with it.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-03-10 15:33:41 -05:00
Andrzej Pietrasiewicz 9c4f538bfa Documentation: usb: UVC function testing
Summary of how to test UVC function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:26 -06:00
Andrzej Pietrasiewicz 020c6f9348 Documentation: usb: UAC2 function testing
Summary of how to test UAC2 function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz dae0358694 Documentation: usb: UAC1 function testing
Summary of how to test UAC1 function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz 480a912be4 Documentation: usb: SOURCESINK function testing
Summary of how to test SOURCESINK function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz 4dfcec8a2f Documentation: usb: SERIAL function testing
Summary of how to test SERIAL function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz ddb722449c Documentation: usb: RNDIS function testing
Summary of how to test RNDIS function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz da2907d2b0 Documentation: usb: PHONET function testing
Summary of how to test PHONET function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz d81b85dcf1 Documentation: usb: OBEX function testing
Summary of how to test OBEX function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz 4d0fa79e0e Documentation: usb: NCM function testing
Summary of how to test NCM function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz 0d6be59a1d Documentation: usb: MIDI function testing
Summary of how to test MIDI function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz cdbe287d27 Documentation: usb: MASS STORAGE function testing
Summary of how to test MASS STORAGE function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz ec91aff763 Documentation: usb: LOOPBACK function testing
Summary of how to test LOOPBACK function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz f7e3c3cd24 Documentation: usb: HID function testing
Summary of how to test HID function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz 2c0f62f9e4 Documentation: usb: FFS function testing
Summary of how to test FFS (FunctionFS) function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:25 -06:00
Andrzej Pietrasiewicz 4ca560a6d3 Documentation: usb: EEM function testing
Summary of how to test EEM function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:24 -06:00
Andrzej Pietrasiewicz 7bfbc6e3fb Documentation: usb: ECM subset function testing
Summary of how to test ECM subset function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:24 -06:00
Andrzej Pietrasiewicz d5862ca6da Documentation: usb: ECM function testing
Summary of how to test ECM function of USB gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:24 -06:00
Andrzej Pietrasiewicz e38eb2c8cb Documentation: usb: ACM function testing
The newly added file will be used to provide descriptions of how to test
the functions of USB gadgets.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-12 12:13:24 -06:00