Commit Graph

188 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 4e71469c73 Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD
Change-Id: Ie506850703bf9550ede802c13ba5f8c2ce723fa3
2017-04-18 12:11:50 +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
Linux Build Service Account 2a3b369fe8 Merge "ASoC: msm: q6dspv2: use correct variable type to store ION buff size" 2017-01-15 08:16:45 -08:00
Meng Wang e0245d5450 ASoC: msm: q6dspv2: fix potentional information leak
The heap buffer pointed to out_buffer and in_buffer are allocated
but uninitlalized. It may cause information leak.
Change to kzalloc instead of kmalloc when allocating kernel buffers
to avoid information leak.

CRs-Fixed: 1087020
Change-Id: I6f9b7a630158355a7f920dcf9cfffe537b1c6a85
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-01-10 22:51:29 -08:00
Banajit Goswami d12d85b91e ASoC: msm: q6dspv2: use correct variable type to store ION buff size
The size of the physical memory allocated for ION buffers
are of type size_t. Change updates the type of variables
sent to ION drivers to size_t to avoid any mismatch.

Change-Id: I3d33ed922b979652c64027e6f1c6f0a8ed4850a3
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2017-01-09 03:29:14 -08:00
Linux Build Service Account 5072fd3a9d Merge "ASoC: soc: prevent risk of buffer overflow" 2017-01-06 04:11:10 -08:00
Xiaojun Sang 1a0bf95d9a ASoC: soc: prevent risk of buffer overflow
In case of large value for bufcnt_t or bufcnt,
cmd_size may overflow. Buffer size allocated by cmd_size might
be not as expected.
Possible buffer overflow could happen.

CRs-Fixed: 1084210
Change-Id: I9556f18dd6a9fdf3f76c133ae75c04ecce171f08
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2017-01-05 02:06:52 -08:00
Xiaojun Sang a9e79718d1 ASoC: qdsp6v2: fix potential bug of infinite loop
When variable bufsz equals to 0, there would be infinite loop
at q6asm_audio_client_buf_alloc.
Fix the potential bug by checking bufsz beforehand.

CRs-Fixed: 1072280
Change-Id: I9640112b8945dc603e3af55fc1096bea9f7e6634
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2017-01-05 01:52:41 -08:00
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
Karthik Reddy Katta b7094c554f ASoC: msm: Add Buffer overflow check
The overflow check is required to ensure that user space data
in kernel may not go beyond buffer boundary.

CRs-Fixed: 1064411
Change-Id: I54c28a8942cf1a6a47a4e8272f3159b35d753ead
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
2016-09-22 12:24:46 -07:00
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
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 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
Haynes Mathew George db6966ecd4 ASoC: msm: qdsp6v2: pull mode playback and push mode record.
Implement platform drivers to support shared memory based
pcm playback and capture

Change-Id: I882c67ae1c3d950b98bd002ac384cc3a7e77874a
CRs-Fixed: 992798
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
2016-06-03 04:05:03 -07:00
Weiyin Jiang fc035bdcc2 ASoC: msm: audio-effects: misc fixes in h/w accelerated effect
Adding memory copy size check and integer overflow check in h/w
accelerated effect driver.

Change-Id: I17d4cc0a38770f0c5067fa8047cd63e7bf085e48
CRs-Fixed: 1006609
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2016-05-26 13:27:30 -07:00
Weiyin Jiang 68f1526ec9 ASoC: msm: audio-effects: misc fixes in h/w accelerated effect
Adding memory copy size check and integer overflow check in h/w
accelerated effect driver.

Change-Id: I17d4cc0a38770f0c5067fa8047cd63e7bf085e48
CRs-Fixed: 1006609
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2016-05-19 00:31:15 -07:00
Linux Build Service Account 5c0d40a8f2 Merge "ASoC: msm: qdsp6v2: update Configuration ID for multi AAC decoder" 2015-09-14 08:56:54 -07:00
Sharad Sangle 282a4e7c2b ASoC: msm: qdsp6v2: update Configuration ID for multi AAC decoder
Configuration ID for multi AAC decoder is changes from
ASM_MEDIA_FMT_DOLBY_AAC to ASM_MEDIA_FMT_AAC_V2, so make
changes accordingly while using multi AAC decoder

Change-Id: I7091b10cc5a8e9e04e35140926d6fa60ef4380eb
Signed-off-by: Sharad Sangle <assangle@codeaurora.org>
2015-08-05 18:14:32 +05:30
Fred Oh d0c3b150a1 ASoC: msm: qdsp6v2: fix incorrect packet size calculation
The header size included twice which cause memory out of bounds.

