Commit Graph

1294 Commits

Author SHA1 Message Date
Mingming Yin 3a941d4a7f hal: read HDMI sink capability for dynamic output profile
- update read_hdmi_sink_caps to support dynamic sample
  rate, channel, and format based on HDMI EDID information

Change-Id: I69b3f19cb1d81c3e51695adae4f2379cbb439dc8
2016-04-29 10:01:51 +05:30
Linux Build Service Account a55ffe97d8 Merge "hal: fix crash due to null pointer deference" 2016-04-27 09:32:39 -07:00
Haynes Mathew George 11ba680eb6 hal: fix crash due to null pointer deference
media server crash observed randomly during bootup due to
speaker protection thread started during bootup uses cached
primary_output stream to configure codec backend, but the
primary_output is not yet opened. Fix it by waiting for
valid primary_output stream before proceeding for speaker
protection calibration processing.

Change-Id: I879b336f8a7fac15cfbbf7d089bb2d19083d8827
CRs-fixed: 1001002
2016-04-27 00:15:55 -07:00
Linux Build Service Account a2e774abc7 Merge "hal: add support for msm cobalt for platform defines" 2016-04-26 22:10:15 -07:00
Garmond Leung c153646856 hal: add support for msm cobalt for platform defines
Add in support for msm cobalt for playback offload
device defines.

Change-Id: I82d4f5962ed714d59146f551c4834ee74b675b42
2016-04-22 10:41:07 -07:00
Linux Build Service Account 989d9e569e Merge "hal: fix compiler warnings which are now treated as errors" 2016-04-20 11:37:11 -07:00
Linux Build Service Account d5f7514aef Merge "hal: fix the wrong copp sample rate for native streams" 2016-04-20 11:37:11 -07:00
Sidipotu Ashok 75ea422432 hal: fix the wrong copp sample rate for native streams
Due to incorrect logic, Copp is configured at 48 khz for native
streams, correct the logic.

Change-Id: I2c79c4de2cca433942fa23a06029a01bba384c3b
2016-04-19 20:00:07 +05:30
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
Sidipotu Ashok eaec639e10 Revert "hal: update combo device handling"
This reverts commit 993e1f42e7.

Change-Id: I758f222fdb861feb730b7caba1416ba2e393b5b7
2016-04-19 10:37:42 +05:30
vivek mehta 344576aca7 hal: Fix WFD and voice call over USB concurrency
- If WFD framework occupies the AFE proxy, it may result unintended
  behavior while starting voice call over USB.
- Audio is always routed to the USB audio device when connected,
  even if WFD is connected. So no need to allow afe proxy port
  usage by WFD framework.
- Disallow the afe proxy port usage by external modules when
  AUDIO_DEVICE_OUT_USB_DEVICE is connected.

CRs-Fixed: 998488

Change-Id: I889be7f477ae3f7ad46757592a46f3d0e8eb41e2
2016-04-18 03:14:56 -07:00
Linux Build Service Account 01b79a53ee Merge "hal: update combo device handling" 2016-04-15 09:54:57 -07:00
Kuirong Wang 993e1f42e7 hal: update combo device handling
If the wired headset/headphone/line devices are handled by
a different backend than speaker/earpiece devices, the combo
devices such as speaker+headphones can be split into individual
devices and enabled/disabled independently.

CRs-fixed: 989410
Change-Id: I379b56940eaf384d3cd1d9fe392b7fec65df023b
2016-04-14 23:20:57 -07:00
Banajit Goswami 4c0dff2022 hal: add support for msmcobalt
Add initial audio support for MSMCOBALT target

Change-Id: I06cd6a558d8622c7b8ff82b5531478adea96e631
2016-04-14 09:13:13 -07:00
Naveen Kumar 2cb8635f9e Merge commit '0110e267d11ed5aa7a64a306771e71aeb289db6a' into remote
Conflicts:
	policy_hal/AudioPolicyManager.cpp

