Commit Graph

57 Commits

Author SHA1 Message Date
Sidipotu Ashok e6f78cb2c6 hal: Changes to support true 44.1 Native playback
- add changes to support single BE mode on top of the
Double BE mode which is supported.

- support reading of version or mode from XML.

- add logic to switch between single and double BE
based on the mode in XML.

- define a new device for true native.

- add logic to read tasha codec version and allow
true native only for 2.0 version of codec

- enchance log msgs for better debugging.

Change-Id: I970487f16af32144ec26f967e8bfcb32d44d67a4
2015-12-28 05:00:00 -08:00
Xiaojun Sang 040cc9f842 hal: audio_extn: enable speaker protection for tasha
Add speaker protection support for wsa speaker.

Change-Id: I5468b2875d0fd028e5c32f25c15b5de0095e7007
2015-12-20 22:48:08 -08:00
Srikanth Uyyala a1e3235705 hal: update apptype configuration logic for recording usecase
General recording apptype is used for capture usecases

Change-Id: Ia90a3f05764be3acee21a3de55e94997bbe93b08
2015-11-03 18:47:03 -08:00
Banajit Goswami 20cdd21a6b hal: Add support to enable VBat feature
Add support to enable VBat feature. This includes required changes
to select VBat speaker devices for audio and voice usecases and
sending the VBat calibration data to codec driver.

Change-Id: I2234bee3cc4d6f16934a4b27ef9da21cde74bb48
2015-09-13 17:45:37 -07:00
Linux Build Service Account c53dd19afb Merge "Revert "hal: audio: add tz_names extn to support from audio platform_info xml"" 2015-09-09 21:39:23 -07:00
Linux Build Service Account 075e69ba9c Merge "hal: Add codec EC reference support" 2015-09-09 21:39:21 -07:00
Vidyakumar Athota b3cfd1313c Revert "hal: audio: add tz_names extn to support from audio platform_info xml"
tz_names support is added using key value pairs under
config params in audio_platform_info.xml.

This reverts commit 8225243c24

Change-Id: I5bee7225f945b31e3df9372d00aeb003c2092d8b
2015-09-08 14:58:55 -07:00
Ravi Kumar Alamanda 14b0f2d79b hal: update platform info parser to read key value pairs
Add support to parse platform specific configuration as
key value pairs from audio_platform_info.xml file.

Change-Id: Id1199f6f5cb3a060476f713a69b5de05f48815ce
2015-08-20 14:46:44 -07:00
Apoorv Raghuvanshi 924b3028b6 hal: Add codec EC reference support
- We need to set codec EC reference instead of MSM/AFE
  EC ref for Native audio usecase along with other
  usecases running on 48K port. In this scenario we
  will run two AFE ports, one regular port and the
  other port running at 44.1KHz and mixing done in codec.
  So set appropriate codec EC reference.

- One example of such usecase is VoIP over audio path
  and a 44.1KHz stream playback. But this change is generic
  enough to accommodate other possible usecases if any.

Change-Id: Ib980e36d111c1671303abe2b19341568d9fd2331
2015-08-07 17:32:42 -07:00
Linux Build Service Account 48a4d2bd52 Merge "hal: Add sound card update API" 2015-07-17 02:04:47 -07:00
Linux Build Service Account 5b0b06a127 Merge "audio: Re-initialize ACDB after SSR" 2015-07-17 02:04:47 -07:00
Linux Build Service Account 92d0231a84 Merge "hal: add interface to enable volume based audio calibration support" 2015-07-11 07:25:14 -07:00
Ben Romberger feca4b81f0 hal: Add sound card update API
Add API to notify platform when sound card
status is changed. Use function to reinitialize
ACDB-loader or resend common custom topology.

Change-Id: I59198f0ad8412ddc0d379b0c39a7807d6e22f4f7
2015-07-10 10:54:40 -07:00
vivek mehta a76401a7f5 hal: add interface to enable volume based audio calibration support
- expose new api from audio HAL that volume listner module will call
  to set volume calibration level

