Commit graph

79 commits

Author SHA1 Message Date
Jeff Tinker
e3b6ae14f5 Revert "Fix resource leaks in drm hal"
This caused b/38343526 which is a chase list issue, reverting for now.

This reverts commit 4e1fe736af.

Change-Id: Ib9ffcd11e575e3f05f54cbea17fda2f2eb3780b5
2017-05-16 18:21:39 +00:00
Jeff Tinker
4e1fe736af Fix resource leaks in drm hal
bug:36408047
test: manual tests to verify leaks are fixed
Change-Id: Idd79e99e211d81f8b3e58cf52c9b01ce9d370dc4
2017-05-09 11:24:49 -07:00
John W. Bruce
467c0db62c Prefix ENABLE_MEDIADRM_64 with TARGET_
This build-time flag should be prefixed.

Bug: 37039525
Test: Built OS
Change-Id: If6f6cd1ad2df5f000a4264cabeb7d9eb77e194ea
2017-04-27 18:50:05 -07:00
Iliyan Malchev
136b5e46ec Route DRM HAL libbinder traffic to /dev/vndbinder
b/37309712
Test: marlin

Change-Id: I72c2304842bd21b5393c17be5beeeb90a74d5345
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-04-14 15:25:16 +00:00
Jeff Tinker
a0b44e644a Change drm/crypto service names to "default"
bug: 36371166

Test: vts drm hidl test

Change-Id: Iae98708c4f9b58dc697fb54c9f9b67d99e7ed0cf
2017-04-11 16:25:15 -07:00
Steven Moreland
4e7a307730 Fix transitive includes.
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h

Test: pass
Merged-In: Iff316b21bef556bb026378b7f89e97ded3febef4
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
2017-04-06 22:04:05 +00:00
TreeHugger Robot
69571ba233 Merge "Add additional drm hal tests" into oc-dev 2017-04-06 18:21:00 +00:00
Scott Randolph
f059ae420d Merge "Use explicit .c_str() for hidl_string" into oc-dev 2017-04-06 18:01:48 +00:00
John W. Bruce
fcde9ff3a0 Add Flag for Enabling 64-bit Legacy DRM Plugins
We are ready for devices to begin migrating to a 64-bit Legacy DRM
Loader. However, not all devices are ready to make this jump yet. A
device needs to have all of its Legacy DRM Plugins ready to run as
64-bit before it can do this. This includes having 64-bit hardware
integrations.

So that devices can turn on 64-bit support as they get ready, I am
adding flags that can be set in a device's device.mk file. There are two
parts:

* ENABLE_MEDIADRM_64 enables building the Legacy DRM Plugin HAL as
  64-bit.

* Setting drm.64bit.enabled=true in PRODUCT_PROPERTY_OVERRIDES switches
  the Legacy DRM Plugin HAL to searching for DRM Plugins in the 64-bit
  directory.

Test: Validated that turning on these flags enables a 64-bit Legacy DRM
      Plugin HAL that loads 64-bit Legacy DRM Plugins from the lib64
      directory.
Bug: 36076017
Change-Id: I8d21fc7e7c0357eb6755839d41caa0f37ca20aff
2017-04-06 01:04:27 -07:00
Jeff Tinker
f20aa0c485 Add additional drm hal tests
Test: VTS tests passing

bug:34178477
Change-Id: Ie8fa5f2ad193b717b0564bb3046de8a64ccd8d85
2017-04-05 23:21:13 -07:00
Scott Randolph
8997880087 Use explicit .c_str() for hidl_string
hidl_string no longer will provide an implicit cast to const char* as it
interfers with other expected behaviors of the class.  It now emulated
std::string in requiring a call to .c_str() to get the same behavior.

Bug:  36532780
Test:  Build the tree
Change-Id: I265590c7c18f425e44863df062a56b67519a932a
2017-04-04 10:53:26 -07:00
Jeff Tinker
fea340f1fe Fix getKeyRequest legacy HAL returning invalid status
bug: 36006198

Test: drm hal vts test
Change-Id: Ie3125b4459add4fd30dc418f92ab0f51d8fcc73b
2017-03-30 16:00:12 -07:00
Edwin Wong
c7170174d4 Check registerPassthroughServiceImplementation return status
Should abort program if registerPassthroughServiceImplementation returns
something other than OK.

Test: Play Movies & TV in non-binderized mode.

bug: 34640335
Change-Id: I94be98e7ae66cdb777a7d182123c8692aef915b7
2017-03-16 09:43:29 -07:00
Jeff Tinker
e5fbc46ef2 Fix CTS post submit failures
MediaCodecTest.android.media.cts.MediaCodecTest.testCryptoError
was failing due to incorrect error code translation introduced
by the drm hidl hal.

