Commit Graph

137 Commits

Author SHA1 Message Date
LuK1337 18aceede84 Merge tag 'LA.BR.1.3.6-03910-8976.0' of https://source.codeaurora.org/quic/la/kernel/msm-3.10 into HEAD
"LA.BR.1.3.6-03910-8976.0"

Change-Id: I16643fc055aa2965fe5903396a8e5158c42cf1bc
2017-05-26 13:28:48 +02:00
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Alexy Joseph 367fab472d ASoC: qdsp6v2: Remove Eagle code
Eagle driver is not in use any more.
Remove the code and associated calls
to it.

CRs-Fixed: 1103106
Change-Id: Ice5333861beda9538f0783b70b3267523d16fd2b
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2017-04-11 19:13:47 +05:30
Xiaojun Sang f50da43b79 ASoC: msm: qdsp6v2: set pointer to NULL after free
Pointer after kfree is not sanitized.
Set pointer to NULL.

CRs-Fixed: 2008031
Change-Id: Ia59a57fcd142a6ed18d168992b8da4019314afa4
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2017-03-30 16:53:52 +05:30
Laxminath Kasam d990217def ASoC: msm: add support for AVS 2.7 in native drivers
In Q6 asm and afe drivers, add API support
for AVS 2.7. Update compress driver to use
ASM volume gain compatible to verion used

Change-Id: I152a3410c99cfa37dca0eadb30b97f121f5d0a89
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Divya Narayanan Poojary <dnaray@codeaurora.org>
2016-11-14 18:46:24 +05:30
Pradosh Das 571b43a792 Merge commit '4742aa9efad673157273b07095ac1070dd2f02ea' into HEAD
Conflicts:
        drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c
        sound/soc/msm/msm8952-slimbus.c

Change-Id: If4516c52837e61afda301496b9053cb44ea59dd9
Signed-off-by: Pradosh Das <prados@codeaurora.org>
2016-07-26 12:02:09 +05:30
Ramjee Singh 4615ac6e00 ASoC: open ASM session with 24 bit for 24 bit playback.
For 24 bit playback decoder is opened with 16 bits per sample, So
decoder output is 16 bit only.
Set bits per sample to 24 if codec format is SNDRV_PCM_FORMAT_S24_3LE.
Set bits per sample to 16 as default value in capture prepare use case.

CRs-Fixed: 1035154
Change-Id: I14271b17441308f8ec6dfaea566c01887d1233f4
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Signed-off-by: Ramjee Singh <ramjee@codeaurora.org>
2016-07-08 10:56:37 +05:30
Ben Romberger bccff9608d ASoC: msm: qdsp6v2: Change audio drivers to use %pK
Change all qdsp6v2 audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.

Change-Id: I7baa9f127266726fecf9238167a1e0128a258847
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Signed-off-by: Surendar karka <sukark@codeaurora.org>
2016-06-28 00:42:15 -07:00
Manish Dewangan 3fbc74ea17 ASoC: msm8x16-wcd: add support for packed 24 bit.
Changes to support packed 24 bit (SNDRV_PCM_FORMAT_S24_3LE).

CRs-Fixed: 1011048
Change-Id: I5c49091d6bbff98ed8665446fffdba08446073cd
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
2016-06-03 04:06:56 -07:00
Manish Dewangan db1c78108c ASoC: msm: qdspv2: add support for MULTI_CHANNEL_PCM_V3 command
Driver changes to use ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3
command. This command supports playback/record of both 32 bit
(24 bit data in 32 bit word) and 24 bit packed. Update platform
drivers to this for SNDRV_PCM_FORMAT_S24_LE record and playback.

CRs-Fixed: 1011048
Change-Id: I6f98bf3402a737bc21daff33b13b137850a690ea
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
2016-06-03 04:05:35 -07:00
Weiyin Jiang 29bf42e49d ASoC: msm: audio-effects: fix stack overread and heap overwrite
Fix overwrite of updt_params allocated in heap, and stack overread
where param pointer is passed from user space.