Change-Id: I3a6f429283cfa28a1f3761f655c00b154e25f8ce
Signed-off-by: Fred Oh <fred@codeaurora.org>
2015-07-29 11:49:05 +05:30
Weiyin Jiang 27ca1f2125 ASoC: msm: qdsp6v2: support multi-ch and samplerate > 48K for NT wma
NT and compress offload wma mode are exercised, we need to implement
changes in framework so that both have the same restrictions.

Meanwhile, we will remove any limitation in driver to support
multichannel and sample rate more than 48KHz wma playback in NT path.

Add extra option to support default channel mapping for both
back-speaker and side-speaker flavor.

CRs-Fixed: 870824
Change-Id: I639fb29a880f774502c8b005577cd9c62162c30d
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2015-07-19 22:25:41 -07:00
Laxminath Kasam d12e2ff436 ASoC: audio: add rate limit for prints to avoid excessive logging
In stability runs for 8952, observe excessive logging result
in watchdog bite due to audio prints. Add rate limit check
for prints in failure cases while SSR with 500ms duration.

CRs-Fixed: 842762
Change-Id: I4dc6b5c383b2478b73027557cd30eb1b47389961
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-06-30 12:15:36 +05:30
Linux Build Service Account c46ee79de5 Merge "ASoC: msm: qdsp6v2: add ASM get_path_delay API" 2015-06-25 02:24:38 -07:00
Kenneth Westfield aab68e74b3 ASoC: msm: qdsp6v2: add ASM get_path_delay API
Add q6asm_get_path_delay API, which calls the
aDSP ASM_SESSION_CMDRSP_GET_PATH_DELAY_V2
command and stores the result in the
audio client.  The aDSP command determines and
returns the current path delay for the given
audio session.

Change-Id: I813d202f1fdbed4e337c431d39868feab3a473b2
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
2015-06-18 14:11:51 -07:00
Satya Krishna Pindiproli 06b3a919d9 ASoC: msm: qdsp6v2: set proper channel mapping for ALAC format
Current channel mapping of multichannel ALAC clips is different
from the one the decoder expects due to which playback of
multichannel ALAC clips does not work in non-tunnel mode.

Set the pre-defined channel mapping according to the ALAC specification
for multichannel ALAC clips based on the number of channels for
decoding to succeed.

CRs-Fixed: 843138
Change-Id: I7c8b7cf8cc555b9667a1713d59999460e6251732
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
2015-05-29 12:10:18 +05:30
Linux Build Service Account 87d7716ac9 Merge "ASoC: msm: qdsp6v2: check audio client pointer before accessing" 2015-05-13 13:55:28 -07:00
Aravind Kumar 0004e51b4e ASoC: msm: qdsp6v2: check audio client pointer before accessing
In the registered callback for q6asm, we are checking if
the audio client pointer is valid and also, dereferencing it
to get the session ID even though it could be invalid or expired.
Return and exit immediately if the audio client pointer is
invalid.

CRs-Fixed: 832914
Change-Id: I96b722b584a4b5adf8a33891abd75a320e76ea25
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-05-11 15:44:28 +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
Laxminath Kasam d11c6a5da7 ASoC: change audio drivers to accomodate sid 33bit in 32-mode
In kernel 32-mode, SID address being 33bit is truncated.
To address this issue, update audio drivers to fetch
SMMU SID info from audio ion driver and fill the upper 32 bits
accordingly for 32-bit mode.

Change-Id: Ie2fa573def36d7b346d6a96249239ef1ecc7f8e0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-04-27 17:24:51 +05:30
Linux Build Service Account 241d1039a5 Merge "ASoC: msm: qdsp6v2: Correct buffer address data type" 2015-04-23 23:28:58 -07:00
Phani Kumar Uppalapati a7b2441c89 ASoC: msm: qdsp6v2: Correct buffer address data type
While retrieving the memory map handles from the list,
the buffer physical address is getting truncated by
errorneous type-casting from 64-bit to 32-bit. Because
of this memory map handle corresponding to that physical
address will not get retrieved from the list and hence
it never gets unmapped.

CRs-Fixed: 813971
Change-Id: I2914c8556286ba9106aad625e5878afb6bb56b09
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-04-20 00:00:06 -07:00
Satya Krishna Pindiproli 68484d9f67 ASoC: msm: qdsp6v2: add support for monkey audio codec
Add a new driver and configure ASM to support end to end
playback of APE clips.

