Use a spinlock to protect runtime resource in substream
against race conditions which may lead to use-after-free.
CRs-fixed: 2112713
Change-Id: I37dee68cad5eae05b21cfade3dabc0c2b79be6b8
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
snd_compr_tstamp is initialized using aggregate initialization
that does not zero out the padded bytes.
Initialize timestamp structure to zero using memset to avoid this.
CRs-Fixed: 568717
Change-Id: I7a7d188705161f06201f1a1f2945bb6acd633d5d
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Add new config AUDIO_QGKI for audio to enable
ASOC framework enhancement.
Change-Id: I0beccc8f77d047a110001101143244392b57d383
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add audio backend to hwdep interface. This is to provide
ioctl interface to communicate to routing driver.
Currently codec driver uses request_firmware to get calibration data
but as this firmware file is also written by userspace process after
bootup, it is not recommended to use request_firmware. ALSA core
provides mechanism to get hardware dependent data using hwdep nodes.
Codec will use aforementioned nodes to get calibration data from
userspace.
This commit adds hwdep interface for codec calibration.
Change-Id: I9abeb9cdf3ea58d9fac13eef5d849c8aadf1bfbf
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Create a header library which export kernel headers.
These headers are needed by modules and userspace libraries.
Change-Id: I0908e2e02ba1edfb569c5abcd0d5e1df72a40324
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
The gpiochip_add_data() sets the chained irq handler for the TLMM
summary line. Remove reundant call to set the handler again.
Change-Id: I230f21fdde880407bf84ac73669457aa062a8236
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
There is no need to reset the PPM when the interface is
unregistered. Quietly silencing the notifications and then
unregistering everything is enough. This speeds up
ucsi_unregister() a lot.
Change-Id: Ib309aa79ee12ebd6a0e299b64046073bd7866a24
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-19-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 74ce3e41274805e4a5598f4d98ee4d5160466d07
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
That data structure was used for constructing the commands
before executing them, but it was never really useful. Using
the structure just complicated the driver. The commands are
64-bit wide, so it is enough to simply fill a u64 variable.
No data structures needed.
This simplifies the driver considerable and makes it much
easier to for example add support for big endian systems
later on.
Change-Id: I3533a2c24c3a91ea51e2ebdefe6bc2351223ca0b
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-16-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 470ce43a1a810117f09aa4bcad6ca2be6b29c8d1
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The drivers now only use the new API, so removing the old one.
Change-Id: I716f18549d9f3efcbd47ef51ca371d37e4a5f3df
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-15-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 2ede55468ca8cc236da66579359c2c406d4c1cba
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Replacing the old "cmd" and "sync" callbacks with an
implementation of struct ucsi_operations. The interrupt
handler will from now on read the CCI (Command Status and
Connector Change Indication) register, and call
ucsi_connector_change() function and/or complete pending
command completions based on it.
Change-Id: I9dfdc70b10544d6e65a0d289491be7cd9232e4af
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-14-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: e32fd989ac1c45f993fbe89ad0a89aa9ea6993d2
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Replacing the old "cmd" and "sync" callbacks with an
implementation of struct ucsi_operations. The ACPI
notification (interrupt) handler will from now on read the
CCI (Command Status and Connector Change Indication)
register, and call ucsi_connector_change() function and/or
complete pending command completions based on it.
Change-Id: Ia7c8e9e87f23ce6a70a657bf0e053345caf543cc
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-13-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: f56de278e8ec963637995944156527162dcf3021
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Adding more simplified API for interface registration and
read and write operations.
The registration is split into separate creation and
registration phases. That allows the drivers to properly
initialize the interface before registering it if necessary.
The read and write operations are supplied in a completely
separate struct ucsi_operations that is passed to the
ucsi_register() function during registration. The new read
and write operations will work more traditionally so that
the read callback function reads a requested amount of data
from an offset, and the write callback functions write the
given data to the offset. The drivers will have to support
both non-blocking writing and blocking writing. In blocking
writing the driver itself is responsible of waiting for the
completion event.
The new API makes it possible for the drivers to perform
tasks also independently of the core ucsi.c, and that should
allow for example quirks to be handled completely in the
drivers without the need to touch ucsi.c.
The old API is kept until all drivers have been converted to
the new API.
Change-Id: Ica25b44b228a96adbc2bd397d74978db6074c82e
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-12-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: bdc62f2bae8fb0e8e99574de5232f0a3c54a27df
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration.
Change-Id: I51ad090a7551096558f921cf5f347d4871ea769f
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-7-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 6df475f804e62887f5d2132832ecabe6e596cd1c
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration. After this there
is not need to keep the capabilities stored anywhere in the
driver.
Change-Id: Ib7bd4d899925522dbea297e25a50d8bdd3aa79e2
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-6-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 1007dda3be1c9f924746f892c094219be250928e
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration.
Change-Id: I6eb7c3e87c8704e4d9ccae1d6e615bb1e492fd81
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-5-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 00ec21e58dc63dd899a1e1cb3f1d44fa18ca22dd
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Introducing struct typec_operations which has the same
callbacks as struct typec_capability. The old callbacks are
kept for now, but after all users have been converted, they
will be removed.
Change-Id: Idfad5265f42ee2fcf6dbd0e109ed4f98b7563cb0
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-4-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 46310e4dade2bc3b574d540e421e3aa9f32cfd5f
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Leaving the private driver_data pointer of the port device
to the port drivers.
Change-Id: Ib38c66e69a15904d5a8160312af6532f28712b67
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 8c127a42af89c39560a8c5bd5accadaaa5741f8c
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Copying everything from struct typec_capability to struct
typec_port during port registration. This will make sure
that under no circumstances the driver can change the values
in the struct typec_capability that the port uses.
Change-Id: I6e94623300837afe5eedfc5a7d7214d61c147cff
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-2-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: ad772c39b2fbb24ff6104d73d14fc125d8f02711
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This change updates bits for testing on emulation platform.
Also, the change fixes spss_utils probe dependency on subsys-pil-tz.
Change-Id: I6924f73b3b69d3d4d57c989a1f8fd2217a2553ef
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Add support in I2C driver to make it a DLKM.
Change-Id: Ibd82b554c88efa7add8e4dcfd0a9feb609f60fba
Signed-off-by: Vipin Deep Kaur <vkaur@codeaurora.org>
Add new macro SNDRV_AUDIO_QGKI and userspace can
check if AUDIO_QGKI is enabled or not.
Change-Id: I8c0a8c350c41a5feb616a7ee9895d88f182c91dc
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Drivers may need to use the ASoC core function to
find out whether a particular component is already
registered with ALSA core or not.
Export the function so that drivers can use it outside
of the file.
Change-Id: I13e4a053de085974b0b53c392a9453e46f1aa66d
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Update clk-aop dummycc to support actual clock enable
which will allow apps to turn on QDSS clocks.
Change-Id: I5b2ab894b7d36e2ed78bbd82dc3ac6848c50ab8c
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
Remove CLK_ENABLE_HAND_OFF flag. Supporting this flag
will bring in clock framework change to handle or update hand off
flag during clk core init and clk tree unused calls.
Earlier CLK_ENABLE_HAND_OFF was added to gain performance
optimization by avoiding multiple AOP requests to enable qmp clocks.
If necessary, similar optimization can be supported with an
explicit proxy vote that is not removed until sync-state.
Currently QDSS driver can vote on the qmp clks as necessary.
Change-Id: I055520995a35ea4f76e0840788957e454f1b7926
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
Add dynamic loading of modules support to this driver.
Change-Id: Ic5d39b17c7089f092007347c844746a6e0833944
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
Add USB QMP DP Combo and UNI PHY registers definition available
on Lahaina.
Change-Id: Ied3db1480d16c659ebe6e8e6662b0c49bde9020f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
SPI config registers for newer SoCs need not be done through secure
firmware. Remove support for dependent SCM APIs.
Change-Id: Ic67c808b1d74033a4f5e480f7af1f9d317a60499
Signed-off-by: Lina Iyer <ilina@codeaurora.org>