CRs-Fixed: 989628
Change-Id: Ida8bdb7da2fcb97023dce3b6eafe4b899a51cb66
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2016-05-23 02:34:21 -07:00
Dhananjay Kumar 04eb413627 ASoC: msm: fix indefinite wait in compress drain
In compressed driver streams might get stopped while
ioctl drain is started but not completed, since buffers
are drained in multiple stages when gapless mode is
enabled.
Check stream state before issuing wait commands to
prevent waiting for drain ack on stopped streams.

Change-Id: I606639c103a7aed90dd9a4561fa6dffc3d4c3822
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2015-11-18 20:01:25 +05:30
Ben Romberger 3740696958 ASoC: msm: Interrupt events in compress free
Interrupt any wait events during free of the compress driver
and move spinlock unlock to after the ASM client is freed.

Change-Id: Idb865ebbb47b86ac32043ba4562053d3f9795b4d
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2015-10-13 23:30:18 -07:00
Linux Build Service Account e6b422e80d Merge "ASoC: msm: qdsp6v2: Handle additional codec specific metadata" 2015-08-12 07:35:21 -07:00
Chaithanya Krishna Bacharaju 73d5881ce0 ASoC: msm: qdsp6v2: Handle additional codec specific metadata
Codec specific  metadata is sent only for first stream in gapless
playback. This causes incorrect configuration to be set for second
stream and distortions are observed due to framedrops in adsp.
Add support to send codec specific format during start of
next stream in gapless.
Add bit rate to wma codec data structure as it can vary between
streams in gapless.

Change-Id: I39f34ea1addff720612fe3e06257e7d75889e574
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2015-08-10 08:57:45 +05:30
Dhananjay Kumar 7a5fe10799 ASoC: msm: fix integer overflow for long duration offload playback
32 bit variable is used for storing number of bytes copied to DSP,
which can overflow when playback duration goes beyond 24 hours.
Change data type for this variable to uint64_t, to prevent overflow
and related playback anomaly.

CRs-Fixed: 877677
Change-Id: Ie4dfa630cf89559bb784d4712c52526665baeca6
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2015-08-08 04:55:24 -07:00
Eric Laurent 49401d906e ALSA: compress: change the way sample rates are sent to kernel
The usage of SNDRV_RATES is not effective as we can have
rates like 12000 or some other ones used by decoders.
This change the usage of this to use the raw Hz values
to be sent to kernel

Bug: 17398311.

Change-Id: I970149a0d80b7f3e3c574acdc1a1004ebbd2b92b
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: I8d5f460b0f5e683f83e43fcce228d3df1835b6cf
Git-repo: https://android.googlesource.com/device/lge/hammerhead-kernel
Signed-off-by: vivek mehta <mvivek@codeaurora.org>
2015-07-23 18:41:18 -07:00
Chaithanya Krishna Bacharaju 9f4df76812 SoC: msm: qdsp6v2: Enable gapless for pcm offload
Enable gapless for PCM offload format playback.

Change-Id: Ia010c96511f3e9208a00aa2896c4b63faa8a1505
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2015-07-20 00:39:52 -07:00
Dhananjay Kumar 7a147d192e ASoC: msm: qdsp6v2: enable gapless for FLAC offload playback
Enable gapless for FLAC offload playback.
Recalculate partial drain delay based on flac min block size
to avoid incorrect drain delay for FLAC format.

Change-Id: I7127c065104de174296fc74f0df004266526f355
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2015-06-28 23:54:59 +05:30
Dhananjay Kumar 75b6d868fb ASoC: msm: qdsp6v2: fix incomplete playback issue for non-gapless formats
Fix data loss on auto switching of playback to next clip
when current playback format is not having gapless support
in compressed driver.
Media playback complete event is sent to framework on completion
of partial drain, this is supposed to be before actual renderer
EOS by duration equal to value of PARTIAL_DRAIN_ACK_EARLY_BY_MSEC,
but due to uninitialized frame size for non-gapless formats this
duration calculated is inaccurate and sometimes triggers drain
completion too early, leading to premature teardown of playback
session.
Fix this by disabling gapless on formats not having valid gapless
parameters.

