OSDN Git Service

android-x86/system-media.git
7 years agoAdd power logging
Andy Hung [Sat, 11 Mar 2017 01:07:23 +0000 (17:07 -0800)]
Add power logging

PowerLog captures the audio data power (measured in dBFS) over time.

Test: power_tests
Bug: 30572472
Change-Id: If8977f9b8f9d2d15ea07bc32bed7f802513a742b

7 years agofifo: handle overrun correctly
Glenn Kasten [Mon, 6 Mar 2017 22:58:33 +0000 (14:58 -0800)]
fifo: handle overrun correctly

On overrun, allow a non-throttling reader to read any frames not yet overwritten.

Also provide an exact count of lost frames rather than an estimate,
when the fifo is configured with a non-power-of-2 capacity.

Bug: 36003483
Test: media.log and fifo interactive unit test
Change-Id: Ia0a7b6f1043f1cd34f6b4fa779785afeff34c5c9

7 years agoMerge "fifo: Update documentation for non-NULL buffer pointers"
Glenn Kasten [Tue, 7 Mar 2017 20:22:15 +0000 (20:22 +0000)]
Merge "fifo: Update documentation for non-NULL buffer pointers"

7 years agofifo: Update documentation for non-NULL buffer pointers
Glenn Kasten [Mon, 5 Dec 2016 20:05:00 +0000 (12:05 -0800)]
fifo: Update documentation for non-NULL buffer pointers

Test: comments only, should not require re-test
Bug: 36003458
Change-Id: I92610263c4d46e161c205096422e1cb3eb3a4243

7 years agoMerge "audio: add missing flags and devices"
Eric Laurent [Tue, 7 Mar 2017 01:22:40 +0000 (01:22 +0000)]
Merge "audio: add missing flags and devices"

7 years agoMerge "Convert libbinderwrapper_test_support to static library." am: f4de44321e am...
Alex Deymo [Sat, 4 Mar 2017 07:14:23 +0000 (07:14 +0000)]
Merge "Convert libbinderwrapper_test_support to static library." am: f4de44321e am: 9bf9240362
am: db8322cb30

Change-Id: I3d6fb4058a780428dbd5e23c0cdad3880af65e1d

7 years agoMerge "Convert libbinderwrapper_test_support to static library." am: f4de44321e
Alex Deymo [Sat, 4 Mar 2017 07:11:22 +0000 (07:11 +0000)]
Merge "Convert libbinderwrapper_test_support to static library." am: f4de44321e
am: 9bf9240362

Change-Id: Iac13483ef696c22f6edfecd0c61341ba45a2d98a

7 years agoMerge "Convert libbinderwrapper_test_support to static library."
Alex Deymo [Sat, 4 Mar 2017 07:08:51 +0000 (07:08 +0000)]
Merge "Convert libbinderwrapper_test_support to static library."
am: f4de44321e

Change-Id: I22589184436e0687a749b300a44192ce4ca1918e

7 years agoMerge "Convert libbinderwrapper_test_support to static library."
Treehugger Robot [Sat, 4 Mar 2017 07:03:34 +0000 (07:03 +0000)]
Merge "Convert libbinderwrapper_test_support to static library."

7 years agoConvert libbinderwrapper_test_support to static library.
Alex Deymo [Sat, 4 Mar 2017 00:15:21 +0000 (16:15 -0800)]
Convert libbinderwrapper_test_support to static library.

Bug: 35804180
Test: `make checkbuild`
Change-Id: I334a0ad608ea6a7742529cd0f369530abe7ab02e

7 years agoaudio: add missing flags and devices
Eric Laurent [Sat, 4 Mar 2017 00:37:12 +0000 (16:37 -0800)]
audio: add missing flags and devices

Add missing devices for USB headset to allow distinction between USB
sound cards and simple USB headsets
Add output and input flags indicating special output and input profiles
to used for VoIP streams.

Test: make.
Change-Id: I54c5b08fcf2e1d9342e8a11244ac3e00d052bb89

7 years agoUpdate audio*-base.h
Steven Moreland [Fri, 24 Feb 2017 21:16:05 +0000 (13:16 -0800)]
Update audio*-base.h

Test: pass
Bug: 33541458
Change-Id: I0a779ab41cbf471d3e13b4492c99f7d9d2bd65fa

7 years agoaudio_route: Fix cleanup of 'audio_route' structure
Mikhail Naganov [Thu, 23 Feb 2017 21:12:36 +0000 (13:12 -0800)]
audio_route: Fix cleanup of 'audio_route' structure

'path_free' function was not updating 'num_mixer_paths' after
freeing 'mixer_path' array, which was leading to a crash during
a subsequent call to 'path_get_by_name'.

