OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
5 years agomsm-camera: add cx-ipeak support for vfe
Srikanth Uyyala [Mon, 24 Dec 2018 10:45:00 +0000 (16:15 +0530)]
msm-camera: add cx-ipeak support for vfe

Add support in vfe driver to vote for cx_ipeak when moving
to turbo clock and unvote when moving out of turbo.

Change-Id: I6b95594adbf05c0797c2748981a6b06f042adc20
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
5 years agoMerge "msm: wlan: Update ETSI1 and ETSI13 countries"
Linux Build Service Account [Sat, 19 Jan 2019 04:47:36 +0000 (20:47 -0800)]
Merge "msm: wlan: Update ETSI1 and ETSI13 countries"

5 years agoMerge "msm: wlan: Update regulatory database"
Linux Build Service Account [Fri, 18 Jan 2019 16:05:13 +0000 (08:05 -0800)]
Merge "msm: wlan: Update regulatory database"

5 years agomsm: wlan: Update ETSI1 and ETSI13 countries
Rajeev Kumar Sirasanagandla [Fri, 18 Jan 2019 08:13:25 +0000 (13:43 +0530)]
msm: wlan: Update ETSI1 and ETSI13 countries

In db.txt, update ETSI1 and ETSI13 countries with NO-OUTDOOR flag
for frequency ranges: (5170 - 5250) and (5250 - 5330).

CRs-Fixed: 2379868
Change-Id: I8a9ce955e82b14814ead5f0bf118608ea90cbc53
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
5 years agoMerge "msm-camera: add support for cx_ipeak"
Linux Build Service Account [Fri, 18 Jan 2019 07:33:47 +0000 (23:33 -0800)]
Merge "msm-camera: add support for cx_ipeak"

5 years agoMerge "soc: qcom: hab: adapt to the new get_user_pages()"
Linux Build Service Account [Fri, 18 Jan 2019 07:33:46 +0000 (23:33 -0800)]
Merge "soc: qcom: hab: adapt to the new get_user_pages()"

5 years agoMerge "msm: camera: isp: Fix invalid type conversion"
Linux Build Service Account [Thu, 17 Jan 2019 22:03:35 +0000 (14:03 -0800)]
Merge "msm: camera: isp: Fix invalid type conversion"

5 years agoMerge "defconfig: Enable and disable few configs for MSM8996"
Linux Build Service Account [Thu, 17 Jan 2019 22:03:34 +0000 (14:03 -0800)]
Merge "defconfig: Enable and disable few configs for MSM8996"

5 years agoMerge "ARM: dts: msm: msm8996-mtp bringup changes"
Linux Build Service Account [Thu, 17 Jan 2019 22:03:33 +0000 (14:03 -0800)]
Merge "ARM: dts: msm: msm8996-mtp bringup changes"

5 years agoMerge "arm: dts: msm: add msm8996-auto.dtsi"
Linux Build Service Account [Thu, 17 Jan 2019 22:03:31 +0000 (14:03 -0800)]
Merge "arm: dts: msm: add msm8996-auto.dtsi"

5 years agomsm-camera: add support for cx_ipeak
Srikanth Uyyala [Mon, 24 Dec 2018 10:34:27 +0000 (16:04 +0530)]
msm-camera: add support for cx_ipeak

camera drivers need to vote when moving to turbo clock
and unvote when moving out of turbo. cx_ipeak driver
then makes sure to limit the current drawn from cx
based on this vote. This dirver provides common utility
functions to track vote and unvote.

Change-Id: I34d860003518924ab3233d8de24ccdb11f513f7e
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
5 years agomsm: wlan: Update regulatory database
gaolez [Fri, 8 Jun 2018 11:44:47 +0000 (19:44 +0800)]
msm: wlan: Update regulatory database

Update country ETSI13 related country's frequency range and tx
power.

Change-Id: Iae27b12df3b36621c395ef9e8a3b1b46461848b6
CRs-Fixed: 2246140
Signed-off-by: Gaole Zhang <gaolez@codeaurora.org>
5 years agoARM: dts: msm: msm8996-mtp bringup changes
Swetha Chikkaboraiah [Tue, 18 Dec 2018 08:13:09 +0000 (13:43 +0530)]
ARM: dts: msm: msm8996-mtp bringup changes

Changes done to bringup msm8996 on 4.4 kernel.

Change-Id: Ie0629dddeed2ef861e3b15f47015a7a8fb482ba7
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
5 years agodefconfig: Enable and disable few configs for MSM8996
Swetha Chikkaboraiah [Tue, 18 Dec 2018 10:01:44 +0000 (15:31 +0530)]
defconfig: Enable and disable few configs for MSM8996

This change enables and disables below list of configs to
address the MSM8996-MTP bootup issue on 4.4 kernel.

Enable configs:
CONFIG_QUOTA
CONFIG_QUOTA_NETLINK_INTERFACE
CONFIG_QFMT_V2
Disable config
CONFIG_PRINT_QUOTA_WARNING

Change-Id: Iccd69be08842926e00c3d24321ec51683fabd406
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
5 years agoMerge "msm: drm: add hibernation support"
Linux Build Service Account [Thu, 17 Jan 2019 05:41:55 +0000 (21:41 -0800)]
Merge "msm: drm: add hibernation support"

