Commit graph

604301 commits

Author SHA1 Message Date
Ruslan Bilovol
3ac994fa12 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>
2019-01-09 10:16:56 +05:30
Ruslan Bilovol
49d01f1f1a 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>
2019-01-09 10:16:56 +05:30
Sekhar Nori
1495b5a404 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>
2019-01-09 10:16:55 +05:30
Peter Chen
9069ebc347 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>
2019-01-09 10:16:55 +05:30
Peter Chen
20c17d1183 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>
2019-01-09 10:16:54 +05:30
Krzysztof Opasiak
0a8515c0e8 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>
2019-01-09 10:16:54 +05:30
Ajay Agarwal
7c5d95219e Revert "usb: gadget: function: f_uac1: implement get_alt()"
This reverts commit a1f2b05323.
Required for clean picking of UAC opensource changes.

Change-Id: Ic58920a40e59ad744dceb99a85818ab1fd6f3bab
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:54 +05:30
Ajay Agarwal
84ac0da7f6 Revert "usb: gadget: split out audio core"
This reverts commit e83bff7281.
Required for clean picking of UAC opensource changes.

Change-Id: I3b7ba456dd4d7bf4c21ce32485f8feb3fc448e03
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:53 +05:30
Ajay Agarwal
b1482e9ce6 Revert "usb: gadget: function: make current f_uac1 implementation legacy"
This reverts commit 8d17be60a0.
Required for clean picking of UAC opensource changes.

Change-Id: I4b1e58e4bf17f25abfb9ae6f3a9d4ad51293c586
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:53 +05:30
Ajay Agarwal
25bc0948ae Revert "usb: gadget: add f_uac1 variant based on a new u_audio api"
This reverts commit 8706efd809.
Required for clean picking of UAC opensource changes.

Change-Id: I5cd6d43ffce71db0bad71ea43e97a40703fb61cf
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:53 +05:30
Ajay Agarwal
7b9edc5d9f Revert "usb: gadget: f_uac1: endianness fixes."
This reverts commit f80170561b.
Required for clean picking of UAC opensource changes.

Change-Id: I26daf26963d4a1aed7e7fd71e07bbcf3303bf51a
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:52 +05:30
Ajay Agarwal
4d95614baf Revert "usb: gadget: f_uac2: constify snd_pcm_ops structures"
This reverts commit 54120399c6.
Required for clean picking of UAC opensource changes.

Change-Id: Iac8e14182610f81ff7efa9885f692b844bf707e6
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:52 +05:30
Ajay Agarwal
bb1ca7e937 Revert "usb: gadget: make snd_pcm_hardware const"
This reverts commit debfef9994.
Required for clean picking of UAC opensource changes.

Change-Id: Ibea146b46a1d746e043cf7ef5839c58cf6caa74e
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:51 +05:30
Ajay Agarwal
4b64164276 Revert "usb: gadget: u_audio: fix pcm/card naming in g_audio_setup()"
This reverts commit 2eb1ffe383.
Required for clean picking of UAC opensource changes.

Change-Id: If701e740b5fce8cc40de7832a87f13b2e36b329f
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:51 +05:30
Ajay Agarwal
05dd6da5f6 Revert "usb: gadget: u_audio: update hw_ptr in iso_complete after data copied"
This reverts commit 06e25fbb83.
Required for clean picking of UAC opensource changes.

Change-Id: I9090ca1d75f0521f799f6849b3720909f987bbdc
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:51 +05:30
Ajay Agarwal
2b19cf4fb8 Revert "usb: gadget: u_audio: remove caching of stream buffer parameters"
This reverts commit 32c666f945.
Required for clean picking of UAC opensource changes.

Change-Id: I40d571178823c43126eccc55d11041b1baabc7f8
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:50 +05:30
Ajay Agarwal
b79ca632cb Revert "usb: gadget: u_audio: remove cached period bytes value"
This reverts commit ad983d197d.
Required for clean picking of UAC opensource changes.

Change-Id: I5d59361d347616c29dc40dcded7e0b132faf42a4
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:50 +05:30
Ajay Agarwal
bf415bc503 Revert "usb: gadget: u_audio: protect stream runtime fields with stream spinlock"
This reverts commit 5e5109f539.
Required for clean picking of UAC opensource changes.

Change-Id: If8690a51ff85f45d90581092425787f40ab4b711
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:50 +05:30
Ajay Agarwal
cd2a8f0e2c Revert "usb: gadget: u_audio: Check return value from config_ep_by_speed()"
This reverts commit 108c841217.
Required for clean picking of UAC opensource changes.

