Commit graph

565022 commits

Author SHA1 Message Date
Mayank Rana
f18c9be9d4 msm: usbaudio: Add check for NULL before dereferencing
kzalloc() and usb_ifnum_to_if() both APIs can return NULL. Current
code is not checking return value and derefencing which may crash
device if it is set to NULL. Fix this by checking return value
against NULL and handling the same.

CRs-Fixed: 562273
Change-Id: I0d2c910f43321e94fc447b19ae3e3207727e24f3
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:57 -07:00
Banajit Goswami
c336ae90fa ASoC: core: Remove sound card state check from read/write
Having sound card offline condition checks inside
register read/write functions will also avoid Asoc
cache writes. However, it is needed to update the
Asoc cache whenever user-space sends disable sequence
while sound card is in offline state. Remove the offline
check condition from ASoC read/writes and let the codec
driver take care of not sending bus read/writes if sound
card is in offline state.

Change-Id: I960b85a277a28dd05eb919c1c6abf7aa32a45265
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:56 -07:00
Sudheer Papothi
a73f468d5e ASoC: pcm: update the start-up sequence for playback
Codec should be started before the CPU to ensure that there is no data
loss during playback.Current sequence enables the CPU first followed by
codec.This change updates the sequence prevent any playback data loss.

Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:10:55 -07:00
Anish Kumar
f1031ca0f7 ASoC: pcm: increase the hostless buffer size
PAGE_SIZE buffer is not enough in all use cases.This
limits the amount of buffer that can be passed from
userspace. Not increasing this causes failure in pcm_native
when rules are checked against all hw_params passed
from userspace.

Change-Id: Iddc280f78d54a1959be8718055bdb5ef0270653c
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
2016-03-23 20:10:54 -07:00
Anish Kumar
80e8ef2c04 ASoC: pcm: Add support for fixup callback
Fixup callback is added for dai's which
do not follow the FE and BE convention
and is directly controlled by userspace
such as hostless dai's. This will restrict
the hw_params based on what is supported by
hardware rather than blindly setting what
is given by userspace.

Change-Id: I401c70ab5de1df10363ec808cb68f72d8d74af96
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
2016-03-23 20:10:54 -07:00
Sudheer Papothi
d57ab70296 ASoC: dapm: mark dapm_kcontrol_get_wlist as global function
dapm_kcontrol_get_wlist() function needs to be called from
driver other than the soc-dapm.c file itself. Mark this
function as global function, so it can be accessed from
other drivers.

Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:10:53 -07:00
Abhimanyu Kapur
6aa90dc7dc sound: pcm: fix compilation warnings in snd_pcm_add_volume_ctls
Use explicit char* casting to fix compiler warning.