Change-Id: I7f70a6fc17cc9c339ea754fd21aae6865355bef2
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2015-06-03 19:55:11 +05:30
Preetam Singh Ranawat 06ccbcae80 ASoC: msm: qdsp6v2: add error handling on write done during partial drain
If there is any error on write done event during parital drain,
 compress driver does not return from partial drain and playback
 does not move to next clip.
 Add error handling in compress driver to return from partial
 drain on write done error.

Change-Id: I5f0c1f01d51185acf04837fc7380a1cb5a07bca9
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
2015-05-28 13:14:44 +05:30
Linux Build Service Account c9da675fe0 Merge "ASoC: msm: qdsp6v2: add support for ALAC and APE offload" 2015-05-06 11:37:54 -07:00
Linux Build Service Account c2bbec4258 Merge "ASoC: msm: qdsp6v2: fix wma gapless failure" 2015-05-04 00:57:48 -07:00
Weiyin Jiang aaae244d56 ASoC: msm: qdsp6v2: fix wma gapless failure
Current stream id is sent for next track in gapless playback use
case by fault, thus causing abnormality. Instead, we should send
the stream id of next track together with media format block.

Change-Id: I90d05f36f02c9d23dead8214d1eab2e9fc3fde0c
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2015-05-01 21:39:35 +08:00
Satya Krishna Pindiproli c67115d387 ASoC: msm: qdsp6v2: add support for ALAC and APE offload
Add ALAC and APE to supported offload formats and send media
format block for both formats through compress driver.

Change-Id: I22b7cf38684250d2f8d6f9aefcd43452bb18e7f9
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
2015-04-30 20:11:44 +05:30
Fred Oh 237f9bfa26 ASoC: msm: qdsp6v2: remove flush wait queue
ASM functions have same wait queue, it increases delay when compress
stream is closed.

Change-Id: I3513e8c04c1440b436f00c4834dc33ffe810fdc2
Signed-off-by: Fred Oh <fred@codeaurora.org>
2015-04-24 00:11:07 -07:00
Walter Yang e9950d9156 ASoC: msm: qdsp6v2: Add Vorbis in compress offload path
Vorbis tunnel-mode supports are added to compresse driver.
It allows user-space application to decode vorbis audio stream
through QDSP6.

Change-Id: Ie374209007b14538837fb961b6a4b9e13519857f
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
2015-04-12 16:43:54 +08:00
Dhananjay Kumar 657ac3c64d ASoC: msm: Add support to enable PBE in DSP
Add interface to support configuring pbe effects
in DSP for offload playback.
PBE provides BassBoost support on small devices
like handset speaker.
Handset speakers are too small to produce proper
Bass, hence PBE is introduced, which adds effect
similar to BassBoost but suitable for small devices.

Change-Id: Ic66f3073cb259c8ef593a1ad6aa06d14efbfb058
Signed-off-by: wjiang <wjiang@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2015-04-06 14:27:15 +05:30
Linux Build Service Account 0925dc4962 Merge "Merge tmp-61c3cde into msm-3.10" 2015-03-21 21:52:56 -07:00
Vinod Koul 96eb9e0351 ALSA: compress: update struct snd_codec_desc for sample rate
Now that we don't use SNDRV_PCM_RATE_xxx bit fields for sample rate, we need to
change the description to an array for describing the sample rates supported by
the sink/source

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit b8bab04829ab190f71921d4180bda438ba6124ae)
Signed-off-by: Yuchen Song <yuchens@nvidia.com>
Change-Id: I6c2fa5a5034ec749e9d7a71c49a1108af2416848
Git-commit: 371e4108dd8b345b0144fa3ccc83d84d19918c20
Git-repo: https://android.googlesource.com/kernel/common.git
[imaund@codeaurora.org: Updated additional impacted assignments, present
  in msm-3.10 but not the source kernel tree]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2015-03-19 14:59:00 -07:00
