History log of /frameworks/av/drm/libmediadrm/CryptoHal.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e309b22bff1719f1fea84b247e4b2bc4c5f09eb5 05-Apr-2017 Jeff Tinker <jtinker@google.com> Change drm/crypto service names to "default"

bug: 36371166

Test: vts drm hidl test, Play Movies

Change-Id: I942f91ab0be1f237017e88910f8d3738bf54447f
6dcab2bafd847be84c2c2230bbd04af9c45c491e 28-Mar-2017 Chong Zhang <chz@google.com> DRM: more fixes for heap base mapping -- DO NOT MERGE

Heap base for the same heap could be mapped to different values
after they go across binder to CryptoHal. So we can't use heapbase
to index the heaps.

Since each ACodec instance allocates all its shared memory buffers
from the same memory dealer, we let CryptoHal assign a sequence
number to the ACodec when it calls setHeap. In subsequent calls
to CryptoHal::decrypt, reference the heap by the seq num, and ignore
the heap base address.

Bug: 36479980
Bug: 36209723
Bug: 36660223

Test: the above bugs don't repro

Change-Id: I2f519a689a5891447385d1bf9d6e668bb3b4dbe2

(cherry-picked from bf628da1e231e2e4d6bf61f9884e120bae3f9156)
d07c92742fc5801cab8e99801f591365986acbe9 28-Mar-2017 Chong Zhang <chz@google.com> Revert "Revert "Fix decoder instantiation during playback"" -- DO NOT MERGE

This reverts commit de7268d8e20b883ec88a7ff19ad560a665373484.

Bug: 36479980
Bug: 36209723
Bug: 36660223

Change-Id: I8d83305a28dc35cee16f8f1068c90fdd0b9effff
(cherry picked from commit 6aa5c0662c86c7f7b2890577a207086eeecbd177)
de7268d8e20b883ec88a7ff19ad560a665373484 22-Mar-2017 Jeff Tinker <jtinker@google.com> Revert "Fix decoder instantiation during playback"

This reverts commit 33327c7f0f04bcce3f8e8ee23953f87efc423037.

Bug: 36479980
Bug: 36209723

Change-Id: I8ff9422086f5ba9ba5df60135d20b9d8bfc0be52
33327c7f0f04bcce3f8e8ee23953f87efc423037 16-Mar-2017 Jeff Tinker <jtinker@google.com> Fix decoder instantiation during playback

When a decoder is created while another decoder
is in use and the two decoders share a common
crypto instance, decryption results would become
indeterminate, which could cause the decoder to
hang. This change adds a notification to the
crypto instance so it can update state when its
ownership changes.

bug: 36209723

Test: playbacktests-debug-androidTest.apk as
described in the bug.

Change-Id: I453c260eace5543dd79a3569bf6a9592394c4113
d0cb831e7f14c43359aeb080d9564185d28c7a75 15-Mar-2017 Jeff Tinker <jtinker@google.com> Fix CTS post submit failures

was failing due to incorrect error code translation introduced
by the drm hidl hal.

bug: 35137940
Change-Id: Ia5e16809872c19335b4b9c1a8ddd1e625a4781b4
6a4921ae044186bf64dab3903e8fead9499fc7f6 10-Mar-2017 Jeff Tinker <jtinker@google.com> Fix mediadrmserver not finding IServiceManager instance

bug: 36113291
Change-Id: I8d459e0edd61555a874cce68e178afd8d468e2e4
abeb36a8c2f044772297536e70340c3b245863e4 17-Feb-2017 Jeff Tinker <jtinker@google.com> Load vendor-provided drm hidl hal modules

Prior to this change, the default legacy hal
module was explicitly referenced. This change
uses the service manager to iterate through
any hal instances so vendor-provided hals
can be loaded.

Change-Id: I23bc4fdb2dc7d5254833c9a977241f1fede726a9
3cb5316c442d182ada75a1394e1505a017400526 16-Feb-2017 Jeff Tinker <jtinker@google.com> 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.


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

Change-Id: Icada005f515483d7bc214b08caf6eea46ca354a7
a53d6553fce1818bdf87833f93633c93ad1b5915 20-Jan-2017 Jeff Tinker <jtinker@google.com> Implement client code to use Drm and Crypto HALs

This change adds DrmHal & CryptoHal classes that connect to the Treble
HAL interfaces for drm. These classes mirror the existing Drm and
Crypto classes that connect to the DrmPlugin and CryptoPlugin
interfaces. Having both allows mediadrmserver to run in either mode
while the HAL is stabilized.

The shared memory interfaces between mediaserver's ACodecBufferChannel
and ICrypto had to be reworked to use the Treble HALs. Specifically,
the shared memory path for returning decrypted buffers in the
non-secure case had to become separate instead of piggy-backing on the
source shared memory buffer. A separate shared memory destination
buffer is now allocated on the buffer channel. An abstraction for a
decrypt destination buffer was also introduced to clarify ICrypto's
decrypt method.

Tests: Playback using Play Movies and ExoPlayer works on angler
with and without the treble hal enabled.

bug: 32815560
Change-Id: I5a3dc84f99902eb8cf8eabab9ad074d307744950