Bug: 35445650
Change-Id: Ie47bb2e548fde89d9519ac726618fcf2e72da286
Test: with BT A2DP connected, kill system_server, watch logcat

7 years agoMerge "Audio HAL: extensions for new SoC features"
Mikhail Naganov [Tue, 31 Jan 2017 19:38:07 +0000 (19:38 +0000)]
Merge "Audio HAL: extensions for new SoC features"

7 years agoMerge "Implement radio_metadata wrapper for safer memory management." am: fe81805384...
Tomasz Wasilczyk [Fri, 27 Jan 2017 20:49:47 +0000 (20:49 +0000)]
Merge "Implement radio_metadata wrapper for safer memory management." am: fe81805384 am: cf9d8d70c5 am: 468470f755
am: aaa26d246d

Change-Id: Ifc0cd6329f71b99b2f20e5ca11584ffa946de4b7

7 years agoMerge "Implement radio_metadata wrapper for safer memory management." am: fe81805384...
Tomasz Wasilczyk [Fri, 27 Jan 2017 20:42:19 +0000 (20:42 +0000)]
Merge "Implement radio_metadata wrapper for safer memory management." am: fe81805384 am: cf9d8d70c5
am: 468470f755

Change-Id: I4a38099e8b1c5a18714ab3d28f5a9b8793c87e51

7 years agoMerge "Implement radio_metadata wrapper for safer memory management." am: fe81805384
Tomasz Wasilczyk [Fri, 27 Jan 2017 20:38:58 +0000 (20:38 +0000)]
Merge "Implement radio_metadata wrapper for safer memory management." am: fe81805384
am: cf9d8d70c5

Change-Id: Ibada73a9f840ddb7f82e96f9891b184b3c89d017

7 years agoMerge "Implement radio_metadata wrapper for safer memory management."
Tomasz Wasilczyk [Fri, 27 Jan 2017 20:32:57 +0000 (20:32 +0000)]
Merge "Implement radio_metadata wrapper for safer memory management."
am: fe81805384

Change-Id: I33baba501b70de5939f623b8ca69c5cc46ac96e4

7 years agoMerge "Implement radio_metadata wrapper for safer memory management."
Tomasz Wasilczyk [Fri, 27 Jan 2017 20:26:06 +0000 (20:26 +0000)]
Merge "Implement radio_metadata wrapper for safer memory management."

7 years agoAudio HAL: extensions for new SoC features
Mikhail Naganov [Mon, 23 Jan 2017 18:45:19 +0000 (10:45 -0800)]
Audio HAL: extensions for new SoC features

Extend audio channel mask.

Added AC4 format.

Change-Id: I413ff4099601e6d8449593cc88ee55dda1d9d8e9
Test: make

7 years agoImplement radio_metadata wrapper for safer memory management.
Tomasz Wasilczyk [Mon, 23 Jan 2017 22:33:50 +0000 (14:33 -0800)]
Implement radio_metadata wrapper for safer memory management.

Bug: b/34054813
Test: VTS, manual - both done in internal branch
Change-Id: If9c27669bb0d75ca67b75a761afe4cdc9dc51f0b

7 years agoMerge "camera: Add enableZsl key"
TreeHugger Robot [Thu, 26 Jan 2017 01:23:22 +0000 (01:23 +0000)]
Merge "camera: Add enableZsl key"

7 years agoMerge "Add AUDIO_FLAG_DEEP_BUFFER and AUDIO_FLAG_NONE for AudioAttributes"
TreeHugger Robot [Thu, 26 Jan 2017 00:22:49 +0000 (00:22 +0000)]
Merge "Add AUDIO_FLAG_DEEP_BUFFER and AUDIO_FLAG_NONE for AudioAttributes"

7 years agocamera: Add enableZsl key
Chien-Yu Chen [Mon, 9 Jan 2017 23:55:06 +0000 (15:55 -0800)]
camera: Add enableZsl key

Add enableZsl key so the apps can choose to allow or disallow out of
order frame contents and metadata like timestamp.

Test: Updated camera CTS tests pass
Bug: 30983997
Change-Id: I7d0fd82e551bb50420c438472e5240f3fee65d73

7 years agoaudio: add missing definition for stub HAL module name
Eric Laurent [Thu, 19 Jan 2017 01:07:08 +0000 (17:07 -0800)]
audio: add missing definition for stub HAL module name

Bug: 34360879
Test: make and check stub HAL is loaded in HIDL passthrough mode

Change-Id: Ibb90a7f77baf910b6c68c1a5adf1c39c8a8d9906