Haynes Mathew George 190c02d032 ASoC: msm: qdsp6v2: Fix timestamp query during gapless transition
A query for the current playback position during a gapless transition
must return the most recent playback position until the first buffer
from the next stream has been sent to DSP.

Change-Id: I958a64e74995e6c1d8aaeda2c8cabf9a6d88c143
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
2015-03-18 21:04:24 -07:00
Fred Oh b66d6f29cb ASoC: msm: qdsp6v2: minimize error logs
If ALSA framework trys to list all controls, too many errors are printed
in some cases. Without allocating resources this error is expected.
Reduce error level to debug.

Change-Id: I65616e130cb35c5f373ec8aa2c55b9b6a136c9ba
Signed-off-by: Fred Oh <fred@codeaurora.org>
2015-02-18 18:18:33 -08:00
Amit Shekhar d8331c493d ASoC: msm: qdsp6v2: Handles additional flac metadata
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>
2015-01-28 17:54:08 -08:00
Dhanalakshmi Siddani adf99de36a ASoC: msm: qdsp6v2: post ENETRESET error during SSR
If drain is unblocked during SSR, ENETRESET should be returned.
But ENETRESET is overwritten with EINTR. Return ENETRESET error
instead of EINTR if return value is ENETRESET.

CRs-Fixed: 766541
Change-Id: I9105a0f61e945ff3629bc7de60a356251a219733
Signed-off-by: Dhanalakshmi Siddani <dsiddani@codeaurora.org>
2015-01-19 03:05:54 -08:00
Linux Build Service Account 58f8d8bef3 Merge "ASoC: msm: qdsp6v2: Fix asm bitwidth for next track in gapless mode" 2015-01-13 02:35:22 -08:00
Amit Shekhar 54f0b7651e ASoC: msm: qdsp6v2: Fix asm bitwidth for next track in gapless mode
asm is opened at fixed bitwidth 16 for next track in gapless mode.
This is causing noise when a 24 bit clip is played in single repeat
gapless mode.
By opening asm based on input stream bitwidth, asm is configured
at appropriate bitwidth.

Change-Id: Icc815d0a812fa17ae981cdeaf8e56142623deb79
CRs-Fixed: 778865
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2015-01-09 12:45:33 -08:00
Amit Shekhar b618ddd458 ASoC: msm: qdsp6v2: Handle adverse param value from user space
Improper assignment of passthrough parameter in user space results
in junk value in compress driver. By limiting the parameter to
allowed values, param assignment is fixed.
Default value is assigned for adverse case.

Change-Id: If137a8eaf54d83a00f0b188657f678d232982d81
CRs-Fixed: 774922
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2015-01-08 12:07:15 -08:00
Linux Build Service Account 99fbaeea15 Merge "ASoC: msm: qdsp6v2: Mask un-necessary DTS gain related error log" 2015-01-07 01:30:34 -08:00
Alexy Joseph 548d83288e ASoC: msm: qdsp6v2: Mask un-necessary DTS gain related error log
There is an error log related to DTS stream gain each time
compressed volume is set, that should not be present for non-DTS
playback cases. Removing it.

CRs-fixed: 776523
Change-Id: I2e6751d0262e3645cf120bc167cb09a6b12762ed
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2015-01-06 10:36:59 -08:00
Banajit Goswami a7fdaa96e4 ASoC: msm: qdsp6v2: Use EOS status flag for TRIGGER DRAIN
Update TRIGGER DRAIN function to use the EOS specific status
flag while waiting for ACK of EOS command.