kernel/sound/core/pcm_lib.c: In function 'snd_pcm_add_volume_ctls':
kernel/sound/core/pcm_lib.c:2674:3: warning: passing argument 1 of 'snprintf' discards 'const' qualifier from pointer target type
   snprintf(knew.name, size, "%s %d %s",
   ^
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-23 20:10:52 -07:00
Aviral Gupta
6f88ba1a69 ASoC: compress: propagate the error code from the compress framework
Propagate the error code from the compress framework for the timestamp
query. This error code will be used by the client to handle the
error case scenarios gracefully.

CRs-Fixed: 683288
Change-Id: I68ad14d52327dd0156531fe8d17ac54ba110fdf6
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
2016-03-23 20:10:51 -07:00
Damir Didjusto
583170e962 ASoC: msm: qdsp6v2: Cleanup of compress offload drivers
Clean up the format specifiers for compress offload drivers
and add compat ioctl support

Change-Id: I0829830336ec62c66658d6a5199d73b61249f791
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:50 -07:00
Banajit Goswami
c58f710d7d ALSA: compress: use mutex in drain
Since we dont have lock over the function, we need to acquire mutex
when checking and modifying states in drain and partial_drain handlers

Change-Id: I3f8af90a226b772492fb6e09c625ebedc8ebfeb5
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: bab68b886fb87ee82a3e7d86d54f7eaa025950ef
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:49 -07:00
Banajit Goswami
5200617101 ASoC: compress: revert some code to avoid race condition
Revert some changes for compress offload path to avoid race
condition in drain and paartial-drain cases.

Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:48 -07:00
Eric Laurent
575eeabce9 ALSA: Compress - dont use lock for all ioctls
Some simple ioctls like timsetamp query, capabities query can be done anytime
and should not be under the stream lock. Move these to
snd_compress_simple_iotcls() which is invoked without lock held.

While at it, improve readblity a bit by sprinkling some empty lines.

Change-Id: Icc8ffdadd565c635f6a95e7e5bdda76257f24ea3
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: 6a44374b8b92e9946dc1e5c15c2a11003aa859b1
Git-repo: https://android.googlesource.com/kernel/msm
[dhakumar@codeaurora.org: resolved merge conflicts]
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:47 -07:00
Liam Girdwood
8236e4d497 ALSA: compress: Add snd_compress_free()
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>
Git-commit: b2ebfd20ecb255b8e575ea8b6fad8d1affc2ea77
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:47 -07:00
Krishnankutty Kolathappilly
280e00c01d ALSA: compress: Memset timestamp structure to zero.
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>
2016-03-23 20:10:46 -07:00
Eric Laurent
fea50d9677 ASoC: msm: handle write done events in pause state
If a write done event is received when the compress driver
is in paused state, treat it as an underrun.

Change-Id: I56ca867983b9139c04d135276da7344ac912065e
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: 6b9c3272087127fda41ed65ee7f8536ad9748383
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:45 -07:00
Eric Laurent
b6125c4081 ASoC: msm: handle partial writes in compress driver
Compress driver might have to deal with arbitrary sized writes
in the middle of playback. To deal with it, accumulate fragment_size worth
data before sending to the DSP. Use the drain trigger to push any
pending buffer to the DSP.

Change-Id: I8d95a9945076142f16adb99a295f6a9e84039cbb
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: 6ac9bb553c1285266b2ac28800abec240cd76e17
Git-repo: https://android.googlesource.com/kernel/msm
[dhakumar@codeaurora.org: resolved merge conflicts]
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:44 -07:00
Eric Laurent
106989c13d ASoC: msm: compr_free(), check if EOS is going on before waiting
Change-Id: I760979aa6ab1e1e10f203d8da5c9720d145869d3
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: dddb29670e35ff0366f1f3dd7128b78872375f72
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:43 -07:00
Eric Laurent
5871bd83cf ASoC: msm: treat partial drain like full drain
Change-Id: I3a9d7e7a62f0eefb941b68d0ee40657998549f76
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: 1f1aac6eee5e080e9bd70bd6d56da3b4435273e8
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:42 -07:00
Eric Laurent
21f7a9a5eb ASoc: msm: stub set_metadata ops function
Implement stub set_metadata ops function in compressed platform driver.
Just return no error and print debug log.

Change-Id: I45d69b5902b666abc12549aebf1bfc58824ab8ec
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: 902e5b4af87f4649f3b093dea0c5f59c87be0dc1
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:41 -07:00
Eric Laurent
db4af0b8e4 ASoc: msm: Send media format block for compress playback
Compress offload playback for AAC requires media format block to be
sent to the DSP before the bitstream can be decoded. Send this
as part of configuring the DSP

Change-Id: Ia22bc52aa0c136a1ee3f70a1e150458f8e4b6866
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: ed16e26a99b2b7904d0badae4bd0d30953873b9e
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:41 -07:00
Eric Laurent
0f65a07b71 ASoC: msm: Return proper error codes
Return proper error codes back to ASoc framework if
trigger operations like flush, drain fails or gets interrupted.

Change-Id: I3e2a259b55d5619eac6122083a8936a85700d657
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: 3a14d1af02c52d19d698732f3772f07843c90f6c
Git-repo: https://android.googlesource.com/kernel/msm
[dhakumar@codeaurora.org: resolved merge conflicts]
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:40 -07:00
Haynes Mathew George
5cd46b0657 Asoc: msm: compr drain/flush fixes
Add missing synchronization between handling of flush and
drain in the compressed audio driver.

Change-Id: I01b6d2c4fb372be483022d1c3430b9369dea34f7
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:39 -07:00
Eric Laurent
75e02a8b5f ASoc: msm: Change condition to get session time
Change condition to skip request for session time from DSP
during compress offload.

Change-Id: I0192b1f4059f09a32b8848c40e91eecf3dadf966
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: b31efc7e185f453da00cedbbad5b59c23560dcde
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:10:38 -07:00
Matt Wagantall
418255d9d9 ASoC: msm: Add compress audio playback code base
Support bits and pieces to make msm-compress-q6-v2.c usable
will be added in subsequent commits.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2016-03-23 20:10:37 -07:00
Banajit Goswami
547025290f ASoC: msm: qdsp6v2: Fix bit alignment in snd_codec params
Pointer member variables in snd_codec params break bit alignment and
causes data corruption. By changing these pointers to fixed size
array variables, the bit alignment is rectified. The size has been
set to max possible size. Also, remove params which are not required
anymore.

Change-Id: Ib87bbeb07b0df1ce8a81166b319976fe54c0f013
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:36 -07:00
Banajit Goswami
ab70671974 ASoC: dapm: Do not process cpu_dai widgets in bias changes
Kernel 3.10 has cpu dai widgets in the list of card
widgets in addition to platform and codec widgets.
This is causing a delay in device switch because
cpu dai widgets increase the number of widgets to be
processed for bias changes by a factor of five, however
they are not required to be processed.
Skip processing of cpu dai widgets to keep
the device switch latency at same level as in kernel 3.4.

CRs-fixed: 699168
Change-Id: I2d7d9e34dabf2cd25ec5fdd3e58be0fc657c0f6c
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:35 -07:00
Banajit Goswami
f48c0e7f53 revert: ALSA: compress: update struct snd_codec_desc for sample rate
This gerrit reverts the gerrit with the commit number-
      b8bab04829
    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: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:34 -07:00
Banajit Goswami
dba6519f3f include: increase allowed SW INPUT device ID from 15 to 32
Increase the Input device SW ID from 15 to 32. This is needed
to accomodate more input devices.

Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:34 -07:00
Sudheer Papothi
18e3977b99 ASoC: msm: Add compressed TX support
There is use case that the HDMI input goes through MI2S
TX interface to ADSP. Add compressed TX support for
this use case.

Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:10:33 -07:00
Banajit Goswami
0d879df1d3 ASoC: msm: qdsp6v2: Add FLAC in compress offload path
Add FLAC format in compress offload driver, and asm
module

Change-Id: I818ace8397e761b1acff7f9b2eab6e0103ed78c8
Signed-off-by: Apurupa Pattapu <apurupa@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:32 -07:00
Banajit Goswami
d3d2941f84 ASoC: msm: Add support for WMA DSP decode
WMA V9 and WMA Pro tunnel-mode supports are added to
compressed driver. It allows user-space application to
decode WMA V9 and WMA Pro audio stream through QDSP6.

Change-Id: I99407d00b618a627e6d762be9abea4abd2410b8b
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:31 -07:00
Banajit Goswami
64d6133b7f ALSA: compress: Update compress audio params
Add timestamp field to compress structure which indicates when
audio sample has been captured or needs to be rendered.

Change-Id: Ie61170c6645c71207e7df1c7176e0750e47590f8
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:30 -07:00
Banajit Goswami
35b7cb1228 ASoC: msm: Add support for AC3 and EC3 playback in tunnel mode
Dolby surround1-DS1 module supports both Dolby Audio processing - post
processing and Dolby digital plus decoder in DSP. Add support for
AC3 and EC3 playback in tunnel mode so that DS1 is integrated and
functional end to end.

Change-Id: Iacb46cdfded16c9a5a9227a6ff4e072c61df2be8
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:29 -07:00
Banajit Goswami
a3447d8ba1 ASoC: msm: Implementation of transcode from MP3, WMA to DTS compressed
Set the output path of the decoder output of the compressed format
to input of the pseudo port.
Output of the pseudo port is connected to the input of
DTS encoder.
Output of the DTS encoder is connected to the selected
output ports SPDIF, HDMI.

Change-Id: I3945e53fdfd57de47fb2209ddc81ba4623999028
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:28 -07:00
Banajit Goswami
826ba45578 ASoC: msm: DTS_LBR Passthrough Support
- Added DTS_LBR for Passthrough case in Compress Driver
- Added Graceful Error Handling for Unsupported Codec
  IDs in case of open_write_compressed.

Change-Id: Ifbecb02832a2599be0e3c73cc69381f87969d78a
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:28 -07:00
Banajit Goswami
d81e3e2ffd ASoC: msm: Add the support for the MP2 decoder
Support the MP2 as a format for the tunnel mode.
MP2 format to be decoded in the DSP.

Change-Id: I0d268a6ddb57b1470ee2c43449ac31520176232f
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:27 -07:00
Banajit Goswami
93e5937bda ASoC: msm : DTS security implementation
Receive DTS security modelId from userspace,
and supply to Q6 core service.

Change-Id: Ib50f3a81da60c92ceb5b521134cd3d1b6fb8e5cb
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:26 -07:00
Banajit Goswami
b07e54a825 ASoC: msm: Enable PCM capture in compressed driver
In the use case of HDMI input PCM capture, timestamp received from
DSP is required in userspace to propogate it on the playback path.
Timestamp mode propagation is availble through the meta data mode
in compressed driver. Add support for PCM capture in compressed
driver to address the usecase

Change-Id: I1221b8e99628dadc136df681619ed960ff7c5c1a
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:25 -07:00
Banajit Goswami
ae3cbed9e0 SoC: msm: Add support for meta data in compressed TX
There is a usecase where compressed data is sent over HDMI IN to
ADSP. The format of compressed is detected in ADSP and sent through
the meta data to compressed driver. Add support for meta data in
compressed TX for this use case.

Change-Id: Idbb18fe4a0ad828e9c2e9d7beec048b3cedf002d
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:24 -07:00
Banajit Goswami
533fdee777 ASoC: msm: DTS playback support
Compressed driver changes for the DTS support

Change-Id: I595e638da78cced02142f4ee430afb7357eb336c
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:23 -07:00
Banajit Goswami
3ba242643a ASoC: msm: Update the encode option and sample rate.
Populate the sample rate, encode option in wma config params.

CRs-Fixed: 367243, 367242
Change-Id: Ieeb9d302454d3935faa51cac77021e7c1d77012c
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:22 -07:00
Banajit Goswami
2fd1d08935 ASoC: core: Add support for no host mode
Add support for hostless PCM mode to support usecases
where PCM is not consumed by host.

Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:22 -07:00
Banajit Goswami
3cf2122061 ASoC: dapm: add macro for MICBIAS
Add a new DAPM Macro for MICBIAS widget for use in codec
drivers.

Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:21 -07:00
Banajit Goswami
6da5e2b946 ASoc: msm: Add AMR NB and AMR WB support for Voip
Use SPECIAL format for AMR. Add mixer control to
input mode and rate.

Change-Id: I8746d86ce323744995575a22b6128b39daaa3d13
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
[sboyd: Drop soc/msm parts]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:20 -07:00
Sudheer Papothi
abe342c13b ALSA: PCM: User contol API implementation
Introduced a new helper function snd_pcm_add_usr_ctls() to
create control elements representing the user control for each
PCM (sub)stream

Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:10:19 -07:00
Phani Kumar Uppalapati
6ba6d2e983 ALSA: pcm: check for integer overflow during multiplication
Channel info data structure is parsed from userspace and if
user does not set the no. of channels correctly, it could lead
to security vulnerability if we don't check for overflow when the
no. of channels is multiplied with pcm bit width. Add a condition
to check for overflow during multiplication.

CRs-fixed: 537818
Change-Id: Ib9631b6e45d77b39be2c27343d4aee3e9244d8cc
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 20:10:18 -07:00
Sudheer Papothi
f928605b0e ALSA: PCM: volume API implementation
Introduced a new helper function snd_pcm_add_volume_ctls() to
create control elements representing the volume for each PCM
(sub)stream.

Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:10:17 -07:00
Banajit Goswami
4ce9b377bb ASoC: core: Add compat ioctl support for listen driver
Change adds compat ioctl to listen driver for supporting 32 bit userspace
client when kernel is compiled for 64 bit.

Change-Id: Ie6a6fb1f2b6ea569e03b02bc520ef79b95c1009c
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:16 -07:00
Gopikrishnaiah Anandan
9772b42f48 ASoC: core: Support for compress ioctls
Compat driver should support compress ioctls when
COMPAT mode is enabled. Change adds support for
handling compress ioctls.

Change-Id: If7223ace326253240a1cd65bc9a111b8903977f1
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2016-03-23 20:10:16 -07:00
Sudheer Papothi
b45b11503a ALSA: pcm - add support for hostless audio
Allow some PCM devices to be hostless, i.e. there is no PCM data transferred
to or from the host CPU. This can be used to minimise power on systems since
the CPU can idle/sleep during the PCM device operation (e.g. a phone call
where the DAI is between a MODEM and DSP)

TODO: cleanup, look at adding a read/write blocker.

Singed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:10:15 -07:00