5 years agoMerge "fbdev: msm: validate mdp clk rate and cwb for msm8996"
Linux Build Service Account [Thu, 17 Jan 2019 05:41:54 +0000 (21:41 -0800)]
Merge "fbdev: msm: validate mdp clk rate and cwb for msm8996"

5 years agoMerge "cnss2: USB:skip ce config for USB transport"
Linux Build Service Account [Thu, 17 Jan 2019 05:41:53 +0000 (21:41 -0800)]
Merge "cnss2: USB:skip ce config for USB transport"

5 years agomsm: wlan: Remove DSRC channels for US
Amar Singhal [Tue, 16 Jan 2018 01:16:03 +0000 (17:16 -0800)]
msm: wlan: Remove DSRC channels for US

DSRC channels are not required when SRD channels are enabled. Therefore
remove them.

Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
Change-Id: I1b2937c45d43d31c5689c7c4d134fcfb9a265b0e
CRs-Fixed: 2174850

5 years agomsm: wlan: Add support for UNI-III ETSI sub-band
Amar Singhal [Thu, 9 Nov 2017 20:41:45 +0000 (12:41 -0800)]
msm: wlan: Add support for UNI-III ETSI sub-band

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>
5 years agosoc: qcom: hab: adapt to the new get_user_pages()
Yong Ding [Wed, 16 Jan 2019 07:39:42 +0000 (15:39 +0800)]
soc: qcom: hab: adapt to the new get_user_pages()

The previous write and force parameters of get_user_pages() are
replaced with gup_flags, so HAB needs the relevant change since
it uses this API.

Change-Id: I8bb8eac3bd9ef0090a29fce28745b9904e087e0c
Signed-off-by: Yong Ding <yongding@codeaurora.org>
5 years agomsm: drm: add hibernation support
Rahul Sharma [Mon, 3 Dec 2018 11:22:46 +0000 (16:52 +0530)]
msm: drm: add hibernation support

Enable device PM callbacks to support hibernation feature.
Facilitates system restore from hibernation golden image when
early display services are running concurrently.

Change-Id: I380a7bf59d9af21468b56c121a7ac7293c32fca2
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
5 years agoarm: dts: msm: add msm8996-auto.dtsi
Firoz Khan [Wed, 9 Jan 2019 10:20:42 +0000 (15:50 +0530)]
arm: dts: msm: add msm8996-auto.dtsi

Add msm8996-auto.dtsi file to override auto specific
node information and include in the auto dts files.

Change-Id: Idf724a8f2e6b43ddc6c563245fb8dfa0755182ee
Signed-off-by: Firoz Khan <firozk@codeaurora.org>
5 years agocnss2: USB:skip ce config for USB transport
Rajasekaran Kalidoss [Tue, 18 Sep 2018 11:54:21 +0000 (17:24 +0530)]
cnss2: USB:skip ce config for USB transport

For USB transport, ce config request should not be
sent. In cnss_wlan_enable, skip ce config if bus type
is USB.

Change-Id: Icf7c2a7c01c4b93a0856442f8a78d733a9858183
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
5 years agomsm: vidc: Support interlaced clips playback
Yiming Cao [Wed, 12 Dec 2018 11:34:46 +0000 (19:34 +0800)]
msm: vidc: Support interlaced clips playback

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>
5 years agoMerge "defconfig: msm: Enable USB HID driver on MSM8996 Auto"
Linux Build Service Account [Sun, 13 Jan 2019 07:48:05 +0000 (23:48 -0800)]
Merge "defconfig: msm: Enable USB HID driver on MSM8996 Auto"

5 years agoMerge "nl80211: Fix external_auth check for offloaded authentication"
Linux Build Service Account [Fri, 11 Jan 2019 08:58:13 +0000 (00:58 -0800)]
Merge "nl80211: Fix external_auth check for offloaded authentication"

5 years agoMerge "cnss2: Add QCN7605 device ID for elf ramdump"
Linux Build Service Account [Fri, 11 Jan 2019 08:58:12 +0000 (00:58 -0800)]
Merge "cnss2: Add QCN7605 device ID for elf ramdump"

5 years agodefconfig: msm: Enable USB HID driver on MSM8996 Auto
Ajay Agarwal [Thu, 27 Dec 2018 11:19:38 +0000 (16:49 +0530)]
defconfig: msm: Enable USB HID driver on MSM8996 Auto

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>
5 years agousb: gadget: f_hid: Add support for HID function
Ajay Agarwal [Thu, 27 Dec 2018 11:18:44 +0000 (16:48 +0530)]
usb: gadget: f_hid: Add support for HID function

Add support for the HID function with the configfs framework.