Change-Id: I77bdad3e61ede3651c712d2d0d8b8a487b1a0a11
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2014-12-26 16:01:28 -08:00
Haynes Mathew George 02e1aeac80 ASoC: msm: Support multi channel volume in compressed driver
In compressed driver volume is applied to only left and right
channels in case of multichannel playback. Add support to
apply the volume to other channels such as center, left surround,
left rear surround, right surround and right rear surround
channels if available.

This change is a port of Ib8a4c1051e2d1505ca680de8a28b7f25d5d23000

CRs-Fixed: 766193
Change-Id: I1426bb71ca125e691d3ef71d672e4a2bf4d58211
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
2014-12-08 10:43:56 -08:00
Linux Build Service Account ce2d2b12b6 Merge "ASoC: msm: qdsp6v2: Unblock EOS on reset event callback" 2014-12-06 21:58:29 -08:00
Sridhar Gujje ec7cc5f1e4 ASoC: msm: qdsp6v2: Unblock EOS on reset event callback
Issue: When SSR command is issued in the end of stream of
compress offload playback, ANR is seen in music app. This
is because EOS is waiting indefinitely and will not return
since ADSP is dead in this case.

Fix is to unblock EOS on reset event callback from DSP.

Change-Id: Ifc379360b0ba7c589c3e2dddb7b2a3c712af7fb0
CRs-Fixed: 731606
Signed-off-by: Divya Narayanan Poojary <dnaray@codeaurora.org>
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2014-12-06 15:28:01 -08:00
Linux Build Service Account cf1e19ab6e Merge "ASoC: msm: Add support to enable DTS HPX and SA+ exclusively" 2014-12-06 14:37:45 -08:00
Alexy Joseph e6f5c00aa6 ASoC: msm: Add support to enable DTS HPX and SA+ exclusively
Add support to enable DTS HPX and SA+ modules exclusively when
both the modules are part of a single ASM topology in NT mode.

Change-Id: I2a90e9e1cd6e2f4d915d0c55a5a67a7abc19f503
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2014-12-05 12:53:34 -08:00
Alexy Joseph 6762d3aa28 ASoC: msm: qdsp6v2: Fix DTS HPX Audio Effects Get Param
Handle DTS HPX get param for parameters of all data types and
check for overflow in get param compressed mixer kcontrol.

Change-Id: I12ed549e2d8187def2d33ca7aef24e2658b198e0
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2014-12-04 12:23:11 -08:00
Jitendra Naruka 2b822911df ASoC: msm: Integrate Eagle framework to support HeadphoneX 1.1
Add support to integrate the Eagle framework for DTS Headphone:X
audio post processing feature v1.1. Include DTS_EAGLE config for
8994 target to build the feature. It uses hwdep node to receive
required processing parameters from userspace.

Change-Id: I07cea22aa0324b0042353174a7c96e2b98a37b4b
Signed-off-by: Jitendra Naruka <jitendra.naruka@dts.com>
[alexyj@codeaurora.org: fix inclusion of header file
 msm-dts-eagle.h in msm-dts-srs-tm-config.c, resolving
 trivial merge conflicts]
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2014-11-30 01:03:59 -08:00
Linux Build Service Account 312302265b Merge "ASoC: msm: qdsp6v2: Unblock drain on reset event callback" 2014-11-24 02:57:43 -08:00
Banajit Goswami 88366bd33c ASoC: msm: qdsp6v2: set stream volume before starting it
Volume gains for a stream should be set before sending
RUN command to DSP. This will avoid any glitch in audio
which might occur because of rapid change in volume level
while setting up the appropriate volume for the stream.

CRs-Fixed: 753619
Change-Id: Ib9270929759852f671bf3677f6e4cc826997b76a
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2014-11-21 18:12:14 -08:00
Alexy Joseph 74ca83a95d ASoC: msm: qdsp6v2: Fix input and output channel mapping
For multichannel playback, fix default input and output channel
map to the ch mixer and add compressed driver mixer ctl to
receive the input stream channel map

Change-Id: I56d4da70274625304ba21a10b588d2f0869ca667
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2014-11-19 15:16:51 -08:00