7 years agoAdd AUDIO_FLAG_DEEP_BUFFER and AUDIO_FLAG_NONE for AudioAttributes
Andy Hung [Fri, 13 Jan 2017 03:14:19 +0000 (19:14 -0800)]
Add AUDIO_FLAG_DEEP_BUFFER and AUDIO_FLAG_NONE for AudioAttributes

Test: AudioTrack CTS test, Play Movies
Bug: 30687201
Change-Id: Iba30763a7ad930675453a9acb855c080c4da8c6a

7 years agoMerge "liblog: use log/log.h when utilizing ALOG macros" am: 1fb716a12b am: b239ca4c9...
Mark Salyzyn [Wed, 11 Jan 2017 18:59:20 +0000 (18:59 +0000)]
Merge "liblog: use log/log.h when utilizing ALOG macros" am: 1fb716a12b am: b239ca4c99 am: f70588249e
am: c464b07573

Change-Id: I003bd76cf3dd0662c59b9e59b59fae3eb919d950

7 years agoMerge "liblog: use log/log.h when utilizing ALOG macros" am: 1fb716a12b am: b239ca4c99
Mark Salyzyn [Wed, 11 Jan 2017 18:53:20 +0000 (18:53 +0000)]
Merge "liblog: use log/log.h when utilizing ALOG macros" am: 1fb716a12b am: b239ca4c99
am: f70588249e

Change-Id: If008012618637a2a53a64c1ee580318bee6b63d6

7 years agoMerge "liblog: use log/log.h when utilizing ALOG macros" am: 1fb716a12b
Mark Salyzyn [Wed, 11 Jan 2017 18:48:19 +0000 (18:48 +0000)]
Merge "liblog: use log/log.h when utilizing ALOG macros" am: 1fb716a12b
am: b239ca4c99

Change-Id: I72bacdf8bca3f057ef26721520042907e62d8d4c

7 years agoMerge "liblog: use log/log.h when utilizing ALOG macros"
Mark Salyzyn [Wed, 11 Jan 2017 18:42:18 +0000 (18:42 +0000)]
Merge "liblog: use log/log.h when utilizing ALOG macros"
am: 1fb716a12b

Change-Id: I2281b2971bc4557f566da755884e7c7465e4c9bb

7 years agoMerge "liblog: use log/log.h when utilizing ALOG macros"
Treehugger Robot [Wed, 11 Jan 2017 18:36:13 +0000 (18:36 +0000)]
Merge "liblog: use log/log.h when utilizing ALOG macros"

7 years agoliblog: use log/log.h when utilizing ALOG macros
Mark Salyzyn [Tue, 10 Jan 2017 22:29:16 +0000 (14:29 -0800)]
liblog: use log/log.h when utilizing ALOG macros

Test: compile
Bug: 30465923
Change-Id: I4329b7dc918b732b07662a27c52e3b431ffabd3d

7 years agoDefine AUDIO_USAGE_ASSISTANT in list of audio attributes usage
Jean-Michel Trivi [Thu, 29 Dec 2016 20:22:06 +0000 (12:22 -0800)]
Define AUDIO_USAGE_ASSISTANT in list of audio attributes usage

This change was autogenerated from an update in
  hardware/interfaces/audio/common/2.0/types.hal
with script
  hardware/interfaces/update-base-files.sh

Test: make
Bug: 30947943
Change-Id: I703b30e9a55299a0db84613361af537aa7d7c599

7 years agoMerge "media: Replace cutils/log.h with android/log.h or log/log.h" am: c8a6e3ea23...
Mark Salyzyn [Tue, 27 Dec 2016 22:07:26 +0000 (22:07 +0000)]
Merge "media: Replace cutils/log.h with android/log.h or log/log.h" am: c8a6e3ea23 am: 6f84b4a716 am: bbe900ad12
am: 5af7309214

Change-Id: I0c2a7a0727acf4a97506ee801c4f081145a88ff1

7 years agoMerge "media: Replace cutils/log.h with android/log.h or log/log.h" am: c8a6e3ea23...
Mark Salyzyn [Tue, 27 Dec 2016 22:00:26 +0000 (22:00 +0000)]
Merge "media: Replace cutils/log.h with android/log.h or log/log.h" am: c8a6e3ea23 am: 6f84b4a716
am: bbe900ad12

Change-Id: I4ee9513b768984ab477c3585bd5e78032208c092

7 years agoMerge "media: Replace cutils/log.h with android/log.h or log/log.h" am: c8a6e3ea23
Mark Salyzyn [Tue, 27 Dec 2016 21:52:55 +0000 (21:52 +0000)]
Merge "media: Replace cutils/log.h with android/log.h or log/log.h" am: c8a6e3ea23
am: 6f84b4a716