Change-Id: Ia056c051af478e9853a05fea0ee2c8c7eca0670a
2016-04-13 03:30:28 +05:30
Linux Build Service Account 0d92129d72 Merge "hal : Fix data initialization and input validation errors" into av-userspace.lnx.1.0-dev.1.0 2016-03-31 04:06:46 -07:00
Preetam Singh Ranawat 5319430b65 hal : Fix data initialization and input validation errors
Initialize uninitialized variables and add null check to
 avoid following errors

 119251, 119255, 119256, 119257, 119258
 144012, 913366, 119249, 119250, 58938

Change-Id: I09d35977c9c3abf5819d5c72506c8d157158e212
2016-03-16 23:25:03 -07:00
Shiv Maliyappanahalli e66aba2f74 hal: add support for 32/48KHz for voip
Enable support for 32/48KHz for voip applications.

Change-Id: Icfde47d14c9a0ee2b6efb0e2bed1642610f841df
2016-03-16 08:10:50 -07:00
Linux Build Service Account 4a137d2026 Merge "hal: add support for fluence in voice recognition" into av-userspace.lnx.1.0-dev.1.0 2016-03-16 07:47:32 -07:00
Linux Build Service Account 640992f630 Merge "hal: update compress offload pcm device ID" into av-userspace.lnx.1.0-dev.1.0 2016-03-15 08:17:55 -07:00
Vidyakumar Athota 78b70c0a05 hal: add support for fluence in voice recognition
Add support to use 3 or 4 mic devices with fluence processing
for voice recognition use case.

CRs-Fixed: 866947
Change-Id: I028d9cf60e235481030bfea06ab67aa15eb7d7be
2016-03-14 11:48:19 -07:00
Naresh Tanniru 726c71d53a Revert "hal: Fix SSR issue for compress offload playback"
- Compress offload SSR is not working during pause state

- During SSR recovery compress session is not closed

- Force close compress session from HAL on OFFLINE event

This reverts commit c6e151114d

Change-Id: I9bf5dc3db1ba08956d14013670f396806fb7bc25
2016-03-14 03:22:51 -07:00
Linux Build Service Account e9867fff70 Merge "hal: stop sound trigger buffering during close" into av-userspace.lnx.1.0-dev.1.0 2016-03-14 02:33:36 -07:00
Arusha Goyal a969a9b767 Remove internal code name of msmtitanium for msm8952.
Change-Id: Iad3786188e82287061a62226d1b748f9d8f1d343
2016-03-11 21:26:01 -08:00
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
Vidyakumar Athota 0a79f2c3a0 hal: reset backend configuration before speaker calibration
For speaker thermal calibration, backend needs to be configured
with default sample rate(48kHz). Currently backend configuration
does not reset to default value after playback finishes, results
in failure of speaker calibration. Fix this issue by resetting the
backend configuration to default primary output value before
speaker thermal calibration.

Change-Id: Id231faf7249506ef668a943b6b12c2738b504a50
2016-03-10 09:53:40 -08:00
Linux Build Service Account f23619b4c8 Merge "hal: Add support to get speaker FTM parameters" into av-userspace.lnx.1.0-dev.1.0 2016-03-10 09:31:50 -08:00
Vidyakumar Athota 4ffc926a9c hal: Add support to get speaker FTM parameters
Add SET and GET parameter APIs to query speaker
parameters in feedback speaker protection FTM mode.

Change-Id: I14a2b8ccc2e0d61c4ccdcadd63c353ca31b9c8ad
2016-03-10 01:28:07 -08:00
Karthik Reddy Katta 3abfee2815 Revert "hal: Fix voice call routing issue on headset"
Sometimes rx mute is observed in voice call. Rx sound device
reference count is incrementing incorrectly causing this issue.
Reverting this commit 5c353ebc429495115361f4b53365f8bf3b1a78c8
will fix the issue.

