Commit Graph

282 Commits

Author SHA1 Message Date
Linux Build Service Account 18175cc5a5 Merge "hal: Fix device selection at start of the voice call" 2015-07-04 12:32:07 -07:00
Linux Build Service Account b7b866a293 Merge "hal: Reduce minimum offload fragment size for PCM offload" 2015-07-04 12:32:07 -07:00
Linux Build Service Account 68e5a00123 Merge "hal: Increase PCM offload buffering" 2015-07-03 21:48:38 -07:00
Linux Build Service Account 87e4624f57 Merge "hal: Fix voice session setup failure" 2015-07-03 15:54:26 -07:00
Naresh Tanniru de7d175031 hal: Reduce minimum offload fragment size for PCM offload
- Video frame drops are observed on RTSP streaming
  for low sampling rate clips

- For PCM offload audio track uses server proxy position
  value to caluclate render position.
  Due to high minimum fragment size value of PCM offload,
  low sampling rate clips are using bigger audio buffer
  than desired 20ms PCM offload buffer. This results
  improper audio render position return to Nuplayer,
  which leads to video frame drops

- Reduce minimum fragement size for PCM offload from 4k
  to 512

Change-Id: I661f1ffe7cfd41edead82d06063802a3ad7b9b66
2015-07-03 15:10:18 -07:00
Venkata Narendra Kumar Gutta bfdfa150d3 hal: Fix device selection at start of the voice call
Voice call setup latency value is exceeding 500 msec. It is due to
primary output selecting handset instead of voice handset causing
the extra delay. Fix this by selecting voice handset when the mode
is set to MODE_IN_CALL.

CRs-Fixed: 855783
Change-Id: Ibfaee75d658bffbcf2e9cdeaa589e0487c214b41
2015-07-03 15:10:06 -07:00
Venkata Narendra Kumar Gutta db4e1f0f2e hal: Fix voice session setup failure
Sometimes no RTP packets transferred in VoLTE call on headset.
Voice call path setup is failed due to no backends enabled.
This happens when routing is triggered on combo device for
primary output and mode is MODE_IN_CALL at that time.
Fix this issue by selecting proper device based on in call
information.

CRs-Fixed: 859796
Change-Id: I9a5a6b9296d168e9292b94fda147491ee35c0edd
2015-07-02 11:15:39 -07:00
Alexy Joseph 2ce25e2733 hal: Increase PCM offload buffering
Increase PCM offload buffering to 40ms

CRs-Fixed: 856812
Change-Id: I67be148f85acc7c155ed222d652d5fedfb6a5e9b
2015-06-26 13:01:26 -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
Linux Build Service Account 5e4ce50960 Merge "hal: native audio backward compatibility" 2015-06-10 18:28:51 -07:00
Linux Build Service Account 3898a9899b Merge "hal: Add support for Native Audio(44.1kHz)" 2015-06-10 18:28:51 -07:00
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
Preetam Singh Ranawat 8347e465b9 hal: Fix alignement of buffer sent to DSP for multichannel clips
- currently buffer size is Aligned with 96 which is not multiple
   of some channels(5,7).
 - Buffer size must be multiple of (number of channels * bytes per sample).
   For writes to succeed, the buffer must be written at address which is
   multiple of 32.
 - Alignments of (number of channels * bytes per sample)*32 satisfies both
   of the above requirements.

Change-Id: I20de875615141a4a331383a5348abd28b97306f7
2015-05-29 12:33:25 -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
Linux Build Service Account 2d0fb86935 Merge "hal: Fix calibration for external speakers." 2015-04-28 02:31:20 -07:00
Apoorv Raghuvanshi a433fb589a hal: Changes in HAL to load the correct mixer file
Newer msm chips may support multiple codecs, leading
to existence of multiple mixer paths files once for each.
Below change implements a generic algorithm to accommodate
this change.