Change-Id: Ic5e937879579785dd1efa9ca8a14201b2b4b2e77
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
2015-04-17 10:33:47 +05:30
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
Linux Build Service Account fa81fd2b48 Merge "ASoC: msm: qdsp6v2: validate audio client in callback" 2015-04-10 19:12:41 -07:00
Fred Oh 97d565f9e6 ASoC: msm: qdsp6v2: validate audio client in callback
In case of single stream multiple device(SSMD) use-case audio session is
freed on first EOS. There are some chance to crash when 2nd EOS event is
reached with some delay. This make sure return properly if audio client
is not valid.

Change-Id: I3711d8e039fc37e654ca5230f3dc8784c6dba071
Signed-off-by: Fred Oh <fred@codeaurora.org>
2015-04-08 10:42:21 -07:00
Satya Krishna Pindiproli 2d4d0aff69 ASoC: msm: qdsp6v2: support playback of ALAC clips
Configure ASM by adding a new driver to support end to end
playback of ALAC clips.

CRs-Fixed: 808940
Change-Id: Icae98e8b8bd79048165493dc413f335c42420acd
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
2015-04-07 17:05:59 +05:30
Alexy Joseph 35ebbf19be ASoC: msm: qdsp6v2: improve DTS Eagle driver for all possible i/p
Improve DTS Eagle driver to handle all possible inputs during
communications from user space.

CRs-fixed: 791160, 791162
Change-Id: I0d051b8439d85cf6b59d3e245b30051711cda84e
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2015-03-10 11:26:34 -07:00
Aravind Kumar ad074a8529 ASoC: msm: qdsp6v2: check ion alloc return value
The msm_audio_ion_alloc function returns a non zero
value when there is an error. Check this error and return
from the function properly.

Change-Id: Ib2c4c08850bce1f59de76a6b60be0b6b10d24dbd
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-02-26 23:30:14 +05:30
Linux Build Service Account bc79e2b83d Merge "ASoC: msm: qdsp6v2: reduce debug logs" 2015-02-07 01:20:22 -08:00
Fred Oh 1501521fb9 Asoc: msm: qdsp6v2: suppress q6asm callback logs
is_no_wait_cmd_rsp is called every q6asm_callback. De-grade to pr_debug.

Change-Id: Ic4b9442e49c07a4bab8b74d4080d3b714b0d590b
Signed-off-by: Fred Oh <fred@codeaurora.org>
2015-01-30 16:09:49 -08:00
Fred Oh b838d5cb7a ASoC: msm: qdsp6v2: reduce debug logs
q6asm_get_next_buf print too many logs if debug message is enabled. It
cause watchdog bark. Default log level to verbos.

Change-Id: Ifcfc88ae30916a2cc43d7806258ef8868e416cea
Signed-off-by: Fred Oh <fred@codeaurora.org>
2015-01-21 16:54:03 -08:00
Linux Build Service Account 42162e390a Merge "Asoc: msm: qdsp6v2: Use the same topology for next stream" 2015-01-18 23:44:31 -08:00
Preetam Singh Ranawat cfade7b501 Asoc: msm: qdsp6v2: Use the same topology for next stream
For gapless playback topology being set for next stream is not
the same topology used for previous stream.
Topology will not be null if driver is opening the next
stream using same session, so it can use same
topology for next stream.

Change-Id: Ie4206b31d9443338868c687e1dbce55140e7a86e
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
2015-01-18 20:50:06 +05:30
Linux Build Service Account 052d63be22 Merge "ASoC: msm: qdsp6v2: fix callback handling of removing silence cmds" 2015-01-15 12:07:37 -08:00
Fred Oh 96bbeed546 ASoC: msm: qdsp6v2: fix callback handling of removing silence cmds
Remove silence cmds don't have wait function so no need to wake up any
thread. Unnecessary wake_up cause the change of command order which ends
up with instability. In addition fix missing mutex_unlock after adm_open
failure.

CRs-fixed: 777738
Signed-off-by: Fred Oh <fred@codeaurora.org>
Change-Id: Id04cafb64a9859b75ba975523f4ef28e623f218b
2015-01-14 13:19:38 -08:00
Banajit Goswami 52a87923fa ASoC: msm: qdsp6v2: add support for any number of ASM buffers
Current logic in ASM driver supports CPU and DSP buffers only
when the number of buffers is power of 2. At times, the number
of buffers might need to be different than power of 2. Modify
the logic to find next available CPU or DSP buffer, even when
the number of buffers is anything other than power of 2.

CRs-Fixed: 771446
Change-Id: Ibda6e0843387f6286a75c1bf4dc2068b4c4e7e9b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2015-01-12 13:11:36 -08:00