CRs-Fixed: 979685
Change-Id: I559930457f04a0c890c60386d77153593c5e617e
2016-03-10 00:29:00 -08:00
Alexy Joseph b13799480b hal: Fix warnings in audio HAL and policy
Enable Wall and Werror and fix warnings in
HAL and policy manager

CRs-Fixed: 962049

Change-Id: Ie93c8f933943875ac68e8318d777602ed864f531
2016-03-08 04:50:17 -08:00
Xiaojun Sang 869f201351 hal: force device switch only for headset and headphone
As native 44.1k is only valid for headset and headphone,
force_device_switch just happens for them.

CRs-Fixed: 980341
Change-Id: I1a01e64322f64c60cf15b6d29472023ff4dfb7ac
2016-03-07 01:24:58 -08:00
Linux Build Service Account 7d3cef31dd Merge "hal: Fix the device disable/enable sequence for capture usecases" into av-userspace.lnx.1.0-dev.1.0 2016-03-04 05:48:44 -08:00
Vidyakumar Athota 46025efdb5 hal: update compress offload pcm device ID
Compress offload pcm device IDs are defined wrongly.
Update the right device IDs.

Change-Id: Ib663ab653a35c59ee2bd7b11ff3aa8a3dfe075b8
2016-03-04 02:56:03 -08:00
Linux Build Service Account 4d96646ccc Merge "hal: spkr_prot: read temperature once during calibration" into av-userspace.lnx.1.0-dev.1.0 2016-03-02 07:15:17 -08:00
Karthik Reddy Katta 0d4717651e hal: Fix the device disable/enable sequence for capture usecases
Tx mute is observed in voice call in case of DSDS scenarios.
During device switch, when two or more voice usecases are present,
which share the same backend then the Tx device disable/enable
sequence isn't properly follwed resulting disabling of mic.
Fix this by adding proper check at disable/enable of devices
for capture usecases that share same backend.

CRs-Fixed: 979685
Change-Id: Id1cc27db8ddbbdbf1dffc02c07ce7785b184770b
2016-02-26 00:04:21 -08:00
Naresh Tanniru 74a2eee12a hal: support wsa combo for jacala
- Extend hw_info module to append wsa tag
  to mixer path for combo usecase

Change-Id: I4e39f50ca6665244bc2ee6177be9b4ca5c01df83
2016-02-24 09:43:00 -08:00
Linux Build Service Account da00d6773e Merge "hal: Ensure that stream is not started during Sub system restart." into av-userspace.lnx.1.0-dev.1.0 2016-02-23 23:58:55 -08:00
Vidyakumar Athota 488ac37672 hal: spkr_prot: read temperature once during calibration
Currently temperature read happens multiple times during thermal
calibration to get the equilibrium temperature. This is not
required as speaker amplifier temperature does not change over
iterations. Read the temperature only once to avoid delay in
speaker thermal calibration.

Change-Id: Ie121ea3e37697ee14e24d8ccd68c697c0220f0ab
2016-02-22 04:34:37 -08:00
Sidipotu Ashok fdd505a4c8 hal: limit AFE and ADM sample rate at 48 for speaker
Limit AFE and ADM Sample Rate at 48 for speaker, irrespective
of the bitwidth.

CRs-Fixed: 974913

Change-Id: I43db793dd6d1adede088f7a7c3d86bd39770e2d7
2016-02-21 23:15:02 -08:00
Ashish Jain bbce432b67 hal: Ensure that stream is not started during Sub system restart.
-out_write is suppose to simulate the write to hardware
and drop the data during SSR (non compress offload usecases),
and the time taken up by out_write should be equal to time
required to render the same data.
-Current implementation ends up calling start_output_stream,
where as part of error handling out_write sleeps for 50ms.
- Hence the total time taken by out_write during SSR exceeds the
total buffer duration by almost 2 times, this results in
incorrect update of timeStamp values in the player.
-Ensure that out_write/in_read returns without starting a stream
during SSR.
-During SSR, return correct number of frames written to HAL
in case of non compress offload sessions.

