Commit Graph

10138 Commits

Author SHA1 Message Date
TreeHugger Robot
aacd099aca Merge "Fixed AudioMixingRule usage of AudioAttribute#getUsage" into sc-dev am: 3582d5cb2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14342205

Change-Id: Ia421bd4439b8c54260b6769f31832e45b7931778
2021-05-07 20:29:20 +00:00
TreeHugger Robot
3582d5cb2d Merge "Fixed AudioMixingRule usage of AudioAttribute#getUsage" into sc-dev 2021-05-07 20:06:35 +00:00
Lajos Molnar
ae50a224c0 Merge "media: propagate profiles to EncoderProfiles" into sc-dev am: 4fa6d3a873
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14417793

Change-Id: Ibfd3c693ad80cc7c6a90f1fb917ba16ac14095fa
2021-05-07 15:06:59 +00:00
Lajos Molnar
4fa6d3a873 Merge "media: propagate profiles to EncoderProfiles" into sc-dev 2021-05-07 15:02:15 +00:00
TreeHugger Robot
ab5181226f Merge "Check the device type instead of the object reference" into sc-dev am: c9c67d25f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14326778

Change-Id: I9ab962148c85b6b9a13ffb42197a00a17c9837f7
2021-05-07 04:12:55 +00:00
Sungsoo Lim
027d957f92 Check the device type instead of the object reference
Also print a log when restore route to default while a bluetooth
route is avaialble.

Bug: 176386259
Test: build
Change-Id: I4a974438040595597fbf4dcb0ec57d49351540ef
2021-05-07 10:56:15 +09:00
TreeHugger Robot
93a2c2313e Merge "SoundPool: Update documentation for sound duration" into sc-dev am: ca3cc01d0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14430916

Change-Id: Ic2887ae3118bd9f54eefc2a7969a5443a0007bc3
2021-05-05 22:05:22 +00:00
TreeHugger Robot
ca3cc01d0d Merge "SoundPool: Update documentation for sound duration" into sc-dev 2021-05-05 21:56:23 +00:00
Lajos Molnar
544b4cffa9 Merge "media: pass full EncoderProfiles from XML" into sc-dev am: 0c361a917d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14392857

Change-Id: I6e79a926a73f0ff451f1ba946cf018e187bf0385
2021-05-05 17:13:43 +00:00
Andy Hung
b3b3a741d5 SoundPool: Update documentation for sound duration
Test: make docs and view
Bug: 147408160
Change-Id: I8952dd7da2ab8e493415e93f10f2346af3de2bd1
2021-05-04 15:36:40 -07:00
Lajos Molnar
16ceab17a0 media: propagate profiles to EncoderProfiles
Bug: 171673898
Test: atest CamcorderProfileTest
Change-Id: I486762863cd29239b44846b54b146458426b643b
2021-05-03 23:27:42 -07:00
Lajos Molnar
973b2e89bd media: pass full EncoderProfiles from XML
Get multiple audio/video codec profiles from MediaProfiles object
instead of just wrapping the old CamcorderProfiles objects.

Bug: 171673898
Test: atest CamcorderProfileTest
Change-Id: If56ac6c2a89992361f0491d8175af1f89dffd3d0
2021-05-03 23:27:42 -07:00
Santiago Seifert
9642d628ab Merge "Rename MediaExtractor symbols to log session id" into sc-dev 2021-05-01 10:51:09 +00:00
Santiago Seifert
14cdc32bd0 Rename MediaExtractor symbols to log session id
Test: atest CtsMediaHostTestCases
Bug: 167036690
Change-Id: I2e71d460e6907400daeba21fd6a76fa0ea5e0922
Merged-In: I2e71d460e6907400daeba21fd6a76fa0ea5e0922
2021-04-30 22:32:55 +00:00
Santiago Seifert
163e1e55a5 Merge "Rename MediaExtractor symbols to log session id" 2021-04-30 21:06:32 +00:00
Santiago Seifert
36a551bc29 Rename MediaExtractor symbols to log session id
Test: atest CtsMediaHostTestCases
Bug: 167036690
Change-Id: I2e71d460e6907400daeba21fd6a76fa0ea5e0922
2021-04-30 18:18:30 +00:00
Hyundo Moon
41306e2cae Merge "Fix failing MediaRouter2ManagerTest" into sc-dev am: b2de16f23f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14319869