Change-Id: If74bf66d32def85022d79ccb9f84c3b85c8a2dc9
2015-07-07 16:11:03 -07:00
Ramjee Singh 203473ba27 audio: Re-initialize ACDB after SSR
- If Modem SSR happens during boot up, Audio HAL
  fails to initialize ACDB. It does not check the
  error from acdb_init and does not re-initialize
  when Sound Card is ONLINE after SSR
- Fix is to re-initialize ACDB after Sound Card is
  ONLINE

Change-Id: Icb7a7ca7bb682d55a3cc8f7b26dc0bf511c30a69
2015-07-07 12:35:15 -07:00
Mingming Yin 497419fcb8 hal: compilation fix for extended feature flags
- Fix compilation error for offload, Dolby,
  HDMI pass through, FLAC decoder, and hardware
  accelerated effects when extended feature
  flags are disabled.

Change-Id: I5b36d7668f63a396ed930d62c0337c2c3f311c95
2015-07-06 10:44:23 -07:00
Laxminath Kasam 8225243c24 hal: audio: add tz_names extn to support from audio platform_info xml
To add Speaker TZ names from audio_platform_info xml, add required
support.

Change-Id: Idd31ed9e7b7235245c3dda4ccb11b47762db5ee8
2015-06-22 17:19:52 +05:30
Apoorv Raghuvanshi 214921673e hal: native audio backward compatibility
- all changes for native audio backward
  compatibility and related
- add set parameters from UI
- enable dynamic device switching
- featurize the code
- various backend concurrency changes

Change-Id: Id0f824c4b4c033f42008a4e8868652c8f6fe5c42
2015-06-05 12:14:36 -07:00
Apoorv Raghuvanshi f59bb22e6d hal: Add support for Native Audio(44.1kHz)
- Changes for device/Usecase selection
- Add new and combo devices for headphones
- Combo device handling
- Add new backend and logic to handle multiple
  backends
- Remove hardcoded mixers and select them
  dynamically based on the device

Change-Id: I7207291f2c27da13ba0cc77c66de1144f4b9888a
2015-05-26 17:35:39 -07:00
Karthik Reddy Katta 508eca4954 hal: Add provision to select backend based on codec type
SLIMBUS_0 is the backend on 8952 external codec PLs.
Whereas TERT_MI2S is the backend on 8952 internal codec PLs.
Since both these PLs are supported on same code base,
provision is required to select backend based on codec type.

Change-Id: I9c0dd7d952ab9d6b9bf738074d97597622e09590
2015-05-12 13:39:52 +05:30
Narsinga Rao Chella f928a98e1f hal: add support for source tracking feature
Fluence module on ADSP is upgraded to support source
tracking, sound focus and audio zoom features. This
change adds support for the same in audio HAL and is
needed to support the features end-to-end.

Source Tracking is the capability to identify the
source of speech. Sound Focus is the capability to
configure which sectors in the 360 degrees plane to
listen to. Audio Zoom is the capability to combine
the sound focus with other technologies so that a user
can listen in on a particular source in a scene.

Change-Id: I019b22d6541e6d1a10552d808c3320a998b86e48
2015-04-14 16:00:20 -07:00
Preetam Singh Ranawat 2d0e463a86 Merge remote-tracking branch 'quic/LA.BR.1' into HEAD
* quic/LA.BR.1: (37 commits)
  hal: Performance mode during recording usecase
  audio: Support for compress offload recovery
  audio: Fix for clip skip issue during SSR
  hal: add checks for calibration buffer allocation failures
  mm-audio: aenc-aac: fix integer overflow for encoded buffer timestamp calculation
  hal: Add support for 8909 QRD skue
  hal: Fix for FM mute issue on start of FM record
  hal: Fix array length computation for backend id array.
  hal : set Non SA+ app type for PCM Capture
  hal : Fix for SA+ app type selection for PCM Capture usecase
  hal : Fix for SA+ app type selection for PCM Capture usecase
  hal: use 0 as default return value for out_get_render_position
  audio: hal: Add support for pm8916 on msm8909
  hal: Define a new combo device for AANC and Fluence
  hal: Define a new combo device for AANC and Fluence
  hal: use 0 as default return value for out_get_render_position
  hal: Update DS2 implementation to support ACDB based license mechanism
  hal : Overwrite the APP type for PCM RX and TX path
  audio: HAL to support for peripheral manager
  hal : Set the input device for VOIP calls using audio path
  ...
