Commit Graph

16 Commits

Author SHA1 Message Date
Weiyin Jiang 90ac1ea515 post_proc: return proper volume in reply data for offload effect
Since EFFECT_FLAG_VOLUME_CTRL flag is set in non offload effect
implementations, EFFECT_CMD_SET_VOLUME should be handled in the same
manner as AOSP effect bundle.

In order for volume control to work, return the received volume in the
reply data.

CRs-Fixed: 2033812
Change-Id: Iee4cd3b80c1470034a208f0c5a014f10042a1ce2
2017-04-14 01:15:08 -07:00
Dhananjay Kumar f7026ef71b post_proc: fix inconsistency in virtualizer state from set_strength call
- Virtualizer is getting applied just by setting strength even though
  it was kept disabled by client.
- Enable/disable from strength context is not able to track state set by
  client, since internal state may not be same as one set by client.
- Add a separate variable to track state set by client which would help
  avoid going into any such inconsistent state.

Change-Id: I4985b2d12dc0ee3f62089423e3a71d530f66027c
2015-12-15 12:18:04 +05:30
Weiyin Jiang c8082d9c9c post_proc: explicitly disable virtualizer module if strength is 0
0 stength in DSP virtualizer is not equivalent to disable state as down
mix is still happening for multichannel inputs.

For better user experience, explicitly disable virtualizer module when
strength is 0.

Change-Id: Ic2884ac7010e4f835df871719d546c0c05173f4b
CRs-Fixed: 872772
2015-07-23 01:23:09 -07:00
Weiyin Jiang b64b7dd302 post_proc: add support for virtualizer capability query
Add extra virtualizer interfaces to keep align with aosp design.
Extended capabilities include:
- Stub interface to allow querying speaker angles.
- Force set output device as specific virtualize mode.
- Query virtualize mode

Stub function remains to be refined in sync with upcoming aosp
changes.

Change-Id: I3316f6d944db1c9954eda7643a5ce433defa1a6c
CRs-Fixed: 810294
2015-03-25 05:21:34 -07:00
Subhash Chandra Bose Naripeddy e40a7cd4a7 post_proc: Add support for non-tunnel DSP audio effects
Add hw accelerator module to send PCM data to DSP and get
back the effects processed data.

Expose a wrapper library for AudioFlinger to be able use the new
module to apply the DSP audio effects.

Change-Id: I6ee30c11f04a97b35f12201fb61b8cd901921e68
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
2014-12-08 19:24:58 -08:00
wjiang 50b81f44df post_proc: Fix bassboost/virtualizer not disabled on speaker
When output is unintended device, there's no need to query enable_flag
before setting effect to disabled state. There's possiblity that
enable_flag is 0 as initialized value, which hinder effects from being
disabled.

Change-Id: Ib90c0ad0982dc8274129bb1bed7861e11670fbdb
2014-08-06 12:19:25 -07:00
Linux Build Service Account d4fbf85620 Merge "post_proc: disable Bassboost and Virtualizer for USB_ACCESSORY" 2014-05-12 23:44:32 -07:00
Dhananjay Kumar fd00bef969 post_proc: disable Bassboost and Virtualizer for USB_ACCESSORY
USB_ACCESSORY is not intended to be applied with SA+ bassboost
and virtualizer, so add into invalid devices list.

CRs-Fixed: 659191
Change-Id: If1f3421f9935ce624dc21895d9244d36d195b2bd
2014-05-06 16:49:09 +05:30
Dhananjay Kumar 574f392723 post_proc: improve logging
Make logs more meaningful and remove
ones not necessary.

Change-Id: I9562cf34a5dee406b1c0347a9004db08de9cd5df
2014-05-01 21:31:48 +05:30
Mingming Yin 67e34518ac hal: add missing flags for extended features
- add missing feature flags and definitions
  to compile hal without extended features
  enabled.

Change-Id: I8c04ae54e6597ed43de60b2d01ca333070aef675
2014-04-23 16:41:03 -07:00
wjiang 95d74c2232 post_proc: disable effect immediately when routed to invalid devices
Offload effect is still perceived when invalid output device is
connected. We should send disable command immediately once phone is
routed to unexpected device and forbid effect enablement during
temporary disabled state.

Change-Id: I26d4ccfd77037a879622b0437ae3916ff0071a69
CRs-Fixed: 630408
2014-03-28 00:17:08 -07:00
wjiang ee2ff9621d post_proc: disable Bassboost and Virtualizer for certain devices
WFD, Hdmi and usb audio are not intended to be applied with
SA+ bassboost and virtualizer, so add into invalid device list.

Change-Id: Ifcf9cdffb6657cf82bf903d16d4a3ae8471590f0
CRs-Fixed: 630408
2014-03-25 02:41:09 +08:00
wjiang d45948e215 post_proc: send ENABLE_FLAG directly to offload effect driver
Enable flag should be sent directly through offload effect driver to
adsp whenever bundle receives EFFECT_CMD_ENABLE. Otherwise enablement
will only take effect in adsp after subsequent parameters being set, and
that's not expected.

Change-Id: I5a8f936095b5667f0e04b9109b67eaa0faec3a69
2014-02-26 23:11:10 -08:00
Subhash Chandra Bose Naripeddy 090a2aa3f3 post_proc: include audio_effects.h from kernel exported headers
Currently, audio_effects.h header file is included with reference
to the absolute path. Instead, reference it from the kernel
exported headers.

Change-Id: I83880e0947e8b6a334b11c952fe8182b49ef5090
2014-02-20 12:33:11 -08:00
Amit Shekhar d02f2cd710 post_proc: Enable effects param in DSP to start effect
-During switch to tunnel playback, offload effects-flags remain
disabled. This stops effects being applied on tunnel playback.
-Send effects enable params to DSP to start effects during switch.

Change-Id: Ibe1e50b41ca25b51537e4a0ad80dbd5184379133
CRs-Fixed: 593509
2014-01-17 16:00:31 +08:00
Subhash Chandra Bose Naripeddy 3eedc004e9 post_proc: Support effects in DSP for tunnel mode playback
Add interface to support configuring equlaizer, bass boost,
virtualizer and reverb effects in DSP for tunnel mode of
playback.

Change-Id: I9a93ad6136c4de06df5136967908b4e888dae44f
2013-11-29 01:25:46 -08:00