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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
The header size included twice which cause memory out of bounds.
Change-Id: I3a6f429283cfa28a1f3761f655c00b154e25f8ce
Signed-off-by: Fred Oh <fred@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>