Change-Id: I3b93f676e39094a3ca5e2161e968185662f6dcf2

7 years agoMerge "media: Replace cutils/log.h with android/log.h or log/log.h"
Mark Salyzyn [Tue, 27 Dec 2016 21:45:24 +0000 (21:45 +0000)]
Merge "media: Replace cutils/log.h with android/log.h or log/log.h"
am: c8a6e3ea23

Change-Id: Iddd2d6d623ba7e6b605937def3bc9b0ac36b4d38

7 years agoMerge "media: Replace cutils/log.h with android/log.h or log/log.h"
Treehugger Robot [Tue, 27 Dec 2016 21:34:30 +0000 (21:34 +0000)]
Merge "media: Replace cutils/log.h with android/log.h or log/log.h"

7 years agomedia: Replace cutils/log.h with android/log.h or log/log.h
Mark Salyzyn [Wed, 28 Sep 2016 22:40:31 +0000 (15:40 -0700)]
media: Replace cutils/log.h with android/log.h or log/log.h

- replace cutils/log.h with android/log.h (main buffer logging)
- replace cutils/log.h with log.log.h (+SafetyNet logging)

Test: compile
Bug: 26552300
Bug: 32189077
Change-Id: Icda4d5ab7555c0b801fd362fdcfa65b1500612b4

7 years agoMerge "Add system/media/Android.bp" am: 0eb9eac06d am: 138805b4e5 am: f6e848ea0e
Dan Willemsen [Tue, 20 Dec 2016 21:10:51 +0000 (21:10 +0000)]
Merge "Add system/media/Android.bp" am: 0eb9eac06d am: 138805b4e5 am: f6e848ea0e
am: 5fe9d20ae7

Change-Id: Ie6830955695d2931cdd83ea2f6b18c608aab79e3

7 years agoMerge "Add system/media/Android.bp" am: 0eb9eac06d am: 138805b4e5
Dan Willemsen [Tue, 20 Dec 2016 21:00:50 +0000 (21:00 +0000)]
Merge "Add system/media/Android.bp" am: 0eb9eac06d am: 138805b4e5
am: f6e848ea0e

Change-Id: I5472ee8eb49501a18e895643944ccb51b93373bc

7 years agoMerge "Add system/media/Android.bp" am: 0eb9eac06d
Dan Willemsen [Tue, 20 Dec 2016 20:42:11 +0000 (20:42 +0000)]
Merge "Add system/media/Android.bp" am: 0eb9eac06d
am: 138805b4e5

Change-Id: Ib17b17aee989e69cc9c8d212704c94f84b6e4393

7 years agoMerge "Add system/media/Android.bp"
Dan Willemsen [Tue, 20 Dec 2016 20:33:27 +0000 (20:33 +0000)]
Merge "Add system/media/Android.bp"
am: 0eb9eac06d

Change-Id: Ic355591646ebc2815107f871dc9e26680cca7704

7 years agoMerge "Add system/media/Android.bp"
Treehugger Robot [Tue, 20 Dec 2016 20:25:08 +0000 (20:25 +0000)]
Merge "Add system/media/Android.bp"

7 years agoAdd system/media/Android.bp
Dan Willemsen [Tue, 20 Dec 2016 18:52:30 +0000 (10:52 -0800)]
Add system/media/Android.bp

Test: Soong's build.ninja identical before/after (except GlobRules)
Change-Id: Ib294d1afcfcc311748f436232d27ed381dc99fb6

7 years agofifo: non-throttling reader doesn't see data already written
Glenn Kasten [Fri, 16 Dec 2016 20:42:26 +0000 (12:42 -0800)]
fifo: non-throttling reader doesn't see data already written

Test: see the multi-reader interactive test
Change-Id: I0663a8e90efc094fef09401c6e2ecd3391100efa

7 years agoaudio: add definitions for MMAP stream mode
Eric Laurent [Fri, 9 Dec 2016 22:32:30 +0000 (14:32 -0800)]
audio: add definitions for MMAP stream mode

Bug: 33398120
Test: make marlin-eng

Change-Id: I7892f1e0920df05aa4f8dbf459a02a8b6e27958d

7 years agoMerge "fifo: add index references with caching and deferred operations"
Glenn Kasten [Wed, 14 Dec 2016 16:37:05 +0000 (16:37 +0000)]
Merge "fifo: add index references with caching and deferred operations"

7 years agofifo: add index references with caching and deferred operations
Glenn Kasten [Wed, 30 Nov 2016 19:05:32 +0000 (11:05 -0800)]
fifo: add index references with caching and deferred operations

