Commit Graph

36 Commits

Author SHA1 Message Date
Linux Build Service Account d61b3cd707 Merge "hal: Mute other active streams while voice recognition is active" 2019-02-18 02:23:47 -08:00
kunleiz 70e5761630 hal: add support to check sva and audio echo reference
EC ref port can be simultaneously set and reset by
audio and SVA use cases. Synchronize enabling/disabling
of EC ref between sthal and audio hal by passing EC ref
enablement/disablement information to each other.
1. When closing input, EC ref does not stop if SVA EC ref
   is active.
2. Pass Audio EC ref status to STHAL, when stopping SVA,
   ensure EC does not stop if Audio EC ref is active.

Change-Id: I67f1f6316ea64e43a21cbf0add90d345a1108d3e
2019-02-15 10:54:49 +08:00
Quinn Male f605036ce8 hal: Mute other active streams while voice recognition is active
In order to protect voice recognition data from other clients
in audio record concurrency usecases, mute all active non voice
recognition input streams.

Change-Id: I1002726699902952c8b8568d57aa1cb6dfc2ad2b
2019-02-13 18:37:23 -08:00
Aalique Grahame 22e4910d3d audio: unify hal
Unify audio hal components

CRs-Fixed: 2380934
Change-Id: Iacafdc44d935de5f343240421a1572a0a3241bd0
2019-01-25 15:15:46 +05:30
Sidipotu Ashok aa4fa6a614 hal: add support for FFV get params
-Audio HAL to support FFV get_paramters via sound trigger
callback.

-FFV needs clients to pass down the SM handle info to get a few
paramerters with respect to the given SM handle but standard
get_parameters doesn't support kvpairs for input keys, it does
support for return of kvpairs, add support for a new delimiter
which will be used while sending keys in get_parameter.

-Enable Keep alive for Red Dragon

-Adjust volume gains based on the systems team tuned values

Change-Id: I96c7214b4a084568862e3550eaabbb9d51e253d9
2018-12-28 15:20:28 +05:30
Naresh Tanniru cb5b578917 Merge e1f65e84d3 on remote branch
Change-Id: I5cb17e69a3b1e4fa78b7a130cbabc8bc7b11932b
2018-10-15 17:00:56 +05:30
Jhansi Konathala 902fc41b69 hal: fix null pointer references and data initialization errors
- add null pointer check and initialize uninitialized variables

CRs-Fixed: 2312146
Change-Id: I5f260b327492e1373ed143dd8dcf243154fd7818
2018-09-27 00:46:37 -07:00
Dhananjay Kumar 03536d719e hal: soundtrigger: update stream status callback to include device info
Update soundtrigger stream status callback to include device info.
The device info included in status callback can be used by sthal
to select ec reference.

Change-Id: Ia5973ce287300bab4b505269829332e60cf9e7f4
2018-09-21 06:11:19 -07:00
Zhou Song 4623d7e395 hal: make event enum value to be uniform with sound trigger hal
Insert a new enum type in audio event type definition, this is
to keep the event type reported to sound trigger HAL to be
consistent with audio HAL.

Change-Id: Id6024cd22752665da91f0db97217df08e4091dfe
2018-07-11 17:18:07 +08:00
Zhou Song c1088ea941 hal: report battery status to sound trigger hal
Report battery status to sound trigger hal which is used to
determine performance mode or low power mode for SVA.
Also report active rx device to STHAL to select equivalent
echo reference.

Change-Id: If9633fefd3319cc5121e96c238c9de04d67efe35
2018-07-09 20:16:21 -07:00
Dhanalakshmi Siddani abf4a641f6 hal: Fix voice call tx mute issue during voice and sva concurrency
Tx mute is observed for voice call with SVA running in background as
STHAL disables the device enabled by AHAL as it gets intimation about
audio usecase after enabling device.
Fix this by removing prop version check in device status so that STHAL
pauses its session before audio usecase enables device.
Also add check for playback usecase in stream status to send playback
usecase info to STHAL.

Change-Id: I8e575ad7cd198b4367d78f5dbe318fc908f86caf
2018-07-06 04:00:35 -07:00
Dhanalakshmi Siddani 24e9ad5ca9 hal: Fix voice call tx mute issue during voice and sva concurrency
Tx mute is observed for voice call with SVA running in background as
STHAL disables the device enabled by AHAL as it gets intimation about
audio usecase after enabling device.
Fix this by removing prop version check in device status so that STHAL
pauses its session before audio usecase enables device.
Also add check for playback usecase in stream status to send playback
usecase info to STHAL.