Change-Id: Iacb7d5c89549f0f3dcba3af59ae5b4147dfd2b6e
2021-04-30 08:49:51 +00:00
Hyundo Moon
b2de16f23f Merge "Fix failing MediaRouter2ManagerTest" into sc-dev 2021-04-30 08:29:37 +00:00
Oscar Azucena
b4cca57bfc Fixed AudioMixingRule usage of AudioAttribute#getUsage
Given that system usages were added to the AudioAttributes, system
components need to use the API were applicable. AudioMixingRule was
missing this and thus the audio attribute usage base routing did not
work correctly. In particular the registration of the audio policy mixing
rules would not register the system usages based routing correctly.
Instead, the match usage rule would default to unknown usage instead of
the requested system usage.

Bug: 186661937
Bug: 186442942
Bug: 186158497
Test: build gcar_emu_x86 and run car kitchen sink to make sure routing
    performed as expected.
Change-Id: I4aaedf1b6b9144bd2e84d2d7112b5ebcf744a8b2
2021-04-29 22:18:15 -07:00
Hyundo Moon
34029e0082 Fix failing MediaRouter2ManagerTest
The test failed for several reasons:
 - When other real cast device is present, tests are run before actual
   routes arrive.
 - Screen is not turned on during test.
 - Test lacks MEDIA_CONTENT_CONTROL permission.

This CL fixes the test.

Bug: 186190171
Test: atest com.android.mediaroutertest.MediaRouter2ManagerTest \
        --rerun-until-failure
Change-Id: I6f86ae7cba25871ffb7c8ee96f4c8db6bd86b816
2021-04-27 17:59:47 +09:00
TreeHugger Robot
b99a068c9f Merge "trancoding: lazy-start transcoding service" into sc-dev am: e82e6627b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14314704

Change-Id: If252d21f5f636244c984ab95db8bc6ab1d537a74
2021-04-27 02:30:28 +00:00
Chong Zhang
0621358a52 trancoding: lazy-start transcoding service
bug: 186387244
test: atest MediaTranscodeManagerTest; unit tests
Change-Id: I354f32d062b9a46ddfc9f86d5f79c778809799a4
2021-04-26 22:06:25 +00:00
TreeHugger Robot
dfff42c4be Merge "media: polish EncoderProfiles" into sc-dev am: 386e8ba090
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14278069

Change-Id: I35a48e27ddde31c6f491b1fded889fc334d40e95
2021-04-22 18:52:23 +00:00
TreeHugger Robot
386e8ba090 Merge "media: polish EncoderProfiles" into sc-dev 2021-04-22 18:03:17 +00:00
Eric Laurent
eeb99ee79d Merge changes Iaa920c07,I4eb8046a into sc-dev am: d703642add
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14272929

Change-Id: I4b296b77dac704d297d98ece04e8b1a5e883a3a0
2021-04-22 14:30:25 +00:00
Eric Laurent
d703642add Merge changes Iaa920c07,I4eb8046a into sc-dev
* changes:
  HwAudioSource: wrong native handle check
  AudioSystem: startAudioSource: ensure port handle initialized
2021-04-22 14:14:49 +00:00
Jean-Michel Trivi
9d3b189dfc Merge "AudioManager: add API for mode listener" into sc-dev am: ec16222b30
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14253670

Change-Id: I072121a1e67e22ae3fc3a7b2c11b3b282a62f6a4
2021-04-22 13:58:52 +00:00
Francois Gaffie
5253a31c7a HwAudioSource: wrong native handle check
Playing status of audio source is checked using the native handler
not 0.
However, if AudioSystem#startAudioSource fails, the native handler
returned is not 0, but an error code.
In fact AudioPolicyManager sets the PORT to NONE (0) and sets an error
status.
JNI layer transforms the failure status into a native handler returned
to the caller.