The new classes will eventually permit a set of related atomic operations,
wakes, and waits to be grouped together into a single sequence point,
and will allow use of event flags to wait for the "or" of multiple FIFOs.

This is one of a series of CLs to isolate the dependencies.

Test: not ready yet for testing
Change-Id: I2055b7a35721222cd914973cd210f5c0dca7d4ef

7 years agoMerge "Ran hardware/interfaces/update-base-files.sh."
TreeHugger Robot [Tue, 13 Dec 2016 19:31:02 +0000 (19:31 +0000)]
Merge "Ran hardware/interfaces/update-base-files.sh."

7 years agoMerge "Unique ID for audio players"
Jean-Michel Trivi [Tue, 13 Dec 2016 16:19:06 +0000 (16:19 +0000)]
Merge "Unique ID for audio players"

7 years agoRan hardware/interfaces/update-base-files.sh.
Steven Moreland [Mon, 12 Dec 2016 17:51:39 +0000 (09:51 -0800)]
Ran hardware/interfaces/update-base-files.sh.

Test: pass
Change-Id: Iafd710d21c3bd7d843894d945fc86b055a04dda6

7 years agoMerge "Audio HAL: extensions for new SoC features"
Mikhail Naganov [Wed, 7 Dec 2016 23:40:13 +0000 (23:40 +0000)]
Merge "Audio HAL: extensions for new SoC features"

7 years agoFix build by removing symlink
Glenn Kasten [Wed, 7 Dec 2016 18:30:33 +0000 (10:30 -0800)]
Fix build by removing symlink

Bug: 33379123
Test: builds OK
Change-Id: I4ff1662d0ffc66653b0139302cb25e9f3d2730ef

7 years agoUnique ID for audio players
Jean-Michel Trivi [Thu, 1 Dec 2016 16:33:56 +0000 (08:33 -0800)]
Unique ID for audio players

Add new type of unique ID to track high level players
  such as MediaPlayer or SoundPool.

Test: make
Bug: 30955183

Change-Id: I509a33cbf44260dd3ef48b956f41a2145b0ca9ef

7 years agoAudio HAL: extensions for new SoC features
Mikhail Naganov [Tue, 22 Nov 2016 02:38:12 +0000 (18:38 -0800)]
Audio HAL: extensions for new SoC features

Extended audio offload structure: added support to add bit_width,
offload buffer size and usage info.

Add support for direct PCM audio stream. Direct PCM stream
is used when pcm data required post processing in DSP. Direct PCM
stream is used for both track offload and PCM offload.

Add audio proxy source device.

Add support for additional audio formats: EVRC, QCELP, WMA, WMA,
AAC_ADIF, AMR, MP2, FLAC, ALAC, APE, DSD, LDAC.

Extend audio channel mask.

Test: make
Change-Id: If01c351a810015b1ff97fc9f2e62c49eba8ea069

7 years agoMerge "fifo: index is now a class instead of a struct"
Glenn Kasten [Sat, 3 Dec 2016 01:37:47 +0000 (01:37 +0000)]
Merge "fifo: index is now a class instead of a struct"

7 years agofifo: Fix build
Glenn Kasten [Sat, 3 Dec 2016 00:26:33 +0000 (16:26 -0800)]
fifo: Fix build

Test: builds OK on macOS
Change-Id: Icac55988f07fb4e4960edd218a33963b6908ce33

7 years agofifo: index is now a class instead of a struct
Glenn Kasten [Fri, 2 Dec 2016 23:04:39 +0000 (15:04 -0800)]
fifo: index is now a class instead of a struct

And confirm that it is POD with static_assert.

Test: builds OK
Change-Id: I9a703c38e9c67e406a1ac6a699a1ffd851efcb8a

7 years agofifo: isolate atomic and futex operations
Glenn Kasten [Fri, 2 Dec 2016 00:12:59 +0000 (16:12 -0800)]
fifo: isolate atomic and futex operations

Now all atomic and futex operations occur in fifo_index.cpp.
This implements these TODOs:
 - Abstract out atomic operations to audio_utils_fifo_index
 - Replace friend by setter and getter, and abstract the futex
This is one of a series of CLs to isolate the dependencies.

Test: builds OK on Android, host Linux, and host macOS
Change-Id: Ic4ec46d472c583dce8525f11ed8cb1db89928d30

7 years agofifo: pull out clock_nanosleep and futex to separate files
Glenn Kasten [Thu, 1 Dec 2016 16:30:21 +0000 (08:30 -0800)]
fifo: pull out clock_nanosleep and futex to separate files