Get the codec internal name i.e. tomtom, tasha etc.
from the sound card name and form the mixer paths
file name dynamically. This is generic way of picking
any codec name based mixer files in future with no
code change. This code assumes mixer files are formed with
format as mixer_paths_internalcodecname.xml.
e.g. mixer_paths_tasha.xml etc.

If this dynamically read mixer files fails to open then it
falls back to default mixer file i.e. mixer_paths.xml. This is
done to preserve backward compatibility but not mandatory as
long as the mixer files are named as per above assumption.

Change-Id: Iefceaee525093e8b6a4fb06f6dd4649a262fbf12
2015-04-17 18:36:55 -07:00
Linux Build Service Account 06675a84c4 Merge "hal: add single session VSID voice call support" 2015-04-16 17:00:01 -07:00
Linux Build Service Account f1156979ff Merge "hal: Add device to backend id mapping for msm8996 for Dolby" 2015-04-16 17:00:01 -07:00
Linux Build Service Account 733ec94222 Merge "hal: add support for source tracking feature" 2015-04-15 17:26:48 -07:00
Pradnya Chaphekar f0b1cfe0f4 hal: Add device to backend id mapping for msm8996 for Dolby
Add device to backend id mapping for msm8996 for Dolby

Change-Id: Ice91ba724f3121011b40e45195a88ccfb4a69b5c
2015-04-15 16:56:26 -07:00
Vidyakumar Athota 0e1093537b hal: add single session VSID voice call support
With new Voice architecture, a voice session per subscription
will support different call types such as Voice/VoLTE/VoWLAN etc.
These new voice sessions will be tagged with new VSID.

Change-Id: I7e9c90fb3935ebce5ff281f2d1c25c66aa96e55e
2015-04-14 16:11:05 -07:00
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
Linux Build Service Account cb5801d844 Merge "hal: Fix strncat problem, replace with strlcat" 2015-03-27 18:01:28 -07:00
Tanya Finkel 87af1a5bee hal: Fix calibration for external speakers.
For liquid8994 and for DB8094 the calibration should be flat.

Change-Id: I0366b2fc132a435037c37031560d5d9a91d00dba
2015-03-27 14:54:23 -07:00
Fred Oh e0479689b5 hal: Fix strncat problem, replace with strlcat
- 3rd parameter in strncat is not calculated properly. Replace with
strlcat() and fix the concatenation.
- Rename mixer control name to clarify where it applies.

Change-Id: I70af10190aaaf63b2a7d7e16a96ecda603b163dd
CRs-fixed: 811371
2015-03-26 11:31:40 -07:00
Mingming Yin 89c6a7f457 audio: renaming thulium to msm8996
Use appropriate SOC name.

Change-Id: I08e17ec9b240869c5357ad181f1fb17a0d06b969
2015-03-24 11:56:14 -07:00
Linux Build Service Account 52f8653ddb Merge "hal: update target name for thulium" 2015-03-13 12:03:12 -07:00
Linux Build Service Account 2497528567 Merge "hal: fix klockwork failures in audio hal" 2015-03-13 01:52:23 -07:00
Banajit Goswami 20f40781ca hal: update target name for thulium
Use target name as msmthulium instead of thulium. Update the
target names and sound card names.

Change-Id: Ibf395980183d39e6cae83b2684b07bfc62d6b339
2015-03-11 15:25:04 -07:00
Mingming Yin 7b762e7cd6 hal: fix klockwork failures in audio hal
- Fix klockwork failures in audio_hw.c and platform.c

Change-Id: I4a3b7e11c9050c3b1f0fe4e3d564b879065b3203
2015-03-06 10:36:01 -08:00
Amit Shekhar 45fbfa93cc hal: Fix alignement of of buffer sent to DSP
Currently, ALIGN macro can align properly only if the buffer size
is a power of 2.
To have same PCM samples for all channels, the buffer size requires to
be multiple of (number of channels * bytes per sample).
For writes to succeed, the buffer must be written at address which is
multiple of 32.
Alignment of 96 satsfies both of the above requirements.

