Initial bringup hardware-libhardware

Change-Id: Icf14dd5ade3e19b761da88adc57c29c3205c687b
(cherry picked from commit adc1fa6fe5b5cc00f87963a2a3ea7a78e5f7660b)
(cherry picked from commit d5c118042ea9df708fd24482f17214e4ac6db510)
(cherry picked from commit 7a060fa53818dc452c5d00a92aec8ccc483a32f3)
Revert "Initial bringup hardware-libhardware"

This reverts commit adc1fa6fe5b5cc00f87963a2a3ea7a78e5f7660b

Change-Id: I55759baadf611019a7cc79b8a6d5870ceaa981f4
(cherry picked from commit 7630f2b45bb6bec92a0c993573bc4b7fe7645323)
(cherry picked from commit 1a754846a5fe998eb0af3aaedfdd685825949e2e)
(cherry picked from commit 6d725d30827afc70fea8b91439ae95462ce630b7)
libhardware: Disable rotation animation on External

- Added two new flags to used to inform HWC about
  rotation and roation animation to HWC
- This is used to disable rotation animation on external

Change-Id: I05a9796781dcda088ae6cd64481cd4e581d5cf9e
CRs-fixed: 453747
(cherry picked from commit 055f43ad31b6aafa2f155a5a273c98324631dd2a)
(cherry picked from commit 2b76f1414dc3ac42a2eb5d45a363e11b27df07e4)
(cherry picked from commit 21082cd480b0f24f94d59e128b77323eb690b257)
libhardware: Add allocSize hook function.

Add allocSize hook function to support the custom buffer sizes

Change-Id: I0d55195cbc02af1001d6164ce8fd55380750c029
(cherry picked from commit df05397a51e2d52d45f74932212d6ccf53b044bd)
(cherry picked from commit 29abae57e4295d82297bdad6621d6795679672f3)
(cherry picked from commit b33f1d1897017a50c6fa7b6c1275449196f45e63)
libhardware: Add keys to support FM

Add keys for FM device and FM volume

Change-Id: Ib26df18a72f96bf19d577d99e93296a37f04ed7b
(cherry picked from commit 1dd30a530cf3b595d9877d0d15739b2b1b76889a)
(cherry picked from commit 2599b75a58206332ea00206171dfff078bda20ff)
(cherry picked from commit 0a3f3c974406228d6541a2df6d38b42fdbfd790b)
Revert "Revert "Initial bringup hardware-libhardware""

This reverts commit 7630f2b45bb6bec92a0c993573bc4b7fe7645323

Change-Id: I34f331b50af38a4f610dda14571037886308cbe8
(cherry picked from commit fcf03ebdec3b3d8a98ecd7c3a38d6fad3d14572f)
(cherry picked from commit d20f452a8b86e731f0c43ac4d7d9c0c82070d89b)
(cherry picked from commit ec8486bed4edbe0ae122f30a0f87d0ec5d60b4fa)
audio: Add QCOM feature support for frame size

- Add support for QCOM audio formats in audio_stream_frame_size
- Send correct channel count for voice call recording
- add support for VOIP
- reference change  I7a2f5a25c7571b3abf4cedb9d9104681304d1629

Change-Id: Ic1dc22571d4860f143efbc8a24f2933eae3c1de9
(cherry picked from commit 29ee43bc11557970569df2b192fd40fa41683ab2)
(cherry picked from commit ff693eda23e0009b0864e1b31ba1cbf49691c449)
(cherry picked from commit 4c6d213db8940842d0b9ab6b05fcd99116740965)
Bluetooth: HID: Add support for Set Idle and Get Idle commands

This patch adds the relevant callback prototyps for Set Idle and
Get Idle which is used for setting idle time on HID devices.

Change-Id: I4c528a510edd847bc6121ce0b875ae313f090b9c
CRs-Fixed: 522511
(cherry picked from commit d733cfe1637fa61e2823a50440f5adbd26bc12a9)
(cherry picked from commit 27ad0703c8b8a0ce129cf46e61d1410406fd3f3c)
(cherry picked from commit 60f843ee8e3c4ef097394e2483c2c80922c182e2)
Bluetooth: Add support for set_priority for HID Host

This patch adds support for set_priority for HID Host. With this new
method, btif layer would be informed of remote HID Device priority
and would help in early rejection of HID incoming connection in case
User on DUT has unchecked Input device from Application.

Change-Id: I0c1ac7c8ad010b8d7e8aa5653e69568a45f4af92
CRs-Fixed: 532234
(cherry picked from commit e5987b7ab32b7b887693dbfd28ebfe0aac5f9f2f)
(cherry picked from commit 051d9de3e4f413fbd1c19dca69a461330267fd83)
(cherry picked from commit 59cb7a79c557ed355b02bc497443b425623ae036)
Bluetooth: Added new prototype of HFP feature bitmask.

This function will allow to let the BT stack use
the features supported by the Bluetooth HFP app.

CRs-Fixed: 482189
Change-Id: I9d015562e310ed2901ada91e692083dde7ac4614
(cherry picked from commit cad7f788e01e07659a605a1f61095a503f68563e)
(cherry picked from commit e0e16d9f105400b3339aa48ea99131fce1570029)
(cherry picked from commit 2d6f0d249c89a5cd9ece75a74bfd96c5c3a32068)
Bluetooth: Added function prototype for codec.