This is one of a series of CLs to isolate the dependencies.

Test: builds OK on Android, host Linux, and host macOS
Change-Id: I8ffcab7b7c4acab141b09f75f593ebde1ebec31a

7 years agoMerge "Fix a typo in config rate check: 441000 -> 44100" am: 84e3d1d1e2 am: 7f7c9626d...
Pavlin Radoslavov [Thu, 1 Dec 2016 03:28:17 +0000 (03:28 +0000)]
Merge "Fix a typo in config rate check: 441000 -> 44100" am: 84e3d1d1e2 am: 7f7c9626de am: 819eafd923
am: 2bf4141a10

Change-Id: I7fd229ef487c726ff7f96b0377a7ebec3768af49

7 years agoMerge "Fix a typo in config rate check: 441000 -> 44100" am: 84e3d1d1e2 am: 7f7c9626de
Pavlin Radoslavov [Thu, 1 Dec 2016 03:22:46 +0000 (03:22 +0000)]
Merge "Fix a typo in config rate check: 441000 -> 44100" am: 84e3d1d1e2 am: 7f7c9626de
am: 819eafd923

Change-Id: I4a0c07f6cc8ec510747cf499a3b305bb323b1d44

7 years agoMerge "Fix a typo in config rate check: 441000 -> 44100" am: 84e3d1d1e2
Pavlin Radoslavov [Thu, 1 Dec 2016 03:17:45 +0000 (03:17 +0000)]
Merge "Fix a typo in config rate check: 441000 -> 44100" am: 84e3d1d1e2
am: 7f7c9626de

Change-Id: I76380d4d6685f359c947dff027069414402780df

7 years agoMerge "Fix a typo in config rate check: 441000 -> 44100"
Pavlin Radoslavov [Thu, 1 Dec 2016 03:12:45 +0000 (03:12 +0000)]
Merge "Fix a typo in config rate check: 441000 -> 44100"
am: 84e3d1d1e2

Change-Id: I3e570ab57af3f836f4224770301631b06e2204ba

7 years agoMerge "Fix a typo in config rate check: 441000 -> 44100"
Treehugger Robot [Thu, 1 Dec 2016 03:02:33 +0000 (03:02 +0000)]
Merge "Fix a typo in config rate check: 441000 -> 44100"

7 years agoMerge "fifo: add shutdown state"
Glenn Kasten [Wed, 30 Nov 2016 23:39:19 +0000 (23:39 +0000)]
Merge "fifo: add shutdown state"

7 years agoFix security vulnerability: potential OOB write in audioserver
rago [Wed, 30 Nov 2016 21:02:17 +0000 (13:02 -0800)]
Fix security vulnerability: potential OOB write in audioserver

Bug: 32705438
Bug: 32703959
Test: cts security test
(audio_effect.h moved to a different branch)

Change-Id: I36a2c19373e0a2c7bf90599c0ccbb9e0ad815f65

7 years agoFix a typo in config rate check: 441000 -> 44100
Pavlin Radoslavov [Wed, 30 Nov 2016 18:45:32 +0000 (10:45 -0800)]
Fix a typo in config rate check: 441000 -> 44100

Test: code compilation
Change-Id: I073e1a46723417259c265720168d90938fd38dd0

7 years agofifo: add shutdown state
Glenn Kasten [Tue, 22 Nov 2016 22:00:23 +0000 (14:00 -0800)]
fifo: add shutdown state

FIFO is marked shutdown after an "impossible" error is detected.
Usually this indicate that memory has become corrupted, or incorrect use
of the API.  Once the FIFO is marked shutdown, all APIs that can return
an error code will return -EIO, and all other APIs will become no-ops.

Test: see unit tests in tests/ directory
Change-Id: I559145d613c3783a699a9ced062dd5ff3676769d

7 years agoMerge "Count a11y stream as public stream"
Jean-Michel Trivi [Mon, 28 Nov 2016 22:24:36 +0000 (22:24 +0000)]
Merge "Count a11y stream as public stream"

7 years agoCount a11y stream as public stream
Jean-Michel Trivi [Wed, 23 Nov 2016 23:45:48 +0000 (15:45 -0800)]
Count a11y stream as public stream

Test: see bug
Bug: 30448020
Change-Id: Iad817f47d11e8766fea5d1c083823e2b132b606d

7 years agofifo: update documentation
Glenn Kasten [Tue, 22 Nov 2016 22:02:11 +0000 (14:02 -0800)]
fifo: update documentation

Test: builds OK
Change-Id: I5a3d0bdadc8613e8501b020457665135677f7b63

