Currently lsm client data is deallocated when q6lsm_open() fails
which can cause memory corruption if lsm client data is accessed
after freed. Fix this issue by deallocating the client data only
in msm_lsm_close().
Change-Id: If048c26a0ffd8a346a28622183cbf2ba1e7e5ff3
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
CVE-2015-8951
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
Currently, metadata such as min/max block size is sent only for first
stream in FLAC gapless playback. This causes incorrect configuration
and, subsequently, framedrops in decoding of second stream and onwards
By sending these additional flac metadata, dsp receives stream-wise
metadata and decodes without dropping
CRs-Fixed: 781837
Change-Id: I02e8d44cf481159982d7451f0a79f26dbeafa230
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Add a new stream format for ultrasound proximity, which matches
the stream format in the aDSP.
Change-Id: Idd488b90ee082fcc58ff9d1dddf5087cba9af034
Signed-off-by: Lior Barenboim <liorb@codeaurora.org>
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 dependant data using hwdep nodes. Tomtom codec will
use aforementioned nodes to get calibration data from userspace.
Changed ANC calibration data size
Change-Id: Iace6e239029c7b0d93a5d61a0025ee551acf952f
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Pavan Chikkala <pavanc@codeaurora.org>
This is needed to allow include from
non soc folder.
CRs-Fixed: 689849
Change-Id: I753012d5ce9c5a788e75b4edf9b0099b58b30ec0
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
If a session is released during the SSR, then the memory unmap
command to DSP fails. This results in not releasing up the memory
block shared among apps and the DSP.
Fix by checking if the session has been invalidated during the SSR
and free up the memory during the close command.
Change-Id: I66251e624e5cc1abd816c2e4647997482b96c771
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
In rtac driver, while sending PP_Params for ADM copp
to DSP, token needs to be port_id whereas coppid is used.
Replace it with port_id to avoid failure in command
and timeout issue.
Change-Id: I77ab13ea14e8d6c25514bdeed24db37ef8113a75
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
All of the commands being sent to the DSP are using cmd_state flag
which can be overwritten when several commands are sent at the same
time. This results in Memory map command timing out. The change will
separate the memory flag from flags for other commands so that they
do not overwrite each other.
CRs-fixed: 673781
Change-Id: I61e059f402feb2c4e1e3dbed1825990456e78471
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
The memory that is not unmapped from DSP should not be used until
DSP clears it. Do not free iom memory if the DSP unmap has
failed.
CRs-fixed: 599780
Change-Id: I4ceae34e0f8d6381efc34ce642babbc30ca5e57e
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
To enable record with an RFECNS device use a 16K
sample rate
Change-Id: Ib9c6a4605f6a7f9e5f4c25280e0cc646459815fc
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Add a new driver to expose IOCTLs for userspace clients
to use to communicate directly with APR. This will allow
clients to directly interact with services such MVM, CVS,
etc
Change-Id: Icc75b01e19b757d7da81f143fc10f09185e92d31
Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
Add support for configuring ISO or ARIB stereo mixing
coefficients. This change introduces a function with which,
AAC multi-channel driver can configure ISO or ARIB coefficients
according to configuration done by the client.
CRs-Fixed: 623127
Change-Id: I00845bdef075631f93a0c65a335b7edb5d10497b
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
The Low Power Audio Sub-System supports internal bit clock of
256KHz. Add definition for the same for use in audio use-cases.
Change-Id: Idc92595bab37548aa2b2936b57dd6605fae9a1ea
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
SVA feature is used for user voice recognition and
activation. SVA can support multiple session on ADSP.
Curently upto 8 session are supported for SVA. This
change adds support for multiple sessions for SVA
in audio driver.
Change-Id: I1468353643df2aee229965e75859e2ee92e931b6
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Gapless compressed offload playback operates on two streams.
Platform driver needs to know the stream for which the command
callback is recieved. Use the token parameter in apr header to
pass the stream for ASM commands for which DSP expects stream and
session.
Change-Id: Ibd8f5b6a52f57ccf8cc7eea15eb460b2f9796120
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ALSA jack framework currently supports reporting only
one microphone. Add support to report presence of
second microphone to the userspace.
Change-Id: Id0df7aa222e547da3771f5d61092a959394c10dc
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add support for Low latency pcm and Ultra low latency pcm in
legacy pcm driver. A flag, part of device tree is used to
differentiate low latency and ultra low latency.
Only one ULL stream can be be connected to one ULL COPP.
LL stream can be connected to LL or regular COPP.
Change-Id: I2663ccdb641acc4117d1c0e424a57ed942e78f40
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Current implementation does not send audio calibration data to
DSP if the playback goes through low latency path. This results
poor quality audio on Speaker if it needs tuning.
Update ADM and RTAC drivers to send audio calibration data
to DSP and update properly in the QACT tool.
Change-Id: Ib4bf612ffd81b63a5e083cae7d7ded5b8239c582
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
It is found that during device switch from one backend
with one sample rate to another backend with another sample rate
the command to QDSP6 ADM which maps audio stream session to a
particular backend would not get carried out until pending
data of audio stream session from previous backend is either
read out or flushed. This scenario occurs when application
stops providing more buffers to retrieve captured data.
Remedy is to flush upon detection of rate mismatching.
Change-Id: Ia9d9a1819c6e21a44f2778185420ca43cca30258
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Vimal Puthanveed <vimalp@codeaurora.org>
Add ASM loopback driver. When audio path wants to use filters in DSP,
it will do a loopback in ASM. The new ASM loopback driver enables
the loopback.
Change-Id: I3ddfbf0a1be5b3b1d37b47b44d321ea7da93da83
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Vimal Puthanveed <vimalp@codeaurora.org>
A new Sync Gesture service has been added to userspace and QDSP6.
This service data format should be supported in the ultrasound
related definitions in the kernel.
Change-Id: I99dcaa74915c73ffb7329fb88226866b79a7ef73
Signed-off-by: Ravit Dennis <rdennis@codeaurora.org>
Add interface to support configuring equlaizer, bass boost,
virtualizer and reverb effects in DSP for tunnel mode of
playback.
Change-Id: I5ed578df1e1cb860734d2205c0895e82cfbdfbfc
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Add interface to support configuring equlaizer, bass boost,
virtualizer and reverb effects in DSP for tunnel mode of
playback.
Change-Id: Ie1512e340315302691327b6379a0935170dc57a7
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Update ASM driver to support for gapless audio playback in
tunnel mode.
Change-Id: Id1f25afef25b3636fb50dc08b5feb803150d1b59
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Currently operations on jack reporting take the CODEC mutex both to protect
the current jack status and also to protect the DAPM run which is triggered
on status updates. Since the addition of a DAPM-specific lock we no longer
need to worry about locking DAPM as it has its own finer grained lock so
create a per jack lock to take care of the jack status.
This is both cleaner where the jack isn't specifically associated with a
CODEC and clearer as it's much more obvious what the lock is protecting.
Change-Id: Ieb4b48ef9a59db812f79c093ef6e1e7068922694
CRs-Fixed: 567030
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
It has now become necessary to use a DAPM mutex instead of the codec
mutex to lock the DAPM operations. This is due to the recent multi
component support and forth coming Dynamic PCM updates.
Currently we lock DAPM operations with the codec mutex of the calling
RTD context. However, DAPM operations can span the whole card context
and all components.
This patch updates the DAPM operations that use the codec mutex to
now use the DAPM mutex PCM subclass for all DAPM ops.
We also add a mutex subclass for DAPM init and PCM operations.
CRs-Fixed: 567030
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Change-Id: Ica9e4654558fd181e1d85e70576fa262f76b4a78
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Compress platform driver implementation as per compress offload
ALSA framework.
Update the FE DAI link with the new platform name.
Update the device tree to include the new platform driver.
Change-Id: I611238b9dda6d591512736f238d45b43a4d911af
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Ensure the FE dpcm runtime_update is set properly in order
to trigger BE open, prepare and start.
Change-Id: I809e6d5fdffac547ea9b67b178df4e59a752af87
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
We are not currently freeing the compressed devices at module
unload time. This could be used to help, but more investigation
needs to be done to resolve this issue.
This patch is WIP.
Change-Id: I6cf8bcc56e4d446d83e9a0e63b79db3da378a901
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>