Bug: 186088557
Test: make

Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: Iaa920c073885c2556a93a1b5ae23467fa6ffad4f
2021-04-22 11:24:52 +02:00
Lajos Molnar
4ef563a2a5 media: polish EncoderProfiles
Made inner classes private.
Added IntDef annotations (also to related CamcorderProfiles methods).
Deprecated CamcorderProfiles.get methods.

Bug: 184714224
Test: atest CamcorderProfileTest
Change-Id: Ibbacb7d3c5f3558f82c109bf36a64f6a3e369b31
2021-04-21 22:20:37 -07:00
Nate Myren
08635fe057 AudioManager: add API for mode listener
New API to add/remove a listener for changes to the audio
mode (see existing AudioManager.getMode() API).

Bug: 184891081
Test: atest android.media.cts.AudioModeListenerTest
Change-Id: I0be07d577c7497066b61a1573752343227605fd7
2021-04-21 20:19:46 -07:00
Andy Hung
4874e41af7 Merge "Audio: Add ENCODING_DRA" into sc-dev am: 7f4e3745ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14258320

Change-Id: I30e9ce061e2916f0a0dcb32ad7179f048ef07b86
2021-04-21 22:16:55 +00:00
Andy Hung
7f4e3745ae Merge "Audio: Add ENCODING_DRA" into sc-dev 2021-04-21 22:08:43 +00:00
Paul Mclean
c7c3637b53 Merge "Moving additional AudioManager tests to gts/GMSCore" 2021-04-21 19:58:37 +00:00
Eric Laurent
add38e0a94 Merge "AudioRecord: Allow to share capture history." into sc-dev am: 21d375cdb6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14186650

Change-Id: I1efec4c6e2469b1eb3a448a8a55e5dbe7f356a6e
2021-04-21 17:19:23 +00:00
Eric Laurent
21d375cdb6 Merge "AudioRecord: Allow to share capture history." into sc-dev 2021-04-21 17:03:28 +00:00
Andy Hung
60a7a8cc02 Merge "MediaFormat: Update constants for MPEG-H codecs" am: ca57ecee1b am: 3d46fe5294 am: f286036ab3 am: e1bfbd683b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680925

Change-Id: I740cfc2df7c494dfdef8169dbdc1ae9b550945e2
2021-04-21 16:35:52 +00:00
Andy Hung
e1bfbd683b Merge "MediaFormat: Update constants for MPEG-H codecs" am: ca57ecee1b am: 3d46fe5294 am: f286036ab3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680925

Change-Id: I68b1d8518691cb7858a29de7675384d3792e1b1a
2021-04-21 16:15:34 +00:00
Andy Hung
f286036ab3 Merge "MediaFormat: Update constants for MPEG-H codecs" am: ca57ecee1b am: 3d46fe5294
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680925

Change-Id: Ia10684622673a6a9875aebc85667be794a958d0a
2021-04-21 16:01:31 +00:00
Andy Hung
ca57ecee1b Merge "MediaFormat: Update constants for MPEG-H codecs" 2021-04-21 15:21:01 +00:00
Eric Laurent
c670e06157 AudioRecord: Allow to share capture history.
Add the possibility for privileged applications to
share part of their audio capture history with another app.

A privileged app with permission CAPTURE_AUDIO_HOTWORD can share part of
its recent capture history on a given AudioRecord with the following
steps:
1) Specify the maximum time in the past that will be available for other
apps by calling setMaxSharedAudioHistoryMillis() on the AudioRecord.Builder
when creating the AudioRecord
2) Start recording and determine where the other app should start
capturing in the past.
3) Call AudioRecord.shareAudioHistory() with the package name of the app the history
will be shared with and the intended start time for this app's capture relative to
this AudioRecord's start time.
4) Communicate the MediaSyncEvent returned by shareAudioHistory() to the other app
5) The other app will use the MediaSyncEvent when creating its AudioRecord by calling
setSharedAudioEvent() on the AudioRecord.Builder.
6) Only after the other app has started capturing can this app stop capturing and
release its AudioRecord.

