Per the EU STD. ETSI EN 300 440, sub-band 5725-5875 is
allowed in EU at reduced power of 25 mW. Add the sub-band to
the EU countries that support this sub-band.
CRs-Fixed: 2141740
Change-Id: I0a43e99c4357527f607110faecddd9d0fd444fc6
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
Add a new event to configure if allow to trigger
port reconfig event for scan type change for
UBWC interlaced video playback
Change-Id: Ie20d6a006a82511b18ea0a6fe8de0cf43d6a0582
Signed-off-by: Yiming Cao <cyiming@codeaurora.org>
Enable USB HID function driver on MSM8996 Auto target to support
HID over USB.
Change-Id: Iea1b04b88a6a0af816ef9f45f67875ece8d68657
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Add support for the HID function with the configfs framework.
Change-Id: I4da589aa453f892bf26cf16ce1a80426100ac02d
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
The current f_hid driver doesn't handle GET_PROCOTOL and
SET_PROCOTOL requests, which are required to operate HID
gadgets in BOOT mode. This patch implements this feature for
devices that have the same implementation for REPORT and BOOT mode
so that these devices are recognized by older BIOSes.
Change-Id: I2279d9083bf9093f5a96c16df5d7ae48d11fd503
Signed-off-by: Abdulhadi Mohamed <abdulahhadi2@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: b3c4ec71ec413c2e5bfb028bdf1737af07f1fde0
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
hidg->req should be accessed only with write_spinlock held as it is
set to NULL when we get disabled by host.
Change-Id: Ic933da63cc2e7087b8e68398499d367fae328499
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 25cd9721c2b16ee0d775e36ec3af31f392003f80
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Two of the USB Gadgets were poking around in the internals of struct ida
in order to determine if it is empty. Add the appropriate abstraction.
Change-Id: I48338e05940ee795953a3323d4d08b5c5c1e2fcc
Link: http://lkml.kernel.org/r/1480369871-5271-63-git-send-email-mawilcox@linuxonhyperv.com
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Konstantin Khlebnikov <koct9i@gmail.com>
Tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 99c494077e2d4282a17120a772eecc00ec3004cc
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Add super speed descriptors to f_hid.
Change-Id: I81f9c89963218d27c37f2a25e71245f2ee81a388
Signed-off-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: dbf499cf720a0096acea7641492d9edeffc25d10
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[ajaya@codeaurora.org: drop changes for SSP descriptors]
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
commit 749494b6bdbbaf0899aa1c62a1ad74cd747bce47 upstream.
Since commit: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()")
we cannot allocate any requests in bind() as we check if we should
align request buffer based on endpoint descriptor which is assigned
in set_alt().
Allocating request in bind() function causes a NULL pointer
dereference.
This commit moves allocation of IN request from bind() to set_alt()
to prevent this issue.
Change-Id: I02a832bfd3008efb041450156da11e62f1ec8e5c
Fixes: ba1582f22231 ("usb: gadget: f_hid: use alloc_ep_req()")
Cc: stable@vger.kernel.org
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 8dd5c0c47332c67a04830e3842d4d6282f1824fd
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
For QCN7605 device ID, the collected dump
segments are not dumped to /dev/ramdump_QCN7605.
Device ID of QCN7605 needs to be added to the
ramdump path.
Change-Id: Ib3931f13f99f9c219f4a0e64b5bc92fb2f0b3902
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
To support transparent panel stacking, application will pass non-panel-
stacking buffer roi to kernel and let kernel to extend to panel-stacking
size. A special flag is defined on source config for this purpose.
Change-Id: I59eb290f0f7b92744972391d7db743e2da12300b
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
commit 33e4c1a9987a1fc3b42c3b534100b5b006d55c61 upstream.
As IN request has to be allocated in set_alt() and released in
disable() we cannot use mutex to protect it as we cannot sleep
in those funcitons. Let's replace this mutex with a spinlock.
Change-Id: I44c16823165b25c6d8d7e1697de75e373226272a
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 6d0511ed15db30965f8a3be8f0733bb6efd2b95e
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Add support to shared display for panel stacking and split screen
application.
The current DRM framework only allows one atomic commit for
each display, this change will create virtual display pipelines
based on the physical display pipeline, and each virtual display
can support independent async atomic commit.
With the change user mode application can setup and update
display on each virtual display and share the same physical port.
No mode switch is allowed on virtual display. When all virtual
displays are powered off, the physical display will also power off.
Change-Id: Ibf9a7dd1a96c59b6db9891d826cb4f11b409696c
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
Unfortunately removal of the ext_feature flag in the last revision of
the patch ended up negating the comparison and prevented the command
from being processed (either nl80211_external_auth() or
rdev_external_auth() returns -EOPNOTSUPP). Fix this by adding back the
lost '!'.
Fixes: 40cbfa90218b ("cfg80211/nl80211: Optional authentication offload to userspace")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: db8d93a7a355121d49777c059afbca23c53c8628
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
CRs-Fixed: 2210017
Change-Id: I41f7c25d68a5060d7b5e24fb5bd164e063311ed0
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: Jiachao Wu <jiacwu@codeaurora.org>
Signed-off-by: Min Liu <minliu@codeaurora.org>
Define macro to indicate backport support for
external authentication where authentication can be
offloaded to userspace in specific cases such as SAE.
Change-Id: Ib253b303e82f583f61bc13d14c8d491d5ea2af15
CRs-Fixed: 2182553
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: Jiachao Wu <jiacwu@codeaurora.org>
Signed-off-by: Min Liu <minliu@codeaurora.org>
commit 20d2ca955bd09639c7b01db5761d157c297aea0a upstream.
Requests for out endpoint are allocated in bind() function
but never released.
This commit ensures that all pending requests are released
when we disable out endpoint.
Change-Id: Ifeab1eff6223e6380b7a1f6db6900ca33ade9de1
Fixes: 99c5150058 ("usb: gadget: hidg: register OUT INT endpoint for SET_REPORT")
Tested-by: David Lechner <david@lechnology.com>
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: b6092a57150c1641dffb6bfeebbe2cbde7275d1f
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Enable USB2.0 pass through in LA Guest along with its
dependencies.
Change-Id: I8fdf27e850f030d2f98b1c9651d5eae340613f70
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
Enable UAC1 function driver on 8996 Auto target to support
audio over USB with virtual ALSA card creation.
Change-Id: If4c95e5b7955245d749ace95d56f4b4d8dc292e8
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Add support for the UAC1 function with the configfs framework
along with following other changes:
- Add dynamic updation of AudioStreaming interface numbers in
the AudioControl interface descriptor.
- Add superspeed support.
- Stop playback on func disable so that pending request's
completion is called before request has been freed in unbind.
- Fix minor compilation issue.
Change-Id: Ib30fa735314c57b9543f89e18d1fb419ed5a2b9d
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
In case config_ep_by_speed() returns error, endpoint descriptors
would not get populated. This results into NULL pointer dereference
when ep desc is accessed later. Fix this by bailing out set_alt if
config_ep_by_speed() API returns error.
Change-Id: I581d5e9fa7f3610e96e2e3705ab7e095a93a2a59
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Substream period size potentially can be changed in runtime, however
this is not accounted in the data copying routine, the change replaces
the cached value with an actual value from substream runtime.
As a side effect the change also removes a potential division by zero
in u_audio_iso_complete() function, if there is a race with
uac_pcm_hw_free(), which sets prm->period_size to 0.
Change-Id: Id9e5dc114d61976582a96b1ba1758078057dcb89
Fixes: 132fcb4608 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 773e53d50e227b0c03d0bb434c1636f6c49c75b2
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
There is no necessity to copy PCM stream ring buffer area and size
properties to UAC private data structure, these values can be got
from substream itself.
The change gives more control on substream and avoid stale caching.
Change-Id: I91a2276b8eeb8f4961c06254240986301af30099
Fixes: 132fcb4608 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 96afb54ece0ee903d23a7ac04ddc461413b972c4
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
In u_audio_iso_complete, the runtime hw_ptr is updated before the
data is actually copied over to/from the buffer/dma area. When
ALSA uses this hw_ptr, the data may not actually be available to
be used. This causes trash/stale audio to play/record. This
patch updates the hw_ptr after the data has been copied to avoid
this.
Change-Id: Ia2dffdbb6fd1c9412e0b7c5cd483bfb0fe032943
Fixes: 132fcb4608 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Joshua Frkuska <joshua_frkuska@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 6b37bd78d30c890e575a1bda22978d1d2a233362
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Make this const as it is only used during a copy operation.
Done using Coccinelle.
Change-Id: I91203bd925841c0795289590aca5252eaeb289ea
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 2ab3c34c9c75331143d67042e826bdcde4d6ab37
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.
Change-Id: I8cc1c08b952cdc8974368301d784a60294bd7561
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 640c0be81b9c33485559e716d914252228361b1c
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
As per USB spec, multiple-bytes fields are stored
in little-endian order. Use CPU<->LE helpers for
such fields.
Change-Id: I140bc507340d011cbeec53afeee8458280f72992
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 42370b821168e6730ec4c7d988aeadc1260c7b4d
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
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)
Change-Id: Ie47604cd098e9abc51c38a25132249933e190e4c
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 0591bc2360152f851e29246884805bb77a2c3b9d
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[ajaya@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
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
Change-Id: I0e67a74a84416e6325725fc4b7d907d3c89a70e1
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: d355339eecd986648420e05f8c958fbc78dbb382
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[ajaya@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
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
Change-Id: I412ed3afca008300800ee61a774e1f23900e8ed6
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: eb9fecb9e69b0be8c267c55b0bb52a08e8fb6bee
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>