Change-Id: I5ab33ef198b5b8f18ae9f09c4361e5cff84e700e
CRs-Fixed: 795936
2015-02-26 17:48:00 -08:00
Linux Build Service Account ae8d3573ce Merge "Merge remote-tracking branch 'quic/LA.BR.1' into HEAD" 2015-02-05 15:31:04 -08: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
Alexy Joseph 3b79cccffa hal: align fragment size to 24 instead of 1024 for PCM offload
Aligning PCM buffer size to 1024 bytes is not required in case
of PCM offloading. It actually creates problem when playing
6 ch, 96KHz, 16-bit stream PCM in offload mode, due to aligning
PCM data becomes unequal for the six channels.
Align the buffer to LCM of 2, 4, 6, 8 i.e. 24.

Change-Id: I0823ca2ccdd5fceaf23a182b763a1d69f91f602f
2015-01-29 21:49:44 -08:00
Shruthi Krishna 9b7e69036a AU_LINUX_ANDROID_LA.BF64.1.05.00.00.021.095 based on quic/aosp/LA.BF64.1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAlS+Y7EACgkQoUgPZYCpAfGhcQCgzFtFc1pVn2TUWr42hAfxqmcJ
 KNMAn0ijSKfcIWXQfCXYaiv3W7khSvRT
 =4cCU
 -----END PGP SIGNATURE-----

Merge tag 'AU_LINUX_ANDROID_LA.BF64.1.05.00.00.021.095' into merge_branch

AU_LINUX_ANDROID_LA.BF64.1.05.00.00.021.095 based on quic/aosp/LA.BF64.1

* tag 'AU_LINUX_ANDROID_LA.BF64.1.05.00.00.021.095': (30 commits)
  audio: Reject incall record request when mode is not IN_CALL
  mm-audio: aenc-aac: fix integer overflow for encoded buffer timestamp calculation
  hal: Add support for parsing hdmi edid information for msm8992
  hal: Fix glitch in audio playback during device switch
  hal: add support to query hpx state using getparameter
  hal: add all compressed formats for app type selection
  hal: Performance mode during recording usecase
  hal: fix null pointer de-reference
  hal : add 8992 for msm8992 audio
  post_proc: Support Headphone:X in offload and non tunnel modes
  post_proc: Add support for non-tunnel DSP audio effects
  audio: Avoid mute during AFE PROXY Usecase
  hal: Fix DTS HPX Get parameters
  hal: bug fixes for PCM offload
  hal: Fix progress bar issue during compress offload playback
  hal: Fix setting stream channel map properly
  hardware/qcom/audio: Integrate Eagle framework for HeadphoneX
  hal: Remove setting DAP bypass /DAP on from HAL
  hal: Avoid resetting device to speaker for HDMI passthrough case
  hal: Audio HAL / APM changes for HDMI passthrough
  ...

Conflicts:
	Android.mk
	hal/Android.mk
	hal/audio_extn/audio_extn.h
	hal/audio_extn/utils.c
	hal/audio_hw.c
	hal/voice.c

Change-Id: Ia92b2002486894e8711a48480324479fe114aeb6
2015-01-23 15:12:58 -08:00
Ravi Kumar Alamanda af66940383 hal: Fix glitch in audio playback during device switch
Currently the deep buffer path uses 4 * 20msec buffer.
During device switch the AudioPolicyManager delays routing
command by 2 * output latency (80msec) to ensure that all
the data written to driver/DSP is played out on current
device itself.
The stream side buffering in the DSP in legacy PCM mode is
95msec and hence the depth of pipeline is 80 + 95 = 175msec
which exceeds the device switch delay 160msec (2 * 80). So
the tail (data written to driver before headset plugin) is
heard on headset and perceived as glitch.
Ensure that the buffering in the kernel is greater than or
equal to the buffering in the DSP to fix the issue.