Change-Id: I8e575ad7cd198b4367d78f5dbe318fc908f86caf
2018-06-15 14:47:20 +05:30
Dhanalakshmi Siddani 1062162e45 audio: Add Quad mic mixer controls and EC reference changes for FFV
- Add quad mic mixer controls in audio and sound trigger xmls files.
- Add changes to set EC reference device for FFV.

CRs-Fixed: 2225936
Change-Id: Ife05d9069db2880473f8e6d06ab284c011f935ae
2018-06-12 00:20:33 -07:00
Dhanalakshmi Siddani 57b014ee37 audio: Add get param support and resolve compile errors
- Add get param support in AHAL for Direction of Arrival and Channel
  index from STHAL.
- Correct feature flag enable syntax and resolve compile errors.
- Remove codec loopback and add afe loopback mixer controls in mixer xml.
- Update sound_trigger_platform xml file.

CRs-Fixed: 2225936
Change-Id: I2e477013977a03a599d6bb4a52c66b897e967219
2018-06-07 14:02:09 +05:30
Linux Build Service Account 0217adabac Merge "hal: Update STHAL about Voicecall usecase." 2018-05-10 03:15:31 -07:00
Vinay Verma addfa4a100 Fix VNDK Compilation Errors
VNDK restrictions doesn't includes standard headers by
default, add them explicitly.

Change-Id: Icafac6f07fcdf58fccaabde8d472509090fb3e6f
2018-05-08 05:17:02 -07:00
Revathi Uddaraju b46af6cf4f hal: Update STHAL about Voicecall usecase.
SVA detetions are happening during voice call in progress.
Because STHAL is not updated about the voice call usecase and hence SVA is
not being paused.

Fix this issue by sending callback to STHAL from AHAL.

Change-Id: I441aeec56fae5bcfbab3eed6697f08e6901024e6
2018-05-06 23:53:38 -07:00
Revathi Uddaraju 9f99ddd3e5 hal: Update STHAL about Voicecall usecase.
SVA detetions are happening during voice call in progress.
Because STHAL is not updated about the voice call usecase and hence SVA is
not being paused.

Fix this issue by sending callback to STHAL from AHAL.

Change-Id: I441aeec56fae5bcfbab3eed6697f08e6901024e6
2018-05-03 06:55:30 -07:00
Venkatesh Mangalappali bcc684ca31 hal: Avoid dereferencing null symbol pointer
Avoid a potential dereferencing of null symbol pointer returned from dlsym.

Change-Id: I92da03139c86f45d369e022ecae566be9dc236ea
2018-04-06 14:58:44 -07:00
Dhanalakshmi Siddani f133cc5c93 hal: send capture stream events to sound trigger hal
Instead of sending device enable/disable events, send use case
enable/disable events with use case type and device info to
sound trigger hal.
Sound trigger hal can decide to support the concurrent capture
based on the audio use case.
Also avoid compilation dependency on sound trigger hal proprietary
interface header file by maintaining interface APIs locally.

CRs-Fixed: 2173226
Change-Id: I7837523a31da3298fd817bb8355993f9861daca3
2018-02-15 15:07:50 +05:30
Surendar Karka 59c5107562 hal: start keep alive session to feed EC with silence data
FFV EC reference signal is fed from AFE RX port.
Start the keep alive session to write silence data to
RX port and feed the silence data to FFV EC.

Change-Id: I38b0396ef853493c9a176444dc803744be1c45bb
Signed-off-by: Surendar karka <sukark@codeaurora.org>
2018-02-01 13:22:36 +05:30
Manish Dewangan 6a36d00a9a audio: hal: dont specify absolute lib path in LE
-Absolute path is only needed  when lib is not present in default
 path (/usr/lib or /usr/lib64) but as LE uses default path,
 absolute path is not needed.
-This also avoid specifying two different path for 32bit and 64bit
 architecture.

Change-Id: I55c6d9edaebe374f9b2ad16ebe20fd4e9d0aef08
2017-10-23 02:04:30 -07:00
Dhananjay Kumar e6293dd5b4 audio: enable SoundMonitor to handle ADSP SSR events
Enable SoundMonitor in audio hal to handle ADSP SSR events,
do required cleanup and restore any active sessions gracefully.

Change-Id: I83270b7c12095e56a6677f41efe0f5618a27e0e5
2017-07-11 15:01:33 -07:00
Revathi Uddaraju 1eac8b0e2d hal: Add support for dynamic logging
Changes to support dynamic logging in hal