This function is used to notify the BT APP
about the codec negtiated.

Change-Id: I058a9b6409341d3fc849de1386174207bd9df1e3
(cherry picked from commit cce5c76bfa42c54e15d6eb3bd43ae9cea82c462c)
(cherry picked from commit 3add2cdff0fd82f887925ff6f26211c8ee6d0c07)
(cherry picked from commit ed834a7088edaa64aa48912abf15cc6ae510d766)
libhardware: Add APIs to support DirectTrack

 -Add APIs in HAL to support Low Power Audio
  playback and Tunnel Audio playback.

Change-Id: Ic9d595e599c3222e2535745a8f1ebfb018ef75ed
(cherry picked from commit 4af9447d1c37f117463e2855fec845adaa299737)
(cherry picked from commit 6c2165c00805016ad5b4c2af3ac4ebfb49fd9170)
(cherry picked from commit c15cb2d03a371314c922588562a3e8a9f7238c08)
Bluetooth: Security: Handle authentication rejected error status

Handle authentication rejected error status in failure scenario.

Change-Id: Ibd59d161ee5481ced2cb078a6ee6f4a6b045bcd4
CRs-Fixed: 516087
(cherry picked from commit 8561acde269b3f53dd9ef60cca13d0712e55c8ec)
(cherry picked from commit 0cec185b0d06ded1eee88a8430b10404201f3c7e)
(cherry picked from commit 2fc3517d134e66dde8f802f1980187c535aa15a9)
Add masks for BeiDou and Glonass

Added masks to the GPS interface
for deleting assistance data from
BeiDou and Glonass satellites
CRs-fixed: 498642

Change-Id: I3887338ffcbcd3977473354df9c77dbe834ac45d
(cherry picked from commit 0fc8bdf7b6841ec7395df2ded434a1009e36992d)
(cherry picked from commit 5e64b05c36a9eed4708013ab24bec01ce76d6f41)
(cherry picked from commit 70b149dc90d08e8f9a302445bb229bfbe0a8b15c)
libhardware: Add MSM string parameters.

- Add MSM specific string parameters for
 VoIP, Fluence, SSR, A2DP and ADSP

Change-Id: I3b0dee240c507c4cad14529e4a79404d6902be7a
(cherry picked from commit 24f52207794e7f2c7ab0cbf8cfd933d2f11adf1e)
(cherry picked from commit 4709458913009c131d6f7a3716c72c3f180eca8e)
(cherry picked from commit 3e57aadd82c38d87522121f41e184cea34cb3653)
Bluetooth: Support MAP Client role on Bluedroid.

Implementation of MAP Client (MCE) role on
Bluedroid stack. Include MAP Client Interface ID.

Change-Id: Icdf11b7f09a161e35aa3aa68b9b5fa315e18fd65

CRs-fixed: 539274
(cherry picked from commit 08b7d8403f875a33f108fc78ee65c6365a828a8e)
(cherry picked from commit cb0e99a3b946756709e007fba700911f930f4e67)
(cherry picked from commit 31cc136a0a3b4f6ea15307455497b1fd8cc0ced8)
Bluetooth: SAP: Header files changes to support SAP on Bluedroid

This change consists of:
Header file changes for Bluedroid SAP profile

Change-Id: I3c685967d6ed154f57fcd6f30b2402af9f42ec3f
(cherry picked from commit ff4940b8f32511fb870facc4eb2c36fb27890de0)
(cherry picked from commit d60cdf06d3220127e05a4f0db8fcda8c452b5637)
(cherry picked from commit 8bcadb8fef1f42a930b6bcf44c51cb8da58e9383)
libhardware: Enable MMAP interface in USB Audio HAL

Allow USB Audio HAL to write using MMAP interface
to support USB Audio AoA feature.

Change-Id: If23d2b618277ab64853fc1d778767a95482bedbf
(cherry picked from commit 1dc50e2b4d2bbac5d39edfd408d011cfaf4cd82b)
(cherry picked from commit bff3e5a4d2d0e61e6c35cfb3ef66be51ae98b3c8)
(cherry picked from commit ba5d429fe4817c48c089d34954daea21f321bf11)
usbaudio: fix for out->dev->lock remains locked in error case

-out->dev->lock remains locked in error case in out_write()
-Added pthread_mutex_unlock() in the error case

Change-Id: Ibbbd5ced1f9d469cfba3b33a94414d0b94affa8f
CRs-Fixed: 522054
(cherry picked from commit b68a95c63b87d9975169e2e168e9c7e2ad72f118)
(cherry picked from commit c90dbb369d3e446eec831201e9acb6b69a1222ce)
(cherry picked from commit 7c478ce6b2a4f8e18d4b533a496b021be3411b0b)
Bluetooth: Support  HFP Client role on Bluedroid.

Implementation of HFP Client role on
Bluedroid stack. Include HFP Client Interface ID.

Change-Id: Ib440099de75081b2bd8d5f01f4d9d1bb467294ea
(cherry picked from commit f89e86bf475a2a8431bf9849af6b11d9d9e88852)
(cherry picked from commit 48803a6e179c4d99e8e119e8fe51a91d9014acba)
(cherry picked from commit 0c589e335a23885224d51b14bdea93a6dc649eaf)