Change-Id: Ib0d59b91af053da70a2eb844841d10b39c74bf18
CRs-Fixed: 968276
2016-02-22 11:36:08 +05:30
Venkata Narendra Kumar Gutta 4bd09d0b13 hal: Add support to dynamically configure MI2S rx sample rate
Add support to dynamically configure MI2S rx sample rate to
support sampling rates upto 192KHZ on head phones for internal
codec. Add and set explicit mixer control to notify the sample
rate value to machine driver.

CRs-Fixed: 970158
Change-Id: Ib7968eaf9aeb5f9911f3c985af61a16a7e06744d
2016-02-15 23:27:11 -08:00
Leena Winterrowd f98e42f296 hal: Remove return values from void functions
Remove values returned from void functions to resolve CLANG
compilation issues.

CRs-Fixed: 963698
Change-Id: I75a960b116985bbf226e4984aec4db5676448824
2016-02-15 02:02:26 -08:00
Sidipotu Ashok ad8fff8aa3 hal: enhance the combo device detection logic during native playback
-when ring tones are dismissed during true mode native playback
check_hdset_combo_device() is picking up stale combo device instead
of new incoming device.

Change-Id: Icfb3099dc917cf56a0b3c1beb282eb45265f15c0
CRs-Fixed: 963216
2016-02-15 01:58:02 -08:00
Linux Build Service Account 889559f873 Merge "hal: Add support for FBSP in WSA analog mode" into av-userspace.lnx.1.0-dev.1.0 2016-02-15 01:48:54 -08:00
Venkata Narendra Kumar Gutta 7f4817f3c0 hal: Add support for FBSP in WSA analog mode
Feedback speaker protection(FBSP) is supported in WSA
analog mode. Add the required changes to support this
feature on 8937/8953 internal codec platforms.

CRs-Fixed: 970156
Change-Id: I1e5f6c1408ba6eb1c216cf8b254ac29551837dbb
2016-02-10 22:20:13 -08:00
Alexy Joseph aee4fddb77 hal: Fix potential memory leaks in HAL
Fix potential memory leaks in HAL

Change-Id: Ifd491cc185a7d1afa647f03639e57d1685d18803
2016-02-10 14:03:10 -08:00
Linux Build Service Account 15de5a8c46 Merge "hal: fix to enable aanc handset dynamically during voice call" into av-userspace.lnx.1.0-dev.1.0 2016-02-09 00:41:24 -08:00
Linux Build Service Account 8b74b0f444 Merge "hal: fix no audio issue in voice call" into av-userspace.lnx.1.0-dev.1.0 2016-02-09 00:41:22 -08:00
Shiv Maliyappanahalli bb4cf0bedb hal: fix no audio issue in voice call
No audio is observed in voice call -> voip -> voice call scenario
since voice usecase is incorrectly stopped when audio mode
MODE_IN_COMMUNICATION is set. This results in not setting the voice
usecase if when the usecase transitions from voip -> voice.

Fix by removing check for MODE_IN_COMMUNICATION in adev_set_mode().
Also update the check for selecting voice devices in select_devices()
to ensure that voice devices are still selected in
voice call -> voip -> voice call scenario.

CRs-Fixed: 966076
Change-Id: I3566705f745247075d6f12b625fcf929970ff507
2016-02-07 18:49:53 +05:30
Shiv Maliyappanahalli 8d019b07b0 hal: fix to enable aanc handset dynamically during voice call
AANC handset device doesnt get enabled if anc is enabled via
setparameters() during a voice call. Add check for EARPIECE
device to enable aanc handset device for all non-capture
usecases.

CRs-Fixed: 958813
Change-Id: I4d8d4026d3abb388c4b1ea2c8de328a61d9bbd81
2016-02-07 18:48:14 +05:30