Commit graph

604241 commits

Author SHA1 Message Date
Eugeniu Rosca
13d7ef745d 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 8372d4980f ("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>
2019-01-09 10:16:59 +05:30
Bhumika Goyal
49c1106510 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>
2019-01-09 10:16:58 +05:30
Arvind Yadav
9585c49d93 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>
2019-01-09 10:16:58 +05:30
Ruslan Bilovol
ee164f3bfa 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>
2019-01-09 10:16:58 +05:30
Ruslan Bilovol
c762b9b837 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>
2019-01-09 10:16:57 +05:30
Ruslan Bilovol
e067bbe140 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>
2019-01-09 10:16:57 +05:30
Ruslan Bilovol
d97c071258 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>
2019-01-09 10:16:56 +05:30
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
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
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
Andy Sun
ba1897c15b msm: early_domain: return directly if early domain disabled
If early_domain_enabled is false, ed_core_data won't be allocated memory,
accessing early_domain_request will cause kernel Oops.

Change-Id: I8a64c574141a7647e699710b566cc5997d372478
Signed-off-by: Andy Sun <bins@codeaurora.org>
2018-12-27 15:32:41 +08:00
Felipe F. Tonello
556e8bd7bb usb: gadget: remove useless parameter in alloc_ep_req()
The default_length parameter of alloc_ep_req was not really necessary
and gadget drivers would almost always create an inline function to pass
the same value to len and default_len.

This patch removes that parameter and updates all calls to alloc_ep_req() to
use the new API.

Change-Id: Idfe0e0fde8faf5f713a8368d29a4bd155208ffa2
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: aadbe812463f8af1751debb0eaaeec8a778d7ff1
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[ajaya@codeaurora.org: fix merge conflicts]
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-27 12:01:50 +05:30
Johannes Berg
9b20776b05 usb: gadget: f_hid: add dev to configfs
Even if the /dev/hidg* chardev is automatically created, one
has to guess which one belongs to which function. In the case
of multiple HID functions, or maybe even multiple peripherals,
this becomes difficult.

Add the dev (with major and minor number) to configfs to allow
looking up (or even creating) the right device node for each
function. This file is read-only.

Change-Id: If11a531a4b65cbcfb5c5456712c5f965fd4eb4c2
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: ed6fe1f50f0c0fdea674dfa739af50011034bdfa
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-27 11:32:24 +05:30
Linux Build Service Account
86bc01ea1b Merge "usb: gadget: u_audio: Check return value from config_ep_by_speed()" 2018-12-26 02:52:51 -08:00
Linux Build Service Account
f1af8c5dc7 Merge "usb: gadget: u_audio: protect stream runtime fields with stream spinlock" 2018-12-26 02:52:50 -08:00
Linux Build Service Account
391be96e91 Merge "usb: gadget: u_audio: remove caching of stream buffer parameters" 2018-12-26 02:52:46 -08:00
Ajay Agarwal
45fbfdcafb usb: diag_ipc_bridge: Fix kref_put handling in case of transfers
Currently the driver puts kref in the read/write completion
callback irrespective of whether the transaction was successful
or not. This is fine for diag transfers because the read/write
function is not waiting for completion.
But in case of IPC transfers, the read/write function waits for
completion. If the transfer fails for some reason, then it will
do a kref_put as well, along with the completion callback. This
leads to double put of kref counter leading to null pointer
dereference from diag_bridge_disconnect(on cable disconnect).
Fix this by doing kref_put in the completion callback only if the
URB is submitted successfully. Else do it from the error handling
in read/write functions.

Change-Id: I50645cac757293dd0b1df9afb356281b2922401b
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-26 16:00:07 +05:30
Vivek Kumar
74746264e5 defconfig: msm: Enable earlydomain handoff support
Enable early domain handoff support for msm-auto
perf defconfig

Change-Id: I4364928a05299367906996d01782ea7fced099ba
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
2018-12-24 03:50:28 -08:00