Change-Id: Ib507670642862b73287deaa48efe9fd67b8891cc
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:49 +05:30
Ajay Agarwal
2363f39602 Revert "usb: gadget: f_uac1: Add support for UAC1 function"
This reverts commit b5c775efe4.
Required for clean picking of UAC opensource changes.

Change-Id: If7eb3a3f19cbff82c90f8ea156ac36e76d812577
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:16:49 +05:30
Ajay Agarwal
a466157c73 Revert "defconfig: msm: Enable UAC1 driver on 8996 Auto"
This reverts commit 82cf88b5b8.
Required for clean picking of UAC opensource changes.

Change-Id: Ic4b124d9917cb7a9a9bf2438c1506ecde4a05d44
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-09 10:15:13 +05:30
Linux Build Service Account
c05d4dd4e2 Merge "defconfig: msm: gvm: disable SWAP for LA Guest" 2019-01-08 13:42:49 -08:00
Felipe F. Tonello
66823b1c83 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>
2019-01-08 07:53:03 -08:00
E V Ravi
3e21f40771 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>
2019-01-08 21:11:16 +05:30
Rajasekaran Kalidoss
72c6bb7c2b 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>
2019-01-08 20:27:53 +05:30
Linux Build Service Account
fb8e1d61a2 Merge "drm/msm/sde: support to control layer mixer usage" 2019-01-08 06:06:39 -08:00
Linux Build Service Account
07251f160a Merge "cnss2: Add support for bin format bdf file" 2019-01-08 06:06:38 -08:00
Linux Build Service Account
a79f75f2eb Merge "cfg80211: Updated nl80211_commands to be in sync with upstream" 2019-01-08 06:06:37 -08:00
Linux Build Service Account
97509373bc Merge "drm: msm: sde: kernel needs to monitor bootloader's flush done" 2019-01-08 06:06:36 -08:00
Srinivas Dasari
cb51fb6ba3 nl80211: Allow SAE Authentication for NL80211_CMD_CONNECT
This commit allows SAE Authentication for NL80211_CMD_CONNECT
interface, provided host driver advertises the support.

Host drivers may offload the SAE authentication to user space
through NL80211_CMD_EXTERNAL_AUTH interface and thus expect
the user space to advertise support to handle offload through
NL80211_ATTR_EXTERNAL_AUTH_SUPPORT in NL80211_CMD_CONNECT
request. Such drivers should reject the connect request on no
offload support from user space.

Signed-off-by: Srinivas Dasari <dasaris@qti.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 10773a7c09b327d02144c7d181e6544b7015ffc7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
CRs-Fixed: 2182553
Change-Id: I41b49228e88b32a35323c4dc8fa98e507a8a971d
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: Jiachao Wu <jiacwu@codeaurora.org>
Signed-off-by: Min Liu <minliu@codeaurora.org>
2019-01-08 15:51:22 +08:00
Srinivas Dasari
d7c122d223 nl80211: Free connkeys on external authentication failure
The failure scenario while processing
NL80211_ATTR_EXTERNAL_AUTH_SUPPORT does not free
the connkeys. This commit addresses the same.

Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 2f0605a697f4b9f5b1c1571c7ec6a16df4dc2616
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: I7aee3db35f617df9f652184a084941e42cf539c7
CRs-Fixed: 2375721
Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Signed-off-by: Min Liu <minliu@codeaurora.org>
2019-01-08 15:48:17 +08:00
Srinivas Dasari
30467c7507 cfg80211/nl80211: Optional authentication offload to userspace
This interface allows the host driver to offload the authentication to
user space. This is exclusively defined for host drivers that do not
define separate commands for authentication and association, but rely on
userspace SME (e.g., in wpa_supplicant for the ~WPA_DRIVER_FLAGS_SME
case) for the authentication to happen. This can be used to implement
SAE without full implementation in the kernel/firmware while still being
able to use NL80211_CMD_CONNECT with driver-based BSS selection.

Host driver sends NL80211_CMD_EXTERNAL_AUTH event to start/abort
authentication to the port on which connect is triggered and status
of authentication is further indicated by user space to host
driver through the same command response interface.

User space entities advertise this capability through the
NL80211_ATTR_EXTERNAL_AUTH_SUPP flag in the NL80211_CMD_CONNECT request.
Host drivers shall look at this capability to offload the authentication.

Signed-off-by: Srinivas Dasari <dasaris@qti.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
[add socket connection ownership check]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 40cbfa90218bc570a7959b436b9d48a18c361041
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
CRs-Fixed: 2182553
Change-Id: Id925dd82d9a9c719b32aac2de75b6ad001f1a958
[dasaris@codeaurora.org: merging with msm-specific changes]
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
Signed-off-by: Jiachao Wu <jiacwu@codeaurora.org>
Signed-off-by: Min Liu <minliu@codeaurora.org>
2019-01-08 15:33:03 +08:00
Venkata Rao Kakani
3e0203a3f5 defconfig: msm: gvm: disable SWAP for LA Guest
Remove CONFIG_SWAP and its dependency for LA Guest
to avoid extra logging on memory pressure.