Bug: 183705547
Test: regression on capture use cases

Change-Id: I5beba6c1e489148a14ba86165b8ef2fdc78c802a
2021-04-21 12:00:00 +02:00
Andy Hung
fb082f6463 Audio: Add ENCODING_DRA
China DTMB digital TV.
See SJ/T11368-2006
“Specification for multichannel digital audio coding technology”.

Test: atest AudioFormatTest
Bug: 185950819
Change-Id: Id6078e65941020a73f8a43017f480574c2a78999
2021-04-20 19:12:59 -07:00
Kyunglyul Hyun
0fd3bb1488 Merge "Revert^2 "Change PlaybackState#isActiveState to isActive"" into sc-dev am: 05df0a936c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14206616

Change-Id: Id0028c5a084c8547c3cbe467e2e4b833789cd728
2021-04-21 02:04:42 +00:00
Kyunglyul Hyun
05df0a936c Merge "Revert^2 "Change PlaybackState#isActiveState to isActive"" into sc-dev 2021-04-21 01:56:15 +00:00
Hyundo Moon
e1f62c9a2e Merge changes from topic "system_mr2_media_content_control" into sc-dev am: 013cf241a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14182411

Change-Id: I0f41527546a7df000279786b8d883f9ffed262eb
2021-04-21 01:54:59 +00:00
Hyundo Moon
013cf241a1 Merge changes from topic "system_mr2_media_content_control" into sc-dev
* changes:
  System MediaRouter2: Resolve API review
  Change MODIFY_AUDIO_ROUTING permission to MEDIA_CONTENT_CONTROL
2021-04-21 01:45:42 +00:00
Andy Hung
1f53224da2 Merge changes from topics "360RA channel mask", "audio channels" am: b1060eb9f5 am: d6c0a357ab am: c1b0ca6a32 am: 05be3db5ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669510

Change-Id: I203482171a92e0a25de911f53998ce8518b019c3
2021-04-21 01:40:42 +00:00
Andy Hung
05be3db5ae Merge changes from topics "360RA channel mask", "audio channels" am: b1060eb9f5 am: d6c0a357ab am: c1b0ca6a32
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669510

Change-Id: I94aa095ed5ba59acac76a59a46acca90dd383359
2021-04-21 01:28:31 +00:00
Andy Hung
c1b0ca6a32 Merge changes from topics "360RA channel mask", "audio channels" am: b1060eb9f5 am: d6c0a357ab
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669510

Change-Id: I2fbce01d6817edb9ea41284f38fe2fa09d5eea79
2021-04-21 01:03:54 +00:00
Andy Hung
985bfbcc1d MediaFormat: Update constants for MPEG-H codecs
Bug: 185842397
Test: atest MediaFormatTest
Change-Id: I1f287ec9a1852a3c88ce3b3b22e8fb52add4f81c
2021-04-20 14:38:51 -07:00
Kei Murayama
209bf897de AudioFormat: Support 13ch audio layout for 360 Reality Audio
- Add definitions for the front bottom channels. The name
   of the definitions are standardized in ITU-R BS.2051-1.
 - Add definition for 13ch mask which consists of surround 5
   channels, top 5 channels and bottom 3ch channels. This
   channel mask is ideal speaker layout used by Sony 360
   Reality Audio. Virtualizer can place individual sounds in
   a 360 spherical sound field from these channels on any
   headphones.

Ignoring checkstyle warning, "'|' should be on a new line",
to keep existing codestyle.

Bug: 185100731
Test: atest AudioFormatTest
Test: Play wav with 13ch mask after OUT_CHANNEL_COUNT_MAX to 24
Change-Id: I2b4deaac740a08ae3b1b8d8453650a876e2d6206
2021-04-20 14:16:21 -07:00