Conflicts:
	hal/Android.mk
	hal/audio_extn/audio_extn.c
	hal/audio_extn/audio_extn.h
	hal/audio_extn/dolby.c
	hal/audio_extn/utils.c
	hal/audio_hw.c
	hal/msm8916/hw_info.c
	hal/msm8916/platform.c
	hal/msm8974/platform.c
	hal/platform_api.h
Change-Id: Ibfa171e8f3af713dbb2cffbaf2ca2b0df3e8ae73
2015-02-02 12:41:14 +05:30
Pradnya Chaphekar 80a8cfb81f hal: Audio HAL / APM changes for HDMI passthrough
-Add support for HDMI passthrough for DD/DDP contents to HAL and
 APM.
-Add mixer control to set volume on volume module on passthrough
 COPP. The mixer control  takes zero volume for mute and unity
 volume for max volume.
-DDP content requires sample rate to be four times native sample
 rate. HAL sample rate is changed to four times native rate from
 start output stream. During rapid pause/resume offload thread
 calls standby when there is no active track and no activity for
 over a second. On resume start output steam is called and
 sample rate is converted to four times its current value.
 This results in session to be started with invalid sampling
 rate and playback failures.
-Add HDMI passthrough support for JOC format.
 Expose DDP/JOC as pass-through supported format if sink
 supports either DD or DDP. This is to allow support for
 pass-through convert based on edid data.
-Deep buffer music stream does not switch back to HDMI after
 ringtone playback ends. Ringtone, alarm, notification etc are
 played on speaker if HDMI pass-through is enabled. The
 decision is taken based on stream or strategy. The decision
 to change the device from HDMI to speaker is taken based on
 the stream type. When a patricular stream ends use the
 reference count instead of stream type.
-DAP is not turned on when switching from passthrough stream to
 deep buffer stream.DAP bypass call from HAL to DAP HAL expects
 integer pointer. Address of a bool variable is passed into the
 function. Corrupt value is set on driver instead of turn on/off
 causing random failures in DAP on/DAP bypass. Use same data type
 and use enumeration to make the function call readable.

CRs-Fixed: 761339
Change-Id: Ided9439ec5e87233a1fec3ff9f50a1e9ba4cb788
2014-11-28 19:09:34 -08:00
Pradnya Chaphekar 4403bd796e hal: Add support for parsing hdmi edid information
Add support for parsing hdmi edid data and setting channel map
to asm
Parse edid data on hdmi connection and invalidat on disconnection.
Fix audio playback errors on HDMI when source channel count is
greater than sink channel count for offload playback.

Change-Id: I1e0a8335611a87974cb273431659938a0b345e68
2014-11-18 12:40:59 -08:00
Linux Build Service Account 9dbe39e953 Merge "hal: Support config selection for playback on speaker" 2014-11-06 21:50:15 -08:00
Pradnya Chaphekar 8a9dcd8eff hal: Add changes for dolby DS2
-Add device to back end mapping for APQ8084 and MSM8994.
-Set initialization info like sound card number, dmid
 to ds2 dap hal.
-Add mixer control DS2 OnOff to enable or disable DS2
-A property "audio.dolby.ds2.enabled" is added to trigger
 the mixer control.
-Reuse ds1 functions for checking dolby format and getting
 sound codec id.

CRs-Fixed: 661095 661018

Conflicts:
	hal/audio_hw.c
        hal/msm8916/platform.c

Change-Id: Iff5fdc49249eb035c2ccde18e190ccc6c3ff632a
2014-11-05 20:38:32 +05:30
Amit Shekhar 5a39c91d04 hal: Support config selection for playback on speaker
Support bit width selection for playback on speakers based on
platform info.