Change-Id: I6843bde1867aaf20db2fda5bb7ad640dc0ec7c7c
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
2019-01-07 22:48:52 -08:00
Jayachandran Sreekumaran
2bf8ef1af3 cnss2: Add cnss usb API to check the target status
Add new cnss usb API to check to check whether the target
is up or down. Remove invoking pld_remove callback function
in usb disconnect.

Change-Id: I0e873737a27f9941db1dae54636ef55ba4d05288
Signed-off-by: Jayachandran Sreekumaran <jsreekum@codeaurora.org>
2019-01-08 11:54:01 +05:30
Jayachandran Sreekumaran
1030466da5 cnss2: Add support for bin format bdf file
As genoa supports bdf file only in bin format, add support for the same.

Change-Id: I55db0480a259379c4ee2dac76f587d3fdf497090
Signed-off-by: Jayachandran Sreekumaran <jsreekum@codeaurora.org>
2019-01-08 10:44:05 +05:30
Darshan Kumsi Srinivasa
5ac717112b msm: vidc: ignore processing responses in invalid state
No need to process response messages from video hardware
after device went into invalid state. Processing responses
may result in use-after-free memory fault because client
might free all the resources after error.

Change-Id: I3bfb26e5aa52aba33b7b62cda7820dcbc5fe033f
Signed-off-by: Darshan Kumsi Srinivasa <darssr@codeaurora.org>
2019-01-06 23:03:07 -08:00
Srinivas Dasari
38476b581e cfg80211: Updated nl80211_commands to be in sync with upstream
Update nl80211_commands to be in sync with upstream.
This is needed to add new commands.

Change-Id: Ib6b71e3f66560b035377c7bc0c115490b04f5c4f
CRs-Fixed: 2182553
Signed-off-by: Srinivas Dasari <dasaris@codeaurora.org>
2019-01-04 14:59:11 +08:00
Linux Build Service Account
8e1e1a68b5 Merge "usb: gadget: f_hid: use free_ep_req()" 2019-01-03 07:43:38 -08:00
Linux Build Service Account
c9c3923eb4 Merge "Merge android-4.4.169 (dfca92b) into msm-4.4" 2019-01-03 07:43:35 -08:00
Linux Build Service Account
f6f86a701c Merge "msm: early_domain: return directly if early domain disabled" 2019-01-02 22:29:03 -08:00
Felipe F. Tonello
bd63c75aa4 usb: gadget: f_hid: use free_ep_req()
We should always use free_ep_req() when allocating requests with
alloc_ep_req().

Change-Id: Ifa23bf08baf00eb6a1516726de7655901a532cdc
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 14794d7133d0f16b4901207a489f04e4e700166a
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-02 20:42:24 -08:00
Linux Build Service Account
d7d90ad099 Merge "usb: gadget: f_hid: add dev to configfs" 2019-01-02 14:29:14 -08:00
Linux Build Service Account
dfc6e6a8ab Merge "dwc3: gadget: Take copy of dwc->gadget_driver before releasing lock" 2019-01-02 05:43:27 -08:00
Ajay Agarwal
82cf88b5b8 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: Icead0b5f37b822e08f1c0714e62b275db60174a3
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2019-01-01 20:42:23 -08:00
Linux Build Service Account
37481e48e5 Merge "Revert "rtc: alarm: Add power-on alarm feature"" 2019-01-01 07:05:39 -08:00
Linux Build Service Account
ed4ee6a29b Merge "msm: ais: Update request from kernel to lk" 2019-01-01 07:05:38 -08:00
Linux Build Service Account
b55df81c1b Merge "usb: diag_ipc_bridge: Fix kref_put handling in case of transfers" 2018-12-30 19:52:40 -08:00
Linux Build Service Account
b9e4e9fecc Merge "defconfig: msm: Enable earlydomain handoff support" 2018-12-29 20:51:35 -08:00
Linux Build Service Account
252c2feee7 Merge "usb: gadget: f_uac1: Add support for UAC1 function" 2018-12-29 20:51:26 -08:00
Mao Jinlong
5e0025e766 Revert "rtc: alarm: Add power-on alarm feature"
This reverts commit 2e1a4aefef66db901f9a906b79e30187f10dbecb.

Power off alarm is not set via alarmtimer now. Remove the changes
of power off alarm's previous design.

Change-Id: I0f60bec0d94c93c4f2a89ae86a1b0a0d04aa9e48
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2018-12-27 18:22:40 +05:30