Change-Id: I315c919bd940d8ccdb9103eb06bf67c1e3ff3f4b
2017-05-29 03:20:20 -07:00
David Ng 06ccd87f4b Allow split system/vendor image configuration
Switch hardcoded system/vendor path to $(TARGET_COPY_OUT_VENDOR).  For
direct loading of files in code, switch from /system/vendor to
/vendor - relying on /vendor symlink for compatibility.

Change-Id: I96960f977f1ab74f266aa7a7937c760b6675ca54
2017-03-31 03:54:17 +05:30
Chaithanya Krishna Bacharaju e3d711e1df hal: Add support to set SVA execution mode
Pass SVA execution mode to sound trigger HAL received
as part of setparameters.
Add support for getparameters in soundtrigger and return
SVA execution mode status from sound trigger HAL when
queried.

Change-Id: I63c482920ee778beb806e3138c93e005e15ca897
2017-02-01 13:49:53 +05:30
Quinn male 73dd1fdb58 hal: send device connect, disconnect events to sound trigger hal
Relay the device connect/disconnect events to sound trigger hal
in order to support voice activation using mic devices other
than handset mic.

Change-Id: Id4b186269f6f39ebbba605f4819965365b33b7e7
2016-12-21 05:10:36 -08:00
Yamit Mehta a0d653afbd hal: Add Makefile and configure file for hal
Add Makefile and configure files for hal.
Change-Id: Ic4605a02a505d0be92faeed134060a7b254561e6
2016-11-25 20:42:25 +05:30
Shiv Maliyappanahalli 0e283d3b4a hal: Add abstraction for soundtrigger session
Soundtrigger implementation between Tasha and Tavil codecs is
different. Add a session abstraction so the underlying layer
can interpret the session based on the codec being used.

Change-Id: I341e1c5c84a93988eee002743093beb2b7398fd0
2016-08-16 17:24:36 -07:00
Satya Krishna Pindiproli f1cd92b17e hal: fix compiler warnings which are now treated as errors
With CLANG enabled and -Wall & -Werror being set in
LOCAL_CFLAGS, all warnings are treated as errors.

This commit fixes all the warnings most of which are
about unused variables and functions.

Change-Id: I32c6593fa0ad6a4fdca5dc8e6c76982a146a8bc6
2016-04-19 18:12:23 +05:30
Mingming Yin fd7607b86e hal: stop sound trigger buffering during close
If the framework doesn't call read before standby and closes the
record session, sound trigger buffering will not be stopped and
sound trigger hal continue buffering internally. Fix this by
stopping buffering during record session close.

Change-Id: I83941610b3152f26e5ae9c449dbb8f9846b266a2
CRs-fixed: 966060
2016-03-11 03:13:27 -08:00
Bharath Ramachandramurthy 76d2089ea9 hal: Read hotword data from sound trigger hal
If the input stream is reading the hotword data, get it from
sound trigger hal.

Change-Id: Iebbc0bf60be3bb12d752a1c905f71e9ea14fbf46
2015-07-10 19:21:52 -07:00
Bharath Ramachandramurthy 837535b957 audio: stop reading sound trigger lab data on SSR
While sound trigger lab data being read, if CPE SSR
happens the pcm read returns -ENETRESET. Instead of
updating the sound card sate, mark the sound trigger
state as inactive to avoid reading the lab data from
driver. Marking the session as inactive handle both
CPE and ADSP SSR scenarios where HAL is prevented
to read from kernel.

Change-Id: Id82eed597c01265a7d26f17e5ac3c5cd0e17adbf
CRs-fixed: 790726
2015-02-12 22:37:05 -08:00
Bharath Ramachandramurthy 5baa6a5f7f hal: fix race condition between sthal and ahal
When SSR happens the callbacks between sthal and ahal
are called within each context aquiring the locks resulting
in race condition. Fixed by removing lock before calling
the sthal callback.

Change-Id: I6cd88d25758f9c0a6ca39141df6629e2f8b6c0c5
2014-10-21 11:23:09 -07:00
Bharath Ramachandramurthy c694f8a5e0 hal: Pass multisession configuration param to STHAL
Sound Trigger App uses setParameters() API to pass the number of
sessions to be configured to STHAL.

Change-Id: I14abff49863d82178fb633c9a93af0cd02c83e2e
2014-09-25 16:15:12 -07:00
Ravi Kumar Alamanda 8fa6b1916a hal: support for sound trigger LAB and concurrency
Sound trigger lookahead buffering data is read through audio hal.
Also the audio hal has to inform sound trigger hal about concurrencies
and subsytsem restart events. Audio Hal uses proprietary interface
defined by sound trigger for communication with sound trigger hal.

Change-Id: Id344077b40b481a953769518f8a6ac0adc13b709
2014-09-10 16:35:16 -07:00