Change-Id: I8dd2cc7049186e7468615a43db550d7d580a81d1
2014-10-22 10:54:58 -07:00
Amit Shekhar 445f73c7d7 hal: Remove checks for 24 bit platform support
Check for 24 bit in HAL is not needed as the check for 24 bit
platform support is achieved through flags in frameworks.

Change-Id: Icc590dfc1c4b831399435c19dd505ddebf6503cd
2014-10-16 15:03:23 -07:00
Venkata Narendra Kumar Gutta 1bbbf54aac hal: reset echo reference at the end of recording/VoIP sessions
Echo reference is not being reset currently at the end of
recording/VoIP session causing the echo reference not to
work in the further instances of recording/VoIP sessions.
Fix this by resetting echo reference while closing the input
stream used for recording/VoIP usecases.

CRs-Fixed: 717973
Change-Id: I761ba112952951777525b1bf102c9d6ccaad3269
2014-09-22 11:58:04 +05:30
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
Haynes Mathew George f4da6fe455 audio: extend platform parser
Extend platform parser with support for additional sections.
Supported sections now include acdb ids, pcm device ids and backend names.

Change-Id: Idfbc8a8bb490606686436c107db5b0c7d636ccbe
2014-08-12 17:40:03 -07:00
Mingming Yin 3ee55c65a2 hal: Support for FLAC 24 bit format in offload path
- Add flac in supported codecs list
- Set FLAC codec specific parameters
- Set fragment size based on bit width and sampling rate
  for flac
- Configure backend to 24/16 bit based on the current
  usecases running

Change-Id: If013078e277fd3053fba6489345803f8f58bd86d
2014-08-06 11:42:43 -07:00
Vidyakumar Athota 21b3bb9608 hal: add DSDA support on APQ targets
-This change adds DSDA support for APQ based targets
 where external modem is used for voice calls.
-Add new CSD API to support local call hold.

Change-Id: I7743a1df43dc1abac4e325ff104ec1bb64c9e12b
2014-07-29 17:08:28 -07:00
Dhananjay Kumar 45b71743aa hal: Add support for listen playback concurrency
Add support for concurrency handling between number of
listen capture session and playback activity.

Change-Id: I4a0656f240c62f2cc6266a714a96fdcdc13ae9d8
2014-06-06 23:35:16 +05:30
Subhash Chandra Bose Naripeddy 542746726d hal: send calibration parameters in stream route
The stream's output rendering policy requires calibration to be
sent when stream routing configuration is set instead of the
device enable as each stream can have it's own routing with
different calibration needs.

Change-Id: If8bd365c4a6c616ed86b9383ba540ee8e28c4079
2014-05-26 22:10:39 -07:00
Subhash Chandra Bose Naripeddy 19dc03b51f hal: configure playback stream rendering based on output policy
For the usecases where individual streams have to be rendered
through different post processing chain on DSP an output policy
is defined. The output configuration is read from the
output policy file based on the stream atrributes to render the
playback appropriately.

Change-Id: I095592013ffa5b04bea69254026ebb78e2934822
2014-05-18 21:04:42 -07:00
Venkata Narendra Kumar Gutta 88fd0bc938 hal: Add support for turning fluence on/off
- To turn on/off fluence we need to change the build prop
file and changes will take effect after reboot. There is no
option to turn it on/off without rebooting the target.
- Add set_params support to turn it on and off.
An option is given to user to select the dualmic fluence
based on which set_parms is invoked.

Change-Id: I51d580af820d8e0b1bd1384c941ffba3f96813ca
CRs-Fixed: 605087
2014-03-27 19:47:56 +05:30
Shiv Maliyappanahalli c6fd8eedbf hal: add support for device mute
Add support for muting the RX and TX devices without affecting
the voice stream. This feature is added to enable voice call
quality testing by carriers.

Change-Id: I4d0f599e44ae24ce02d29333f496ef18f889ac55
2014-03-12 15:00:57 -07:00
Helen Zeng 6a16ad7ed0 hal: add support for I2S based external modem
There are specific xml files used for I2S based external modem.
Add check to load the correct xml file.

For I2S based external modem, voice sample rate can be 8k or
16k based on vocoder type. Call csd client api to get the
correct sample rate to configure voice call.