7 years agofifo: use const more
Glenn Kasten [Tue, 22 Nov 2016 22:00:53 +0000 (14:00 -0800)]
fifo: use const more

Test: builds OK
Change-Id: I81c4e656b65e9e50f3affb11aeb3b51b0a36e3f7

7 years agoMerge "Rename hysteresis-related symbols for clarity"
Glenn Kasten [Mon, 21 Nov 2016 20:13:03 +0000 (20:13 +0000)]
Merge "Rename hysteresis-related symbols for clarity"

7 years agoMerge "Fix a few clang-tidy warnings"
Glenn Kasten [Mon, 21 Nov 2016 20:12:52 +0000 (20:12 +0000)]
Merge "Fix a few clang-tidy warnings"

7 years agoFix a few clang-tidy warnings
Glenn Kasten [Fri, 18 Nov 2016 23:28:42 +0000 (15:28 -0800)]
Fix a few clang-tidy warnings

Test: still builds
Change-Id: I6583f4f600a24a0784cdda186f77d5cacffc6cc5

7 years agoRename hysteresis-related symbols for clarity
Glenn Kasten [Fri, 18 Nov 2016 21:34:01 +0000 (13:34 -0800)]
Rename hysteresis-related symbols for clarity

Test: builds OK
Change-Id: I47fc5c5b7cbe6354386e143a5f9a5b5f9f3322a6

7 years agoMerge "fifo: add new APIs, and other cleanup"
Glenn Kasten [Wed, 16 Nov 2016 20:53:33 +0000 (20:53 +0000)]
Merge "fifo: add new APIs, and other cleanup"

7 years agoMerge "audio_route: do not check for null pointer when freeing"
TreeHugger Robot [Mon, 14 Nov 2016 22:34:54 +0000 (22:34 +0000)]
Merge "audio_route: do not check for null pointer when freeing"

7 years agoaudio_route: do not check for null pointer when freeing
David Lin [Sat, 12 Nov 2016 01:43:16 +0000 (17:43 -0800)]
audio_route: do not check for null pointer when freeing

Remove null pointer checks when doing free()

Test: make

Change-Id: I29c3641aa66b2a56676fa1cc062055bbf16d67d3
Signed-off-by: David Lin <dtwlin@google.com>
7 years agofifo: add new APIs, and other cleanup
Glenn Kasten [Wed, 19 Oct 2016 19:14:46 +0000 (12:14 -0700)]
fifo: add new APIs, and other cleanup

New APIs:
 - buffer()
 - capacity()
 - flush()
 - frameSize()
 - totalFlushed()
 - totalLost()
 - totalReleased()

Pull up mFifo from writer and reader into the base provider class.

Update documentation.

Test: see unit tests in tests/ directory
Change-Id: I1957638c69e1c1dc742b6f024156def757736867

7 years agoradio metadata: add API to get channel and subchannel
Eric Laurent [Fri, 11 Nov 2016 01:41:23 +0000 (17:41 -0800)]
radio metadata: add API to get channel and subchannel

Change-Id: I5a5a3a58b8ec667f9a1d911210efd897fc7713cb

7 years agoMerge "Add AUDIO_UID_INVALID"
Andy Hung [Thu, 10 Nov 2016 19:15:45 +0000 (19:15 +0000)]
Merge "Add AUDIO_UID_INVALID"

7 years agoMove AUDIO_DEVICE_*_STUB to system/audio.h.
Mikhail Naganov [Tue, 8 Nov 2016 22:11:36 +0000 (14:11 -0800)]
Move AUDIO_DEVICE_*_STUB to system/audio.h.

This is needed so it can be used in TypeConverter.cpp

Bug: 32740394
Change-Id: Ie203df160b808818813c169733641b6ac68b96f5
Test: make & check on the device

7 years agoAdd AUDIO_UID_INVALID
Andy Hung [Tue, 8 Nov 2016 01:38:17 +0000 (17:38 -0800)]
Add AUDIO_UID_INVALID

Test: power manager should show correct uids for audio
Bug: 32713790
Change-Id: Ib6993e2f06b3fbf5a96942088fa1bae30c5f781f

7 years agoMerge "IAudioPolicyService is now in libaudioclient instead of libmedia" am: 76f97250...
Marco Nelissen [Mon, 7 Nov 2016 18:00:33 +0000 (18:00 +0000)]
Merge "IAudioPolicyService is now in libaudioclient instead of libmedia" am: 76f97250ff am: c58a77360c am: ff3b15b22e
am: 7a73cf02af

Change-Id: Ib5c3c7d3a527e47051d795be4a26e30f525c989a