Change-Id: I4da589aa453f892bf26cf16ce1a80426100ac02d
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agousb: gadget: f_hid: {GET,SET} PROTOCOL Support
Abdulhadi Mohamed [Wed, 19 Jul 2017 15:31:10 +0000 (16:31 +0100)]
usb: gadget: f_hid: {GET,SET} PROTOCOL Support

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>
5 years agousb: gadget: f_hid: fix: Don't access hidg->req without spinlock held
Krzysztof Opasiak [Tue, 31 Jan 2017 17:12:31 +0000 (18:12 +0100)]
usb: gadget: f_hid: fix: Don't access hidg->req without spinlock held

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>
5 years agoidr: add ida_is_empty
Matthew Wilcox [Wed, 14 Dec 2016 23:09:13 +0000 (15:09 -0800)]
idr: add ida_is_empty

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>
5 years agousb: gadget: f_hid add super speed support
Janusz Dziedzic [Thu, 3 Nov 2016 09:27:15 +0000 (10:27 +0100)]
usb: gadget: f_hid add super speed support

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>
5 years agousb: gadget: f_hid: fix: Move IN request allocation to set_alt()
Krzysztof Opasiak [Tue, 24 Jan 2017 02:27:24 +0000 (03:27 +0100)]
usb: gadget: f_hid: fix: Move IN request allocation to set_alt()

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>
5 years agoMerge "drm/msm/sde: add panel stacking support"
Linux Build Service Account [Thu, 10 Jan 2019 23:59:45 +0000 (15:59 -0800)]
Merge "drm/msm/sde: add panel stacking support"

5 years agoMerge "drm/msm/sde: add shared display support"
Linux Build Service Account [Thu, 10 Jan 2019 23:59:44 +0000 (15:59 -0800)]
Merge "drm/msm/sde: add shared display support"

5 years agoMerge "usb: gadget: f_hid: Use spinlock instead of mutex"
Linux Build Service Account [Thu, 10 Jan 2019 15:27:57 +0000 (07:27 -0800)]
Merge "usb: gadget: f_hid: Use spinlock instead of mutex"

5 years agoMerge "cfg80211: indicate support for external authentication"
Linux Build Service Account [Thu, 10 Jan 2019 15:27:55 +0000 (07:27 -0800)]
Merge "cfg80211: indicate support for external authentication"

5 years agocnss2: Add QCN7605 device ID for elf ramdump
Rajasekaran Kalidoss [Thu, 29 Nov 2018 12:57:47 +0000 (18:27 +0530)]
cnss2: Add QCN7605 device ID for elf ramdump

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>
5 years agodrm/msm/sde: add panel stacking support
Xiaowen Wu [Wed, 12 Dec 2018 00:15:36 +0000 (19:15 -0500)]
drm/msm/sde: add panel stacking support

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>
5 years agoMerge "msm: ais: ispif: Fix invalid type conversion"
Linux Build Service Account [Thu, 10 Jan 2019 07:23:12 +0000 (23:23 -0800)]
Merge "msm: ais: ispif: Fix invalid type conversion"

5 years agousb: gadget: f_hid: Use spinlock instead of mutex
Krzysztof Opasiak [Thu, 19 Jan 2017 17:55:29 +0000 (18:55 +0100)]
usb: gadget: f_hid: Use spinlock instead of mutex

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>
5 years agofbdev: msm: validate mdp clk rate and cwb for msm8996
raghavendra ambadas [Thu, 20 Dec 2018 07:16:06 +0000 (12:46 +0530)]
fbdev: msm: validate mdp clk rate and cwb for msm8996

Add mdp rev check for concurrent writeback support and
calculate the mdp clk rate before validating.

Change-Id: Id81045468d9eb08f39ec51fffb657341b5a3c6a9
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
5 years agoARM: dts: msm8996: Add display nodes for 8996 target
raghavendra ambadas [Wed, 19 Dec 2018 10:14:54 +0000 (15:44 +0530)]
ARM: dts: msm8996: Add display nodes for 8996 target

Add FB1, rotator, and WB node in msm8996 dtsi file

Change-Id: I26d471eb64b3a1ccaf2fb201c4d0baf6505cae17
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
5 years agodrm/msm/sde: add shared display support
Rahul Sharma [Mon, 8 Oct 2018 11:48:29 +0000 (17:18 +0530)]
drm/msm/sde: add shared display support

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>
5 years agonl80211: Fix external_auth check for offloaded authentication
Srinivas Dasari [Fri, 2 Feb 2018 09:15:27 +0000 (11:15 +0200)]
nl80211: Fix external_auth check for offloaded authentication

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>
5 years agocfg80211: indicate support for external authentication
Srinivas Dasari [Thu, 3 May 2018 09:45:27 +0000 (17:45 +0800)]
cfg80211: indicate support for external authentication

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>
5 years agoMerge "usb: gadget: f_hid: fix: Free out requests"
Linux Build Service Account [Thu, 10 Jan 2019 00:22:30 +0000 (16:22 -0800)]
Merge "usb: gadget: f_hid: fix: Free out requests"

5 years agoMerge "ARM64: dts: gvm: Enable USB2 pass through for LA Guest"
Linux Build Service Account [Thu, 10 Jan 2019 00:22:29 +0000 (16:22 -0800)]
Merge "ARM64: dts: gvm: Enable USB2 pass through for LA Guest"

5 years agoMerge "defconfig: msm: Enable UAC1 driver on 8996 Auto"
Linux Build Service Account [Thu, 10 Jan 2019 00:22:09 +0000 (16:22 -0800)]
Merge "defconfig: msm: Enable UAC1 driver on 8996 Auto"

5 years agoMerge "usb: gadget: f_uac1: Add support for UAC1 function"
Linux Build Service Account [Thu, 10 Jan 2019 00:22:05 +0000 (16:22 -0800)]
Merge "usb: gadget: f_uac1: Add support for UAC1 function"

5 years agoMerge "cnss2: Add cnss usb API to check the target status"
Linux Build Service Account [Wed, 9 Jan 2019 16:54:50 +0000 (08:54 -0800)]
Merge "cnss2: Add cnss usb API to check the target status"