Change-Id: Ie9799336620f49a890355be74fe1830eb348cabe
2014-03-03 14:16:24 -08:00
Linux Build Service Account 084ff19cd7 Merge "hal: Add support for PCM in offload path" 2014-02-19 05:27:07 -08:00
ApurupaPattapu c6a3a9e6ed hal: Add support for PCM in offload path
- Translate PCM Offload format to pcm codec id
- Set 16/24 sub format id in compress params format
- Calculate offload fragment size for pcm
- Move offload calculation functions to platform file
- Update audio policy manager isOffloadSupported
  for pcm offload profile. Use audio.offload.pcm.enable

Change-Id: I2064d646b66e8283fce2cc736e96fb93cba0a552
2014-02-13 11:35:34 -08:00
Vidyakumar Athota 545dbd3494 hal: Add new CSD API to reduce in call device switch delay
New CSD api is added to reduce device switch delay during voice call.
This api is called before enabling the devices so that csd voice call
sequence on MDM can run in parallel with device enable configuration
on APQ.

Change-Id: I9239ff21e1c07370516d0ed668e1e94af12f9eb2
2014-02-06 11:56:58 -08:00
Ben Romberger 61764e3b80 hal: Rename & move platform_parser.c
Move platform_parser to root hal directory. Rename
platform_parser to platform_info. Change name of
XML file read from platform_info.xml to
audio_platform_info.xml. The xml now only needs
information for ACDB ID's that you want overwritten.
Names in the XML now match sound device enums in
platform.c.

Change-Id: I6f9bfcf4149f08d88cb2a95ba021bdf7296aaf4d
2014-01-23 16:22:26 -08:00
Ben Romberger 5588688cbd hal: Add XML parser for platform info
Add XML parser which parses the platform_info.xml
on the device. That xml contains ACDB ID information
and is populated from the device project folder to
the /etc folder on the device. It is used to overwrite
hardcoded ACDB ID's in platform.c.

Change-Id: I86419bf0f48bcf7f0125da58626adab1d23fa50a
2014-01-14 17:36:29 -08:00
Vidyakumar Athota 2850d5327d hal: In-call recording and In-call music support on APQ targets
-In-call recording feature support is added in APQ.
-In-call music delivery support is added in APQ.

Change-Id: Id473eac87da33f1f566b6910ec1feadcd3f08317
2013-11-22 11:17:57 -08:00
Kiran Kandi de144c8495 hal: notify listen while enabling/disabling snd device
Listen needs be stopped when audio capture is active. Also
Listen needs to be started again after audio capture becomes
inactive. Stop and start listen based on audio capture device.

Change-Id: I05ca7cccd59b43a163604881bd9c6ee10cc8fba3
Depends-on: 510494
2013-11-21 11:45:19 -08:00
Vidyakumar Athota 1fd2179b5f hal: change voice call sequence on APQ targets
Send device disable command to external modem before voice call
mixer controls are disabled on APQ side. Enable device command
also should be sent only after enabling mixer controls on APQ side.

Change-Id: I2e4dc321b16f695564460771b3656cd2c4a089a9
2013-11-19 17:10:58 -08:00
Mingming Yin e62d784d2d hal: Add support for compressed capture
- Add support for AMR-WB compressed capture.

Change-Id: Ief591c5d1ccc6f8afb408abfff447787ee7bd7aa
2013-11-18 14:56:53 -08:00
Vidyakumar Athota d9d9ff34fa hal: add voice call support on apq8084
APQ8084 uses external modem to make voice calls.
APQ uses CSD QMI interface to communicate with external
modem. Add csd client apis to support voice calls

Change-Id: I11fe0cc614ee38c42e95b40d5cd5e2d8b3afd43a
2013-11-13 16:56:22 -08:00
Preetam Singh Ranawat de84f1a7fc hal : Support for another instance of fm recording
-Added support for one more instance of fm recording
    to play fm over a2dp.

Change-Id: I0c796c5acdc045327a8d43754e7530aab10097d9
2013-11-06 03:51:06 +05:30