Change-Id: I01a3862d63ce4c258056620693dee08761c7e83f
CRs-Fixed: 771446
2015-01-13 17:26:16 -08:00
Banajit Goswami 22582e755c hal: add support for thulium target
Adding thulium target support in makefile

Change-Id: Ibb33e9545a511ea85fc29cf56f72cd0b5d368e7e
2014-12-18 17:17:09 -08:00
Ravi Kumar Alamanda 739a765ce5 hal: Fix glitch in audio playback during device switch
Currently the deep buffer path uses 4 * 20msec buffer.
During device switch the AudioPolicyManager delays routing
command by 2 * output latency (80msec) to ensure that all
the data written to driver/DSP is played out on current
device itself.
The stream side buffering in the DSP in legacy PCM mode is
95msec and hence the depth of pipeline is 80 + 95 = 175msec
which exceeds the device switch delay 160msec (2 * 80). So
the tail (data written to driver before headset plugin) is
heard on headset and perceived as glitch.
Ensure that the buffering in the kernel is greater than or
equal to the buffering in the DSP to fix the issue.

Change-Id: I01a3862d63ce4c258056620693dee08761c7e83f
CRs-Fixed: 771446
2014-12-15 18:56:30 -08:00
Linux Build Service Account 098dcbdd50 Merge "hal: bug fixes for PCM offload" 2014-12-06 21:58:18 -08:00
Alexy Joseph aa54c87a7e hal: bug fixes for PCM offload
When pcm offload is done, override the buffer size
that was calculated and use the value from the system property
Make write call blocking if small buffers are used in offload
Update latency value for pcm offload with small buffer hint based
on period size and period count.

Change-Id: Ic74caa6bd172c8e4554384e9fa98a5137117f07c
2014-12-04 07:42:06 -08:00
Alexy Joseph e844aad3f1 hal: Fix setting stream channel map properly
Fix setting stream channel map properly

Change-Id: I78620f699c5c5ceb9d4e282bb35911574cf9dca5
2014-12-01 16:06:34 -08:00
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
Dhananjay Kumar a3565b3bec hal: use updated acdb_init to pass ds1 license info
Use updated acdb_init to pass ds1 license info

Change-Id: I5155b60fa39511b30b7fa63382891088034fdcc6
CRs-Fixed: 761339
2014-11-28 19:09:34 -08:00
Linux Build Service Account 68bb271f47 Merge "hal: add quad mic support for audio recording and VoIP calls" 2014-11-25 11:00:32 -08:00
Linux Build Service Account 587c7b88d5 Merge "hal: ensure EC reference is disabled before enabling" 2014-11-25 01:10:06 -08:00
Ravi Kumar Alamanda d1c85bbd9d hal: ensure EC reference is disabled before enabling
HW echo cancellation is not working after device switch due
to state mismatch between tinyalsa and the kernel.
Ensure that EC reference is disabled always before enabling
EC reference for the new device.

Change-Id: Ia1152402990db836d3f94278a7d36726310dc60c
2014-11-24 15:40:23 -08:00
Ben Romberger 5ad8a56396 hal: Add API to set & get audio calibration
added base64 encode and decode utility functions
Add API to set & get audio calibration.
Use audiocal for set & get key.

Change-Id: I2ea3362a75bd99018f404d8cf0771efa0a2aabf7
2014-11-24 12:37:47 -08:00
Narsinga Rao Chella 975572e9b9 hal: add quad mic support for audio recording and VoIP calls
Add quad mic recording support for standalone audio recording
and for VoIP calls using audio path.

Change-Id: I852ca864928b73892a88eccf67c2b9803df9cdad
2014-11-22 23:32:02 -08:00
Linux Build Service Account 6b31dcb779 Merge "hal: Add API to set & get audio calibration" 2014-11-22 22:27:03 -08:00