5 years agousb: gadget: f_hid: fix: Free out requests
Krzysztof Opasiak [Thu, 19 Jan 2017 17:55:27 +0000 (18:55 +0100)]
usb: gadget: f_hid: fix: Free out requests

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: 99c515005857 ("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>
5 years agomsm: camera: isp: Fix invalid type conversion
Meera Gande [Wed, 10 Oct 2018 11:39:22 +0000 (17:09 +0530)]
msm: camera: isp: Fix invalid type conversion

Due to improper type conversion compilation
issue will be seen. Made change to access the
appropriate type.

Change-Id: I2c61364f0385c83aa304788cc705bf4ca48ac2cc
Signed-off-by: Meera Gande <mgande@codeaurora.org>
5 years agoARM64: dts: gvm: Enable USB2 pass through for LA Guest
Venkata Rao Kakani [Fri, 4 Jan 2019 08:42:12 +0000 (14:12 +0530)]
ARM64: dts: gvm: Enable USB2 pass through for LA Guest

Enable USB2.0 pass through in LA Guest along with its
dependencies.

Change-Id: I8fdf27e850f030d2f98b1c9651d5eae340613f70
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
5 years agoMerge "nl80211: Allow SAE Authentication for NL80211_CMD_CONNECT"
Linux Build Service Account [Wed, 9 Jan 2019 05:26:05 +0000 (21:26 -0800)]
Merge "nl80211: Allow SAE Authentication for NL80211_CMD_CONNECT"

5 years agoMerge "cfg80211/nl80211: Optional authentication offload to userspace"
Linux Build Service Account [Wed, 9 Jan 2019 05:26:05 +0000 (21:26 -0800)]
Merge "cfg80211/nl80211: Optional authentication offload to userspace"

5 years agoMerge "cnss2: Add cal duration in host capability request"
Linux Build Service Account [Wed, 9 Jan 2019 05:26:04 +0000 (21:26 -0800)]
Merge "cnss2: Add cal duration in host capability request"

5 years agoMerge "usb: gadget: f_hid: use alloc_ep_req()"
Linux Build Service Account [Wed, 9 Jan 2019 05:26:02 +0000 (21:26 -0800)]
Merge "usb: gadget: f_hid: use alloc_ep_req()"

5 years agodefconfig: msm: Enable UAC1 driver on 8996 Auto
Ajay Agarwal [Wed, 9 Jan 2019 04:26:18 +0000 (09:56 +0530)]
defconfig: msm: Enable UAC1 driver on 8996 Auto

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>
5 years agousb: gadget: f_uac1: Add support for UAC1 function
Ajay Agarwal [Tue, 27 Nov 2018 14:18:19 +0000 (19:48 +0530)]
usb: gadget: f_uac1: Add support for UAC1 function

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>
5 years agousb: gadget: u_audio: Check return value from config_ep_by_speed()
Hemant Kumar [Wed, 19 Sep 2018 18:34:48 +0000 (11:34 -0700)]
usb: gadget: u_audio: Check return value from config_ep_by_speed()

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>
5 years agousb: gadget: u_audio: protect stream runtime fields with stream spinlock
Vladimir Zapolskiy [Thu, 21 Jun 2018 15:22:52 +0000 (17:22 +0200)]
usb: gadget: u_audio: protect stream runtime fields with stream spinlock

The change protects almost the whole body of u_audio_iso_complete()
function by PCM stream lock, this is mainly sufficient to avoid a race
between USB request completion and stream termination, the change
prevents a possibility of invalid memory access in interrupt context
by memcpy():

    Unable to handle kernel paging request at virtual address 00004e80
    pgd = c0004000
    [00004e80] *pgd=00000000
    Internal error: Oops: 817 [#1] PREEMPT SMP ARM
    CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G         C   3.14.54+ #117
    task: da180b80 ti: da192000 task.ti: da192000
    PC is at memcpy+0x50/0x330
    LR is at 0xcdd92b0e
    pc : [<c029ef30>]    lr : [<cdd92b0e>]    psr: 20000193
    sp : da193ce4  ip : dd86ae26  fp : 0000b180
    r10: daf81680  r9 : 00000000  r8 : d58a01ea
    r7 : 2c0b43e4  r6 : acdfb08b  r5 : 01a271cf  r4 : 87389377
    r3 : 69469782  r2 : 00000020  r1 : daf82fe0  r0 : 00004e80
    Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
    Control: 10c5387d  Table: 2b70804a  DAC: 00000015
    Process ksoftirqd/0 (pid: 3, stack limit = 0xda192238)

Also added a check for potential !runtime condition, commonly it is
done by PCM_RUNTIME_CHECK(substream) in the beginning, however this
does not completely prevent from oopses in u_audio_iso_complete(),
because the proper protection scheme must be implemented in PCM
library functions.

An example of *not fixed* oops due to substream->runtime->*
dereference by snd_pcm_running(substream) from
snd_pcm_period_elapsed(), where substream->runtime is gone while
waiting the substream lock:

    Unable to handle kernel paging request at virtual address 6b6b6b6b
    pgd = db7e4000
    [6b6b6b6b] *pgd=00000000
    CPU: 0 PID: 193 Comm: klogd Tainted: G         C   3.14.54+ #118
    task: db5ac500 ti: db60c000 task.ti: db60c000
    PC is at snd_pcm_period_elapsed+0x48/0xd8 [snd_pcm]
    LR is at snd_pcm_period_elapsed+0x40/0xd8 [snd_pcm]
    pc : [<>]    lr : [<>]    psr: 60000193
    Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
    Control: 10c5387d  Table: 2b7e404a  DAC: 00000015
    Process klogd (pid: 193, stack limit = 0xdb60c238)
    [<>] (snd_pcm_period_elapsed [snd_pcm]) from [<>] (udc_irq+0x500/0xbbc)
    [<>] (udc_irq) from [<>] (ci_irq+0x280/0x304)
    [<>] (ci_irq) from [<>] (handle_irq_event_percpu+0xa4/0x40c)
    [<>] (handle_irq_event_percpu) from [<>] (handle_irq_event+0x3c/0x5c)
    [<>] (handle_irq_event) from [<>] (handle_fasteoi_irq+0xc4/0x110)
    [<>] (handle_fasteoi_irq) from [<>] (generic_handle_irq+0x20/0x30)
    [<>] (generic_handle_irq) from [<>] (handle_IRQ+0x80/0xc0)
    [<>] (handle_IRQ) from [<>] (gic_handle_irq+0x3c/0x60)
    [<>] (gic_handle_irq) from [<>] (__irq_svc+0x44/0x78)

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
[erosca: W/o this patch, with minimal instrumentation [1], I can
         consistently reproduce BUG: KASAN: use-after-free [2]]

[1] Instrumentation to reproduce issue [2]:
 diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c
 index a72295c953bb..bd0b308024fe 100644
 --- a/drivers/usb/gadget/function/u_audio.c
 +++ b/drivers/usb/gadget/function/u_audio.c
 @@ -16,6 +16,7 @@
  #include <sound/core.h>
  #include <sound/pcm.h>
  #include <sound/pcm_params.h>
 +#include <linux/delay.h>

  #include "u_audio.h"

 @@ -147,6 +148,8 @@ static void u_audio_iso_complete(struct usb_ep *ep, struct usb_request *req)

  spin_unlock_irqrestore(&prm->lock, flags);

 + udelay(500); //delay here to increase probability of parallel activities
 +
  /* Pack USB load in ALSA ring buffer */
  pending = prm->dma_bytes - hw_ptr;

[2] After applying [1], below BUG occurs on Rcar-H3-Salvator-X board:
==================================================================
BUG: KASAN: use-after-free in u_audio_iso_complete+0x24c/0x520 [u_audio]
Read of size 8 at addr ffff8006cafcc248 by task swapper/0/0

CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        WC      4.14.47+ #160
Hardware name: Renesas Salvator-X board based on r8a7795 ES2.0+ (DT)
Call trace:
[<ffff2000080925ac>] dump_backtrace+0x0/0x364
[<ffff200008092924>] show_stack+0x14/0x1c
[<ffff200008f8dbcc>] dump_stack+0x108/0x174
[<ffff2000083c71b8>] print_address_description+0x7c/0x32c
[<ffff2000083c78e8>] kasan_report+0x324/0x354
[<ffff2000083c6114>] __asan_load8+0x24/0x94
[<ffff2000021d1b34>] u_audio_iso_complete+0x24c/0x520 [u_audio]
[<ffff20000152fe50>] usb_gadget_giveback_request+0x480/0x4d0 [udc_core]
[<ffff200001860ab8>] usbhsg_queue_done+0x100/0x130 [renesas_usbhs]
[<ffff20000185f814>] usbhsf_pkt_handler+0x1a4/0x298 [renesas_usbhs]
[<ffff20000185fb38>] usbhsf_irq_ready+0x128/0x178 [renesas_usbhs]
[<ffff200001859cc8>] usbhs_interrupt+0x440/0x490 [renesas_usbhs]
[<ffff2000081a0288>] __handle_irq_event_percpu+0x594/0xa58
[<ffff2000081a07d0>] handle_irq_event_percpu+0x84/0x12c
[<ffff2000081a0928>] handle_irq_event+0xb0/0x10c
[<ffff2000081a8384>] handle_fasteoi_irq+0x1e0/0x2ec
[<ffff20000819e5f8>] generic_handle_irq+0x2c/0x44
[<ffff20000819f0d0>] __handle_domain_irq+0x190/0x194
[<ffff20000808177c>] gic_handle_irq+0x80/0xac
Exception stack(0xffff200009e97c80 to 0xffff200009e97dc0)
7c80: 0000000000000000 0000000000000000 0000000000000003 ffff200008179298
7ca0: ffff20000ae1c180 dfff200000000000 0000000000000000 ffff2000081f9a88
7cc0: ffff200009eb5960 ffff200009e97cf0 0000000000001600 ffff0400041b064b
7ce0: 0000000000000000 0000000000000002 0000000200000001 0000000000000001
7d00: ffff20000842197c 0000ffff958c4970 0000000000000000 ffff8006da0d5b80
7d20: ffff8006d4678498 0000000000000000 000000126bde0a8b ffff8006d4678480
7d40: 0000000000000000 000000126bdbea64 ffff200008fd0000 ffff8006fffff980
7d60: 00000000495f0018 ffff200009e97dc0 ffff200008b6c4ec ffff200009e97dc0
7d80: ffff200008b6c4f0 0000000020000145 ffff8006da0d5b80 ffff8006d4678498
7da0: ffffffffffffffff ffff8006d4678498 ffff200009e97dc0 ffff200008b6c4f0
[<ffff200008084034>] el1_irq+0xb4/0x12c
[<ffff200008b6c4f0>] cpuidle_enter_state+0x818/0x844
[<ffff200008b6c59c>] cpuidle_enter+0x18/0x20
[<ffff20000815f2e4>] call_cpuidle+0x98/0x9c
[<ffff20000815f674>] do_idle+0x214/0x264
[<ffff20000815facc>] cpu_startup_entry+0x20/0x24
[<ffff200008fb09d8>] rest_init+0x30c/0x320
[<ffff2000095f1338>] start_kernel+0x570/0x5b0
---<-snip->---

Change-Id: I33211f495489b3c5cf58289c132a08daeece1941
Fixes: 132fcb460839 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 56bc61587daadef67712068f251c4ef2e3932d94
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agousb: gadget: u_audio: remove cached period bytes value
Vladimir Zapolskiy [Thu, 21 Jun 2018 15:22:50 +0000 (17:22 +0200)]
usb: gadget: u_audio: remove cached period bytes value

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: 132fcb460839 ("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>
5 years agousb: gadget: u_audio: remove caching of stream buffer parameters
Vladimir Zapolskiy [Thu, 21 Jun 2018 15:22:49 +0000 (17:22 +0200)]
usb: gadget: u_audio: remove caching of stream buffer parameters

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: 132fcb460839 ("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>
5 years agousb: gadget: u_audio: update hw_ptr in iso_complete after data copied
Joshua Frkuska [Thu, 21 Jun 2018 15:22:48 +0000 (17:22 +0200)]
usb: gadget: u_audio: update hw_ptr in iso_complete after data copied

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: 132fcb460839 ("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>
5 years agousb: gadget: u_audio: fix pcm/card naming in g_audio_setup()
Eugeniu Rosca [Thu, 21 Jun 2018 15:22:47 +0000 (17:22 +0200)]
usb: gadget: u_audio: fix pcm/card naming in g_audio_setup()

Fix below smatch (v0.5.0-4443-g69e9094e11c1) warnings:
drivers/usb/gadget/function/u_audio.c:607 g_audio_setup() warn: strcpy() 'pcm_name' of unknown size might be too large for 'pcm->name'
drivers/usb/gadget/function/u_audio.c:614 g_audio_setup() warn: strcpy() 'card_name' of unknown size might be too large for 'card->driver'
drivers/usb/gadget/function/u_audio.c:615 g_audio_setup() warn: strcpy() 'card_name' of unknown size might be too large for 'card->shortname'

Below commits performed a similar 's/strcpy/strlcpy/' rework:
* v2.6.31 commit 8372d4980fbc ("ALSA: ctxfi - Fix PCM device naming")
* v4.14 commit 003d3e70dbeb ("ALSA: ad1848: fix format string overflow warning")
* v4.14 commit 6d8b04de87e1 ("ALSA: cs423x: fix format string overflow warning")

Change-Id: Iac2273d900d4e39b7ad208e53b178cf1f4dbd745
Fixes: eb9fecb9e69b ("usb: gadget: f_uac2: split out audio core")
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: dfa042fa310caa475667b8c38d852f14439e0b01
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agousb: gadget: make snd_pcm_hardware const
Bhumika Goyal [Sun, 13 Aug 2017 12:43:11 +0000 (18:13 +0530)]
usb: gadget: make snd_pcm_hardware const

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>
5 years agousb: gadget: f_uac2: constify snd_pcm_ops structures
Arvind Yadav [Wed, 9 Aug 2017 07:46:51 +0000 (13:16 +0530)]
usb: gadget: f_uac2: constify snd_pcm_ops structures

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>
5 years agousb: gadget: f_uac1: endianness fixes.
Ruslan Bilovol [Sun, 25 Jun 2017 13:23:46 +0000 (16:23 +0300)]
usb: gadget: f_uac1: endianness fixes.

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>
5 years agousb: gadget: add f_uac1 variant based on a new u_audio api
Ruslan Bilovol [Sun, 18 Jun 2017 13:23:54 +0000 (16:23 +0300)]
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)

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>
5 years agousb: gadget: function: make current f_uac1 implementation legacy
Ruslan Bilovol [Sun, 18 Jun 2017 13:23:53 +0000 (16:23 +0300)]
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

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>
5 years agousb: gadget: f_uac2: split out audio core
Ruslan Bilovol [Sun, 18 Jun 2017 13:23:52 +0000 (16:23 +0300)]
usb: gadget: f_uac2: split out audio core

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>
5 years agousb: gadget: function: f_uac1: implement get_alt()
Ruslan Bilovol [Sat, 17 Jun 2017 21:23:58 +0000 (00:23 +0300)]
usb: gadget: function: f_uac1: implement get_alt()

After commit 7e4da3fcf7c9 ("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.

Change-Id: Ia8688f8ae6076bb6e96cc8158bb634579aa9b3e7
Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 1fc4926d92b9515b44f35b339bab5d2ca474a723
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agousb: gadget: f_uac2: remove platform driver/device creation
Ruslan Bilovol [Sun, 18 Jun 2017 13:23:51 +0000 (16:23 +0300)]
usb: gadget: f_uac2: remove platform driver/device creation

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.

Change-Id: Ic069ca8d8e9139c6c83a8ec7a2a5ef67cef2eb1e
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 7158b57a495635c04507d986117ae26b2eb5e4e5
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agousb: gadget: f_uac2: calculate wMaxPacketSize before endpoint match
Sekhar Nori [Wed, 17 May 2017 08:15:17 +0000 (13:45 +0530)]
usb: gadget: f_uac2: calculate wMaxPacketSize before endpoint match

Calculate wMaxPacketSize before endpoint matching the
descriptor is found.

This allows audio gadget to be used with controllers
which have a shortage or unavailability of endpoints
that can handle max packet size of 1023 (FS) or 1024
(HS).

With this audio gadget can be used on TI's OMAP-L138 SoC
which has a MUSB HS controller with endpoints having max
packet size much less than 1023 or 1024. See mode_2_cfg in
drivers/usb/musb/musb_core.c

Change-Id: I693014bd74ff8221a2174bcc73880eeff398e2bc
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 0db56e43359c47ff184ceaf8b04b664d997bff88
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agousb: gadget: uac2: add req_number as parameter
Peter Chen [Wed, 4 Jan 2017 02:19:23 +0000 (10:19 +0800)]
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.

Change-Id: I6d85f82eb3d93bb9e547855780d266bb095ca6b2
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: e92b9d449d0490800160bfeb5ee1175a02979f47
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agousb: gadget: f_uac2: improve error handling
Peter Chen [Wed, 4 Jan 2017 02:19:22 +0000 (10:19 +0800)]
usb: gadget: f_uac2: improve error handling

If it is out of memory, we should return -ENOMEM;

Change-Id: Ibc46944ebf72d0dc2191191dbd1c643eac302fe0
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 88f950a69174eca60d3e7df558ecb53d6d4d4e6f
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agousb: gadget: uac2: Drop unused device qualifier descriptor
Krzysztof Opasiak [Sun, 22 May 2016 09:08:14 +0000 (11:08 +0200)]
usb: gadget: uac2: Drop unused device qualifier descriptor

This descriptor is never used. Currently device qualifier
descriptor is generated by compossite code so no need to
keep it in function file.

Change-Id: Ib69bffbcdb1bae9b0036f669aba1fa91d04216ae
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Krzysztof Opasiak <kopasiak90@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: d4529f9be1d72919f75f76f31773c4e98d03ce6b
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: function: f_uac1: implement get_alt()"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:58 +0000 (19:26 +0530)]
Revert "usb: gadget: function: f_uac1: implement get_alt()"

This reverts commit a1f2b05323e7e782bb79f18efbcea703e0cb613b.
Required for clean picking of UAC opensource changes.

Change-Id: Ic58920a40e59ad744dceb99a85818ab1fd6f3bab
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: split out audio core"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:56 +0000 (19:26 +0530)]
Revert "usb: gadget: split out audio core"

This reverts commit e83bff72817caa6ae633fdf33268aac25ee60f35.
Required for clean picking of UAC opensource changes.

Change-Id: I3b7ba456dd4d7bf4c21ce32485f8feb3fc448e03
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: function: make current f_uac1 implementation legacy"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:55 +0000 (19:26 +0530)]
Revert "usb: gadget: function: make current f_uac1 implementation legacy"

This reverts commit 8d17be60a0d7695f77b13ba476631df6e7bdb41a.
Required for clean picking of UAC opensource changes.

Change-Id: I4b1e58e4bf17f25abfb9ae6f3a9d4ad51293c586
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: add f_uac1 variant based on a new u_audio api"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:53 +0000 (19:26 +0530)]
Revert "usb: gadget: add f_uac1 variant based on a new u_audio api"

This reverts commit 8706efd80958ef729efe7f1cc0c5a994ce26f071.
Required for clean picking of UAC opensource changes.

Change-Id: I5cd6d43ffce71db0bad71ea43e97a40703fb61cf
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: f_uac1: endianness fixes."
Ajay Agarwal [Tue, 8 Jan 2019 13:56:52 +0000 (19:26 +0530)]
Revert "usb: gadget: f_uac1: endianness fixes."

This reverts commit f80170561bcab8a983ae413ca52f79327333853f.
Required for clean picking of UAC opensource changes.

Change-Id: I26daf26963d4a1aed7e7fd71e07bbcf3303bf51a
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: f_uac2: constify snd_pcm_ops structures"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:50 +0000 (19:26 +0530)]
Revert "usb: gadget: f_uac2: constify snd_pcm_ops structures"

This reverts commit 54120399c6705d06660be005e986ce9f87c9c6c2.
Required for clean picking of UAC opensource changes.

Change-Id: Iac8e14182610f81ff7efa9885f692b844bf707e6
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: make snd_pcm_hardware const"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:49 +0000 (19:26 +0530)]
Revert "usb: gadget: make snd_pcm_hardware const"

This reverts commit debfef9994e9fc7b81afc0eb93891fc09d512fa6.
Required for clean picking of UAC opensource changes.

Change-Id: Ibea146b46a1d746e043cf7ef5839c58cf6caa74e
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: u_audio: fix pcm/card naming in g_audio_setup()"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:47 +0000 (19:26 +0530)]
Revert "usb: gadget: u_audio: fix pcm/card naming in g_audio_setup()"

This reverts commit 2eb1ffe38317b32ff2498d00eb2aca3d3495c153.
Required for clean picking of UAC opensource changes.

Change-Id: If701e740b5fce8cc40de7832a87f13b2e36b329f
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: u_audio: update hw_ptr in iso_complete after data copied"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:46 +0000 (19:26 +0530)]
Revert "usb: gadget: u_audio: update hw_ptr in iso_complete after data copied"

This reverts commit 06e25fbb83b34f3ca4db69d7ebf7ce1d8f4da65b.
Required for clean picking of UAC opensource changes.

Change-Id: I9090ca1d75f0521f799f6849b3720909f987bbdc
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: u_audio: remove caching of stream buffer parameters"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:45 +0000 (19:26 +0530)]
Revert "usb: gadget: u_audio: remove caching of stream buffer parameters"

This reverts commit 32c666f9456fdf6b1fcaf87d6e924ae2724ed9ea.
Required for clean picking of UAC opensource changes.

Change-Id: I40d571178823c43126eccc55d11041b1baabc7f8
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: u_audio: remove cached period bytes value"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:44 +0000 (19:26 +0530)]
Revert "usb: gadget: u_audio: remove cached period bytes value"

This reverts commit ad983d197d386070d172991e924b11ea12afd90e.
Required for clean picking of UAC opensource changes.

Change-Id: I5d59361d347616c29dc40dcded7e0b132faf42a4
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: u_audio: protect stream runtime fields with stream spinlock"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:43 +0000 (19:26 +0530)]
Revert "usb: gadget: u_audio: protect stream runtime fields with stream spinlock"

This reverts commit 5e5109f539aa4c5086465169481ee01dd579d008.
Required for clean picking of UAC opensource changes.

Change-Id: If8690a51ff85f45d90581092425787f40ab4b711
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: u_audio: Check return value from config_ep_by_speed()"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:41 +0000 (19:26 +0530)]
Revert "usb: gadget: u_audio: Check return value from config_ep_by_speed()"

This reverts commit 108c841217974da6e7d9197e404c27dbeeaa8641.
Required for clean picking of UAC opensource changes.

Change-Id: Ib507670642862b73287deaa48efe9fd67b8891cc
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "usb: gadget: f_uac1: Add support for UAC1 function"
Ajay Agarwal [Tue, 8 Jan 2019 13:56:39 +0000 (19:26 +0530)]
Revert "usb: gadget: f_uac1: Add support for UAC1 function"

This reverts commit b5c775efe4d1963081c25efaa4c026444b742d7a.
Required for clean picking of UAC opensource changes.

Change-Id: If7eb3a3f19cbff82c90f8ea156ac36e76d812577
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoRevert "defconfig: msm: Enable UAC1 driver on 8996 Auto"
Ajay Agarwal [Wed, 9 Jan 2019 04:20:25 +0000 (09:50 +0530)]
Revert "defconfig: msm: Enable UAC1 driver on 8996 Auto"

This reverts commit 82cf88b5b8b80a6d806c00cf5a43b39919c51fbc.
Required for clean picking of UAC opensource changes.

Change-Id: Ic4b124d9917cb7a9a9bf2438c1506ecde4a05d44
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agoMerge "defconfig: msm: gvm: disable SWAP for LA Guest"
Linux Build Service Account [Tue, 8 Jan 2019 21:42:50 +0000 (13:42 -0800)]
Merge "defconfig: msm: gvm: disable SWAP for LA Guest"

5 years agousb: gadget: f_hid: use alloc_ep_req()
Felipe F. Tonello [Tue, 23 Aug 2016 17:24:51 +0000 (18:24 +0100)]
usb: gadget: f_hid: use alloc_ep_req()

Use gadget's framework allocation function instead of directly calling
usb_ep_alloc_request().

Change-Id: I247b0d325f553a1cb363f35def2b1aa4c0385dd0
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: ba1582f22231821c57534e87b077d84adbc15dbd
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
5 years agomsm: ais: ispif: Fix invalid type conversion
E V Ravi [Tue, 8 Jan 2019 12:10:44 +0000 (17:40 +0530)]
msm: ais: ispif: Fix invalid type conversion

Due to improper type conversion compilation
issue will be seen. Made change to access the
appropriate type.

Change-Id: I54777fe71a2f29297b439ac26f80b9684222d89a
Signed-off-by: E V Ravi <evenka@codeaurora.org>
5 years agocnss2: Add cal duration in host capability request
Rajasekaran Kalidoss [Mon, 24 Dec 2018 08:16:50 +0000 (13:46 +0530)]
cnss2: Add cal duration in host capability request

Add cal duration in host capability request as host needs to support
best effort cold calibration.

Change-Id: I2bb162da4db2c72efb7866b665cff2cb5a4863a5
Signed-off-by: Rajasekaran Kalidoss <rkalidos@codeaurora.org>
5 years agoMerge "drm/msm/sde: support to control layer mixer usage"
Linux Build Service Account [Tue, 8 Jan 2019 14:06:40 +0000 (06:06 -0800)]
Merge "drm/msm/sde: support to control layer mixer usage"

5 years agoMerge "cnss2: Add support for bin format bdf file"
Linux Build Service Account [Tue, 8 Jan 2019 14:06:38 +0000 (06:06 -0800)]
Merge "cnss2: Add support for bin format bdf file"