- 19 6月, 2017 7 次提交
-
-
由 Ruslan Bilovol 提交于
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: NRuslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Ruslan Bilovol 提交于
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: NRuslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Ruslan Bilovol 提交于
Abstract the peripheral side ALSA sound card code from the f_uac2 function into a component that can be called by various functions, so the various flavors can be split apart and selectively reused. Visible changes: - add uac_params structure to pass audio paramteres for g_audio_setup - make ALSA sound card's name configurable - add [in/out]_ep_maxpsize - allocate snd_uac_chip structure during g_audio_setup - add u_audio_[start/stop]_[capture/playback] functions Signed-off-by: NRuslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Ruslan Bilovol 提交于
Simplify f_uac2 by removing platform driver/device creation; use composite's usb_gadget device as parent for sound card and for debug prints. This removes extra layer of code without any functional change. Signed-off-by: NRuslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Ruslan Bilovol 提交于
After commit 7e4da3fc ("usb: gadget: composite: Test get_alt() presence instead of set_alt()") f_uac1 function became broken because it doesn't have get_alt() callback implementation and composite framework never set altsetting 1 for audiostreaming interface. On host site it looks like: [424339.017711] 21:1:1: usb_set_interface failed (-32) Since host can't set altsetting 1, it can't start playing audio. In order to fix it implemented get_alt along with minor improvements (error conditions checking) similar to what existing f_uac2 has. Cc: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: NRuslan Bilovol <ruslan.bilovol@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Alexandre Belloni 提交于
commit 46ddd79e ("usb: gadget: udc: atmel: Remove AVR32 bits from the driver") left the accessor macros introduced by commit a3dd3bef ("usb: gadget: atmel_usba: use endian agnostic IO on ARM"). They can now be removed. Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Srinath Mannam 提交于
Corrected the register to check the 64-bit pointer capability state. 64-bit pointer implementation capability was checking in wrong register, which causes the BDC enumeration failure in 64-bit memory address. Fixes: efed421a ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NSrinath Mannam <srinath.mannam@broadcom.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 15 6月, 2017 2 次提交
-
-
由 Arvind Yadav 提交于
clk_prepare_enable() can fail here and we must check its return value. Reviewed-by: NKrzysztof Kozlowski <krzk@kernel.org> Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Arvind Yadav 提交于
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 13 6月, 2017 21 次提交
-
-
由 Andy Shevchenko 提交于
The commit 47d3946e usb: dwc3: refactor gadget endpoint count calculation refactored dwc3_gadget_init_endpoints() and in particular changed in or out endpoint numbering to be through. It's not always convenient and makes code a slightly harder to read. Introduce a new temporary variable to make it easier to understand what is going on inside the function. While doing that, rename local variables as follows: u8 num -> u8 total int num -> int kbytes Replace implicit direction check via epnum with explicit use of direction variable. While here, replace %d to %u when compounding endpoint name since we are using unsigned type. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Li Jun 提交于
If there is no UDC available, the msg register will fail and this flag will not be set, but the driver is already added into pending driver list, then the module removal modprobe -r can not remove the driver from the pending list. Signed-off-by: NLi Jun <jun.li@nxp.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Yoshihiro Shimoda 提交于
The USB3.0 peripheral controller on R-Car SoCs has a dedicated DMAC. The DMAC needs a "PRD table" in system memory and the DMAC can have four PRD tables. This patch adds support for the DMAC. Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Andy Shevchenko 提交于
AVR32 is gone. Now it's time to clean up the driver by removing leftovers that was used by AVR32 related code. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Arvind Yadav 提交于
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
If PHY is entering Host mode, we need to enable VBUS. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
If don't reorder initialization like this, we will never be able to get a reference to ULPI PHYs. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
If PHY is suspended by the time we want to issue ULPI transfers, we will observe timeouts on the ULPI interface. In order to avoid such issue, let's make sure PHY is resumed before issuing a ULPI transfer. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
We don't (yet) support PTM_STATUS messages so let's not reply to them erroneously. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
maximum_speed entry was duplicated. Remove one instance. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
This file will print out the name of the currently running USB Gadget Driver. It can be read even when there are no functions loaded. Suggested-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Move the code which was part of pullup() to the newly introduced method. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Use this method to make sure we don't try to connect on speeds not supported by the gadget driver. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Sometimes, the gadget driver we want to run has max_speed lower than what the UDC supports. In such situations, UDC might want to make sure we don't try to connect on speeds not supported by the gadget driver (e.g. super-speed capable dwc3 with high-speed capable g_midi) because that will just fail. In order to make sure this situation never happens, we introduce a new optional ->udc_set_speed() method which can be implemented by interested UDC drivers. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Raviteja Garimella 提交于
This patch adds platform driver support for Synopsys UDC. A new driver file (snps_udc_plat.c) is created for this purpose where the platform driver registration is done based on OF node. Currently, UDC integrated into Broadcom's iProc SoCs (Northstar2 and Cygnus) work with this driver. New members are added to the UDC data structure for having platform device support along with extcon and phy support. Kconfig and Makefiles are modified to select platform driver for compilation. Signed-off-by: NRaviteja Garimella <raviteja.garimella@broadcom.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Raviteja Garimella 提交于
The device node is used for UDCs integrated into Broadcom's iProc family of SoCs'. The UDC is based on Synopsys Designware Cores AHB Subsystem USB Device Controller IP. Signed-off-by: NRaviteja Garimella <raviteja.garimella@broadcom.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Raviteja Garimella 提交于
Change the argument from NULL to a struct device for the dma_pool_create call during dma init. Signed-off-by: NRaviteja Garimella <raviteja.garimella@broadcom.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Raviteja Garimella 提交于
This patch adds a struct device member to UDC data structure and makes changes to the arguments of dev_err and dev_dbg calls so that the debug prints work for both pci and platform devices. Signed-off-by: NRaviteja Garimella <raviteja.garimella@broadcom.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Raviteja Garimella 提交于
This patch renames the amd5536udc.c that has the core driver functionality of Synopsys UDC to snps_udc_core.c The symbols exported here can be used by any UDC driver that uses the same Synopsys IP. Signed-off-by: NRaviteja Garimella <raviteja.garimella@broadcom.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Stefan Agner 提交于
Other unsigned properties return hexadecimal values, follow this convention when printing b_vendor_code too. Also add newlines to the OS Descriptor support related properties, like other sysfs files use. Reviewed-by: NKrzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Stefan Agner 提交于
Currently qw_sign requires UTF-8 character to set, but returns UTF-16 when read. This isn't obvious when simply using cat since the null characters are not visible, but hexdump unveils the true string: # echo MSFT100 > os_desc/qw_sign # hexdump -C os_desc/qw_sign 00000000 4d 00 53 00 46 00 54 00 31 00 30 00 30 00 |M.S.F.T.1.0.0.| Make qw_sign symmetric by returning an UTF-8 string too. Also follow common convention and add a new line at the end. Reviewed-by: NKrzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 02 6月, 2017 10 次提交
-
-
由 John Youn 提交于
This commit allows a gadget that does not support SuperSpeed to indicate that it supports LPM. It does this by setting the 'lpm_capable' flag in the gadget structure. If a gadget sets this, the composite gadget framework will set the bcdUSB to 0x0201 to indicate that this supports BOS descriptors, and also return a USB 2.0 Extension descriptor as part of the BOS descriptor set. See USB 2.0 LPM ECN Section 3. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NSevak Arakelyan <sevaka@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 John Youn 提交于
Don't send the SuperSpeed USB Device Capability descriptor if the gadget is not capable of SuperSpeed. Signed-off-by: NJohn Youn <johnyoun@synopsys.com> Signed-off-by: NSevak Arakelyan <sevaka@synopsys.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Jerry Zhang 提交于
There were individual waitqueues for each epfile but eps_enable would iterate through all of them, resulting in essentially the same wakeup time. The waitqueue represents the function being enabled, so a central waitqueue in ffs_data makes more sense and is less redundant. Also use wake_up_interruptible to reflect use of wait_event_interruptible. Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NJerry Zhang <zhangjerry@google.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Jerry Zhang 提交于
This allows users to make an ioctl call as the first action on a connection. Ex, some functions might want to get endpoint size before making any i/os. Previously, calling ioctls before read/write would depending on the timing of endpoints being enabled. ESHUTDOWN is now a possible return value and ENODEV is not, so change docs accordingly. Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NJerry Zhang <zhangjerry@google.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Stefan Agner 提交于
The assignment ret = ret is redundant and can be removed. Reviewed-by: NKrzysztof Opasiak <k.opasiak@samsung.com> Reviewed-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NStefan Agner <stefan@agner.ch> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
This is where all other USB ReST documentation has moved to. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Document a few details about DWC3 in order to help people report bugs and debug DWC3. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Instead of *always* dumping raw ctrl bytes, let's decode standard requests which will make the lives of those debugging DWC3 quite a bit easier. Output will now look like so: irq/34-dwc3-1594 [000] d..1 107.573081: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 107.573694: dwc3_ctrl_req: Set Address(Addr = 01) irq/34-dwc3-1594 [000] d..1 107.588319: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 107.588816: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 107.589191: dwc3_ctrl_req: Set Configuration(Config = 3) irq/34-dwc3-1594 [000] d..1 107.589846: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 5) irq/34-dwc3-1594 [000] d..1 107.590146: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 22) irq/34-dwc3-1594 [000] d..1 107.590546: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 107.590840: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 69) irq/34-dwc3-1594 [000] d..1 107.591138: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 9) irq/34-dwc3-1594 [000] d..1 107.591541: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 32) irq/34-dwc3-1594 [000] d..1 107.591834: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.701005: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.721080: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.722709: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.728979: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 114.730544: dwc3_ctrl_req: Get Device Qualifier Descriptor(Index = 0, Length = 10) irq/34-dwc3-1594 [000] d..1 115.776018: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9) irq/34-dwc3-1594 [000] d..1 115.776760: dwc3_ctrl_req: Set Configuration(Config = 0) irq/34-dwc3-1594 [000] d..1 115.777676: dwc3_ctrl_req: Get Configuration(Length = 1) irq/34-dwc3-1594 [000] d..1 115.924797: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18) irq/34-dwc3-1594 [000] d..1 115.929025: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.929566: dwc3_ctrl_req: Get String Descriptor(Index = 1, Length = 500) irq/34-dwc3-1594 [000] d..1 115.930911: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.931528: dwc3_ctrl_req: Get String Descriptor(Index = 2, Length = 500) irq/34-dwc3-1594 [000] d..1 115.932950: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500) irq/34-dwc3-1594 [000] d..1 115.933533: dwc3_ctrl_req: Get String Descriptor(Index = 3, Length = 500) Note that Class and Vendor requests won't be decoded for obvious reasons. Those will be printed as a raw sequence of bytes. This patch has been tested against a normal host (both Linux and Windows) and USB30CV Chapter 9 tests. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Instead, we can require caller to pass a buffer for the function to use. This cleans things quite a bit. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Felipe Balbi 提交于
Instead of going for a 512 byte buffer and using snprintf(), let's rely on helps __string() and __assign_str() where possible. Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-