bug: 35137940
Change-Id: Ibd02425a55194f3cb0acc0e53f90b156023fb1ab
2017-03-15 20:35:37 +00:00
Steven Moreland
542f434dc2 Remove warning from DrmFactory.cpp
Test: pass
Change-Id: Ie5d37a257bfb1f4f5d9173bbe41e734161941954
2017-03-08 08:34:00 -08:00
Rahul Frias
abd4e11c9d Correct reporting of errors in MediaCrypto
Legacy error codes need to be converted into new Status values before
being reported. Decryption errors (that were negative) were changed to
absolute values. This caused their translation to new Status values to
fail.

b/35634335

Test: Verified with GtsExoPlayerTestCases. Some failures, but those
      are unrelated to this CL and will be addressed separately.

Change-Id: I995cac33cb2725d02b0f1a3922e522ce07a9d1be
2017-02-28 20:56:13 +00:00
Rahul Frias
89437fbdd9 Correct propagation of asynchonous events
The legacy plugin listener was not set when used in
passthrough mode in Treble. This caused events (session renewal,
key expired etc) not to be propagated to the app.

b/35375500

Test: In progress

Change-Id: I7d74b3320c82e22f67d3c804ee93f9b9791080b2
2017-02-27 15:07:34 -08:00
Steven Moreland
7e73d5b908 Remove viral dependency on libhwbinder. (2/2)
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Note, automotive has some actual dependencies on libhwbinder, filed
b/35758626 for this.

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6d0726c8130d00684b978efbdd48e3ae396f12e5
2017-02-24 12:18:01 -08:00
Jeff Tinker
e376fbd572 Merge "Support multiple codecs per crypto instance The initial drm hidl hal implementation assumed one codec per crypto instance, but in fact there can be multiple codecs per crypto instance. This change extends the drm hal to allow multiple memory heaps per crypto plugin. It fixes the issue of mapping memory frequently during playback." 2017-02-17 23:30:16 +00:00
Jeff Tinker
0b3f41ec8d Support multiple codecs per crypto instance
The initial drm hidl hal implementation assumed one
codec per crypto instance, but in fact there can be
multiple codecs per crypto instance. This change
extends the drm hal to allow multiple memory heaps
per crypto plugin. It fixes the issue of mapping
memory frequently during playback.

bug:35275191

Test: manual verification with Play Movies on angler
and in binderized mode on marlin

Change-Id: I0ec36856248623d2ad8acb8ce9873e9274883a40
2017-02-17 19:51:03 +00:00
Jeff Tinker
9a33bb2b25 Revert "Enable loading of treble-based plugins"
bug:35329920

Tests: Verfied playback on Ryu with Play Movies in combination with
ag/1907708, ag/1909159

This reverts commit fbf3650370.

Change-Id: I4a35a329b24e4cd9efcff4fe84e9d8901c714d57
2017-02-14 21:42:16 +00:00
Steven Moreland
a0da1a1c3d Move hidl shims to the vendor partition. (2/2)
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.

Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
2017-02-13 15:03:41 -08:00
Jeff Tinker
45548ea846 Add vendor-requested parameter to createPlugin
A feature in O requires a small change to the
drm HAL: adding a parameter to the createPlugin
method in the DrmFactory.

bug:31306973
Change-Id: Iab0f7ee58103b357f10cf05ea7986a8fc01eebf6
2017-01-31 05:10:47 +00:00
Jeff Tinker
d4c3cbcc38 Merge "Enable loading of treble-based plugins" 2017-01-28 01:22:19 +00:00
Jeff Tinker
fbf3650370 Enable loading of treble-based plugins
Test: gtests passing

bug: 34507158
Change-Id: I712dea8e211e83b36cb103d913405521d55123f5
2017-01-26 14:20:24 -08:00
Jeff Tinker
dc8e2d0620 Don't deref a NULL shared buffer base
bug:34624618
Change-Id: I5caee20a944d0c7b5d30f8abdbd8734507914a3a
2017-01-25 17:33:30 +00:00
Jeff Tinker
972a3e3292 Add LOG_TAGs to drm hal default modules
Change-Id: I1267205999b7cc660a6c908f0d183e43277a9c71
2017-01-23 16:02:27 -08:00
Jeff Tinker
da002fe641 Reorganize drm hal modules
Previously the drm and crypto plugins were separate hals.
This implied a separation of implementation libraries which
causes problems for some drm schemes. The reorganization
combines the hals into a single interface under drm.

Tests: basic gtests passing

Change-Id: I5cde6ff9f60625a0219731c4dbfcaefbd9f27f88
related-to-bug: 32815560
2017-01-20 10:48:50 -08:00
Jeff Tinker
d59d36252e Implement services for crypto+drm HALs
Test: service runs, basic gtests pass

bug:32815560
Change-Id: I9642f20d11805c56c46ddede64e776df5314f089
2017-01-19 05:33:21 +00:00