7 years agoMerge "IAudioPolicyService is now in libaudioclient instead of libmedia" am: 76f97250...
Marco Nelissen [Mon, 7 Nov 2016 17:41:49 +0000 (17:41 +0000)]
Merge "IAudioPolicyService is now in libaudioclient instead of libmedia" am: 76f97250ff am: c58a77360c
am: ff3b15b22e

Change-Id: I8903ffc0ae1b6422d0e10a12817694f072c9a8c9

7 years agoMerge "IAudioPolicyService is now in libaudioclient instead of libmedia" am: 76f97250ff
Marco Nelissen [Mon, 7 Nov 2016 17:32:14 +0000 (17:32 +0000)]
Merge "IAudioPolicyService is now in libaudioclient instead of libmedia" am: 76f97250ff
am: c58a77360c

Change-Id: Id3f3ec80c10a4d698e6f38660cfc911337b91e69

7 years agoMerge "IAudioPolicyService is now in libaudioclient instead of libmedia"
Marco Nelissen [Mon, 7 Nov 2016 17:22:52 +0000 (17:22 +0000)]
Merge "IAudioPolicyService is now in libaudioclient instead of libmedia"
am: 76f97250ff

Change-Id: Ie85b93bdb1b0b004c4cfe9cd2f60cc8766781ced

7 years agoMerge "IAudioPolicyService is now in libaudioclient instead of libmedia"
Marco Nelissen [Mon, 7 Nov 2016 17:14:24 +0000 (17:14 +0000)]
Merge "IAudioPolicyService is now in libaudioclient instead of libmedia"

7 years agoIAudioPolicyService is now in libaudioclient instead of libmedia
Marco Nelissen [Fri, 4 Nov 2016 16:40:24 +0000 (09:40 -0700)]
IAudioPolicyService is now in libaudioclient instead of libmedia

Test: build
Change-Id: I865f3c4bc3a4823802944501f2b3f86711059356

7 years agoMerge "IAudioPolicyService is now in libaudioclient instead of libmedia"
Marco Nelissen [Fri, 4 Nov 2016 21:53:53 +0000 (21:53 +0000)]
Merge "IAudioPolicyService is now in libaudioclient instead of libmedia"

7 years agoIAudioPolicyService is now in libaudioclient instead of libmedia
Marco Nelissen [Fri, 4 Nov 2016 16:40:24 +0000 (09:40 -0700)]
IAudioPolicyService is now in libaudioclient instead of libmedia

Test: build
Change-Id: I865f3c4bc3a4823802944501f2b3f86711059356

7 years agoFix build with MacOS 10.12 SDK
Dan Willemsen [Thu, 3 Nov 2016 20:55:28 +0000 (13:55 -0700)]
Fix build with MacOS 10.12 SDK

Test: mmma -j system/media/audio_utils
Change-Id: Iab8270c5f2dc011a984acd78f59a3adca73b7a62

7 years agoaudio_route: check if subpath name is valid before trying to add it
Thierry Strudel [Thu, 27 Oct 2016 17:12:43 +0000 (10:12 -0700)]
audio_route: check if subpath name is valid before trying to add it

Change-Id: I38d38c14d68e0fb25af188661cba750b7cac8f99

7 years agoMerge "radio: fix metadata compatibility for 64 bit processes"
Eric Laurent [Thu, 27 Oct 2016 15:23:04 +0000 (15:23 +0000)]
Merge "radio: fix metadata compatibility for 64 bit processes"

7 years agoradio: fix metadata compatibility for 64 bit processes
Eric Laurent [Tue, 25 Oct 2016 18:01:45 +0000 (11:01 -0700)]
radio: fix metadata compatibility for 64 bit processes

Clarify use of 32 bit quantities in radio metadata APIs and internal
implementation: all "unsigned int" are replaced by uint32_t.
Also use size_t when appropriate.

Add checks and asserts on invalid metadata buffer size.

Change-Id: I1e4a995858467c679b978574c305d82814f8c15c

7 years agofifo: fix bugs in lost frames calculation
Glenn Kasten [Wed, 19 Oct 2016 22:46:02 +0000 (15:46 -0700)]
fifo: fix bugs in lost frames calculation

Problems fixed:
 - did not set the lost frames parameter to zero when no frames were lost
 - under-estimated lost frames by mFrameCount

Also improved the documentation about lost frames.

Test: currently using interactive test only, need an automated version
Change-Id: I8b056c9cf4ead0d197b4c3aeff8482a08710c4cb

7 years agoMerge "fifo: address code review comments"
Glenn Kasten [Thu, 20 Oct 2016 18:21:52 +0000 (18:21 +0000)]
Merge "fifo: address code review comments"