OSDN Git Service

android-x86/frameworks-av.git
12 years agoresolved conflicts for merge of 05683c85 to master
Eric Laurent [Thu, 19 Jan 2012 18:00:02 +0000 (10:00 -0800)]
resolved conflicts for merge of 05683c85 to master

Change-Id: I7846b7da8c5813b7a9b1f3f71aede0229689ff0d

12 years agoMerge "Fix incorrect includes of AudioTrack.h"
Glenn Kasten [Thu, 19 Jan 2012 14:10:37 +0000 (06:10 -0800)]
Merge "Fix incorrect includes of AudioTrack.h"

12 years agoMerge "Simplify range check for audio_mode_t (continued)"
Glenn Kasten [Thu, 19 Jan 2012 14:09:20 +0000 (06:09 -0800)]
Merge "Simplify range check for audio_mode_t (continued)"

12 years agoMerge "Add units to time periods"
Glenn Kasten [Thu, 19 Jan 2012 14:09:05 +0000 (06:09 -0800)]
Merge "Add units to time periods"

12 years agoMerge "Use const const strings for arrays and pointers to strings"
Glenn Kasten [Thu, 19 Jan 2012 14:08:53 +0000 (06:08 -0800)]
Merge "Use const const strings for arrays and pointers to strings"

12 years agoMerge "For booleans, use ! instead of == false"
Glenn Kasten [Thu, 19 Jan 2012 14:08:40 +0000 (06:08 -0800)]
Merge "For booleans, use ! instead of == false"

12 years agoam db2e7163: Merge "AudioFlinger: mix track only when really ready (2)" into ics-mr1
Eric Laurent [Thu, 19 Jan 2012 00:08:06 +0000 (16:08 -0800)]
am db2e7163: Merge "AudioFlinger: mix track only when really ready (2)" into ics-mr1

* commit 'db2e71635968f455ad4f41b2e24fb8b909c24ca0':
  AudioFlinger: mix track only when really ready (2)

12 years agoFix incorrect includes of AudioTrack.h
Glenn Kasten [Wed, 18 Jan 2012 22:54:46 +0000 (14:54 -0800)]
Fix incorrect includes of AudioTrack.h

Remove unnecessary includes of AudioTrack.h.
Use forward declaration of class names in preference to #include when possible.

Change-Id: I12982811fa75c2c7695d8bbfa595a7aaec047dc0

12 years agoSimplify range check for audio_mode_t (continued)
Glenn Kasten [Wed, 18 Jan 2012 22:58:32 +0000 (14:58 -0800)]
Simplify range check for audio_mode_t (continued)

Missed one place in earlier CL of same name

Change-Id: I0dd25364d0b8d5d731c02d352f139a0c8d4df1a8

12 years agoAdd units to time periods
Glenn Kasten [Mon, 9 Jan 2012 16:33:38 +0000 (08:33 -0800)]
Add units to time periods

Change-Id: Ib980e2676cecf5d9b0c2e388da6dc8e370df8abb

12 years agoUse const const strings for arrays and pointers to strings
Glenn Kasten [Mon, 9 Jan 2012 16:41:22 +0000 (08:41 -0800)]
Use const const strings for arrays and pointers to strings

Change-Id: I0a073e17ebf6ad59e7edbedac104c6fa4bcaf9c9

12 years agoFor booleans, use ! instead of == false
Glenn Kasten [Fri, 13 Jan 2012 23:54:24 +0000 (15:54 -0800)]
For booleans, use ! instead of == false

Change-Id: Ibc115936d2d0b0b7744ebe9b52839ea5b42c4edd

12 years agoAudioFlinger: mix track only when really ready (2)
Eric Laurent [Wed, 18 Jan 2012 03:20:12 +0000 (19:20 -0800)]
AudioFlinger: mix track only when really ready (2)

This problem due to the way audio buffers are mixed when
low power mode is active was addressed by commits 19ddf0eb
and 8a04fe03 but only partially. As a matter of fact, when more
than one audio track is playing, the problem is still present.
This is most noticeable when playing music with screen off
and a notification or navigation instruction is played: in this case,
the music or notification is likely to skip.

The fix consists in declaring the mixer ready if all active tracks
are ready. Previous behavior was to declare ready if at least one track was
ready. To avoid that one application failing to fill the track buffer blocks other
tracks indefinitely, this condition is respected only if the mixer was ready
in the previous round.

Issue 5799167.

Change-Id: Iabd4ca08d3d45f563d9824c8a03c2c68a43ae179

12 years agoMerge "Temporarily restore AudioSystem/AudioTrack APIs with their former signatures"
Andreas Huber [Wed, 18 Jan 2012 19:01:00 +0000 (11:01 -0800)]
Merge "Temporarily restore AudioSystem/AudioTrack APIs with their former signatures"

12 years agoTemporarily restore AudioSystem/AudioTrack APIs with their former signatures
Andreas Huber [Wed, 18 Jan 2012 18:51:55 +0000 (10:51 -0800)]
Temporarily restore AudioSystem/AudioTrack APIs with their former signatures

until we get updated prebuilts from vendor.

Change-Id: I8aae81d2513edca0ab268053a11c8c4206879e61

12 years agoMerge "AVIExtractor: adding a H264 fourCC which is also specified in the reference...
Andreas Huber [Wed, 18 Jan 2012 17:29:56 +0000 (09:29 -0800)]
Merge "AVIExtractor: adding a H264 fourCC which is also specified in the reference. (H264 code can be found avi file which is encoded with FFmpeg.)"

12 years agoMerge "Make sure seek triggers a reconnect if needed."
Bryan Mawhinney [Wed, 18 Jan 2012 16:58:19 +0000 (08:58 -0800)]
Merge "Make sure seek triggers a reconnect if needed."

12 years agoMerge "Track volume cleanup"
Glenn Kasten [Wed, 18 Jan 2012 15:46:18 +0000 (07:46 -0800)]
Merge "Track volume cleanup"

12 years agoMake sure seek triggers a reconnect if needed.
Bryan Mawhinney [Wed, 18 Jan 2012 13:40:07 +0000 (13:40 +0000)]
Make sure seek triggers a reconnect if needed.

Previously, if we had disconnected at the high watermark,
the read immediately following a seek would fail, and would
not be retried, resulting in an error.

Change-Id: I45a53563fe17d6b54893815abc7750a7dfb0a124

12 years agoMerge "audio framework: manage stream volume per device"
Eric Laurent [Wed, 18 Jan 2012 01:35:03 +0000 (17:35 -0800)]
Merge "audio framework: manage stream volume per device"

12 years agoTrack volume cleanup
Glenn Kasten [Tue, 17 Jan 2012 20:20:54 +0000 (12:20 -0800)]
Track volume cleanup

Always read and write track volumes atomically. In most places this was
already being done, but there were a couple places where the left and
right channels were read independently.

Changed constant MAX_GAIN_INT to be a uint32_t instead of a float.
It is always used as a uint32_t in comparisons and assignments.
Use MAX_GAIN_INT in more places.

Now that volume is always accessed atomically, removed the union
and alias for uint16_t volume[2], and kept only volumeLR.

Removed volatile as it's meaningless.

In AudioFlinger, clamp the track volumes read from shared memory
before applying master and stream volume.

Change-Id: If65e2b27e5bc3db5bf75540479843041b58433f0

12 years agoaudio framework: manage stream volume per device
Eric Laurent [Sat, 19 Nov 2011 00:43:31 +0000 (16:43 -0800)]
audio framework: manage stream volume per device

Improve volume management by keeping track of volume for each type
of device independently.
Volume for each stream (MUSIC, RINGTONE, VOICE_CALL...) is now maintained
per device.

The main changes are:
- AudioService now keeps tracks of stream volumes per device:
 volume indexes are kept in a HashMap < device , index>.
 active device is queried from policy manager when a volume change request
 is received
 initalization, mute and unmute happen on all device simultaneously
- Settings: suffixes is added to volume keys to store each device
volume independently.
- AudioSystem/AudioPolicyService/AudioPolicyInterface: added a device argument
to setStreamVolumeIndex() and getStreamVolumeIndex() to address each
device independently.
- AudioPolicyManagerBase: keep track of stream volumes for each device
and apply volume according to current device selection.

Change-Id: I61ef1c45caadca04d16363bca4140e0f81901b3f

12 years agoMerge "Remove dead setVolume() and mVolume[2]"
Glenn Kasten [Tue, 17 Jan 2012 22:10:07 +0000 (14:10 -0800)]
Merge "Remove dead setVolume() and mVolume[2]"

12 years agoRemove dead setVolume() and mVolume[2]
Glenn Kasten [Tue, 17 Jan 2012 20:20:38 +0000 (12:20 -0800)]
Remove dead setVolume() and mVolume[2]

Change-Id: I94b835434093e920432614eb5007101e87758f32

12 years agoMove fixed_fft to system/media/audio_utils
Glenn Kasten [Mon, 16 Jan 2012 21:11:50 +0000 (13:11 -0800)]
Move fixed_fft to system/media/audio_utils

Change-Id: If8a03911434862a872539c313f54825ffb2cc672

12 years agoMerge "Use audio_mode_t consistently"
Glenn Kasten [Tue, 17 Jan 2012 19:32:53 +0000 (11:32 -0800)]
Merge "Use audio_mode_t consistently"

12 years agoRename Visualizer::mLock
Glenn Kasten [Tue, 17 Jan 2012 18:06:38 +0000 (10:06 -0800)]
Rename Visualizer::mLock

This avoids confusion with parent class AudioEffect's mLock which is
protected.

Change-Id: I2ae0b0869fe3c606f682252973795b34477951d0

12 years agoCheck stream type in AudioFlinger::createTrack
Glenn Kasten [Fri, 6 Jan 2012 16:40:01 +0000 (08:40 -0800)]
Check stream type in AudioFlinger::createTrack

A bad parameter to AudioFlinger::createTrack could cause mediaserver to crash.

Other AudioFlinger stream type cleanup:
 - Simplify range check for audio_stream_type_t
 - Add comment about mStreamTypes array initialization.

Change-Id: Ia33aa1cce0fdd694b08d9288816ffc097a9543d0

12 years agoMerge "Fix locking for mMasterVolume and mMute"
Glenn Kasten [Tue, 17 Jan 2012 15:28:14 +0000 (07:28 -0800)]
Merge "Fix locking for mMasterVolume and mMute"

12 years agoMerge "Use size_t for frame size"
Glenn Kasten [Tue, 17 Jan 2012 15:27:46 +0000 (07:27 -0800)]
Merge "Use size_t for frame size"

12 years agoMerge "Use audio_stream_type_t consistently"
Glenn Kasten [Tue, 17 Jan 2012 15:25:36 +0000 (07:25 -0800)]
Merge "Use audio_stream_type_t consistently"

12 years agoMerge "AudioTrack and AudioFlinger send level cleanup"
Glenn Kasten [Tue, 17 Jan 2012 15:18:26 +0000 (07:18 -0800)]
Merge "AudioTrack and AudioFlinger send level cleanup"

12 years agoAVIExtractor: adding a H264 fourCC which is also specified in the reference.
Dongwon Kang [Sun, 15 Jan 2012 03:00:34 +0000 (12:00 +0900)]
AVIExtractor: adding a H264 fourCC which is also specified in the reference.
(H264 code can be found avi file which is encoded with FFmpeg.)

Change-Id: Id9eccd4580443f42b2afa491c94ac2c2faa37f87

12 years agoFix locking for mMasterVolume and mMute
Glenn Kasten [Tue, 13 Dec 2011 19:47:54 +0000 (11:47 -0800)]
Fix locking for mMasterVolume and mMute

mMasterVolume and mMute are both protected by mutex in AudioFlinger class, but
there were two places where they were accessed without a mutex.

Also make AudioFlinger::mMasterMute private not protected.

Change-Id: Ia3897daeb5c50313df5bcc071824357526237f3e

12 years agoAudioTrack and AudioFlinger send level cleanup
Glenn Kasten [Tue, 3 Jan 2012 22:22:33 +0000 (14:22 -0800)]
AudioTrack and AudioFlinger send level cleanup

Add an API to control block for getting/setting send level.
This allow us to make the mSendLevel field private.

Document the lack of barriers.

Use 0.0f to initialize floating-point values (for doc only).

Change-Id: I59f83b00adeb89eeee227e7648625d9a835be7a4

12 years agoUse size_t for frame size
Glenn Kasten [Wed, 11 Jan 2012 17:48:27 +0000 (09:48 -0800)]
Use size_t for frame size

except in the control block, where we don't have room.

In AudioFlinger::ThreadBase::TrackBase::getBuffer,
read the frame size from control block only once.

Change-Id: Id6c4bccd4ed3e07d91df6bbea43bae45524f9f4e

12 years agoMerge "media/mtp: Add missing LOCAL_C_INCLUDES"
David 'Digit' Turner [Fri, 13 Jan 2012 22:32:50 +0000 (14:32 -0800)]
Merge "media/mtp: Add missing LOCAL_C_INCLUDES"

12 years agoam c0ef548c: am d75961ee: am b4cee0f8: Merge "stagefright aacenc/amrwbenc: Remove...
Jean-Baptiste Queru [Fri, 13 Jan 2012 19:28:09 +0000 (11:28 -0800)]
am c0ef548c: am d75961ee: am b4cee0f8: Merge "stagefright aacenc/amrwbenc: Remove trailing whitespace"

* commit 'c0ef548c748f0c3bc917eff7b50941f9cbe1df86':
  stagefright aacenc/amrwbenc: Remove trailing whitespace

12 years agoam d75961ee: am b4cee0f8: Merge "stagefright aacenc/amrwbenc: Remove trailing whitespace"
Jean-Baptiste Queru [Fri, 13 Jan 2012 19:25:09 +0000 (11:25 -0800)]
am d75961ee: am b4cee0f8: Merge "stagefright aacenc/amrwbenc: Remove trailing whitespace"

* commit 'd75961eecbfeb3f7e027a2a1f6011a26dd7d2d2d':
  stagefright aacenc/amrwbenc: Remove trailing whitespace

12 years agoam b4cee0f8: Merge "stagefright aacenc/amrwbenc: Remove trailing whitespace"
Jean-Baptiste Queru [Fri, 13 Jan 2012 19:22:08 +0000 (11:22 -0800)]
am b4cee0f8: Merge "stagefright aacenc/amrwbenc: Remove trailing whitespace"

* commit 'b4cee0f871e0f5a2abd6c6f05b65710b69423f2c':
  stagefright aacenc/amrwbenc: Remove trailing whitespace

12 years agoUse audio_stream_type_t consistently
Glenn Kasten [Fri, 13 Jan 2012 00:38:12 +0000 (16:38 -0800)]
Use audio_stream_type_t consistently

At native level it was a mixture of audio_stream_type_t, int, uint32_t,
and uint8_t.  Java is still int.  Also fixed a couple of hard-coded -1
instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0
instead of AUDIO_STREAM_VOICE_CALL.

Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83

12 years agomedia/mtp: Add missing LOCAL_C_INCLUDES
David 'Digit' Turner [Fri, 13 Jan 2012 13:17:29 +0000 (14:17 +0100)]
media/mtp: Add missing LOCAL_C_INCLUDES

One of the source files here is including <cutils/tztime.h> which
itself includes <bionic_time.h>, a private C library header used
to define the strftime_tz() extension (which used to be declared
in <time.h> but was moved there instead).

Add a missing C include path to let our code compile as usual.

Change-Id: I6aac2f1d3d15ad182679c81ff3f4febff74eb671

12 years agoMerge "Separate sniffing from session initialization"
James Dong [Fri, 13 Jan 2012 00:56:58 +0000 (16:56 -0800)]
Merge "Separate sniffing from session initialization"

12 years agoSeparate sniffing from session initialization
James Dong [Tue, 10 Jan 2012 16:24:37 +0000 (08:24 -0800)]
Separate sniffing from session initialization

This avoid lengthy/duplicate sniffing for drm plugins when a decrypt session is opened

o The change is backward compatibile in that no update is required
  for existing drm plug-ins if they do not plan to provide separate
  sniffer/extractor

related-to-bug: 5725548

Change-Id: I7fc4caf82d77472da4e2bc7b5d31060fb54fd84c

12 years agoMerge "Use audio_format_t consistently"
Glenn Kasten [Thu, 12 Jan 2012 18:30:28 +0000 (10:30 -0800)]
Merge "Use audio_format_t consistently"

12 years agoUse audio_mode_t consistently
Glenn Kasten [Wed, 4 Jan 2012 19:00:47 +0000 (11:00 -0800)]
Use audio_mode_t consistently

It was int or uint32_t.
Also make getMode() const.

Change-Id: Ibe45aadbf413b9158e4dd17f2b3bcc6355288d37

12 years agoam ce77af47: Reconcile with ics-mr1-release
The Android Open Source Project [Thu, 12 Jan 2012 17:00:21 +0000 (09:00 -0800)]
am ce77af47: Reconcile with ics-mr1-release

* commit 'ce77af47e979d365155e4003ca2943b639600e73':

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Thu, 12 Jan 2012 16:56:17 +0000 (08:56 -0800)]
Reconcile with ics-mr1-release

Change-Id: Ie242914fa4cfdf35675bbd2777f0817186860526

12 years agostagefright aacenc/amrwbenc: Remove trailing whitespace
Mans Rullgard [Tue, 5 Apr 2011 14:40:06 +0000 (17:40 +0300)]
stagefright aacenc/amrwbenc: Remove trailing whitespace

This was applied in AOSP master earlier, in commit
b21611e5b0f1797e39e781d91ade023bac87637f, but when merged
into the Google internal tree in
88c2d4d26d79384f32a25bd775cf873cb678b12a, none of these
changes have been brought in. (The diff of this merge commit
and its first parent, d94b71d, is empty.)

Therefore, reapply the rest of these changes on the files
that still are present in the current version.

Change-Id: I645a9b9134769958a11808a06163123d28d83e46

12 years agomerge in ics-mr1-release history after reset to ics-mr1
The Android Automerger [Thu, 12 Jan 2012 00:29:04 +0000 (16:29 -0800)]
merge in ics-mr1-release history after reset to ics-mr1

12 years agolibmedia new can't fail on Android
Glenn Kasten [Wed, 4 Jan 2012 20:38:13 +0000 (12:38 -0800)]
libmedia new can't fail on Android

Change-Id: Ie79dd5abb8078b35474bf0f1b3a6ff994a3a3360

12 years agoMerge "Fix race in AudioSystem::getInputBufferSize"
Glenn Kasten [Wed, 11 Jan 2012 19:40:27 +0000 (11:40 -0800)]
Merge "Fix race in AudioSystem::getInputBufferSize"

12 years agoMerge "Fix bug in JetPlayer::loadFromFile"
Glenn Kasten [Wed, 11 Jan 2012 19:39:06 +0000 (11:39 -0800)]
Merge "Fix bug in JetPlayer::loadFromFile"

12 years agoMerge "Simplify range check for audio_mode_t"
Glenn Kasten [Wed, 11 Jan 2012 19:38:21 +0000 (11:38 -0800)]
Merge "Simplify range check for audio_mode_t"

12 years agoam 05985a2e: am c15cf3d2: Merge "stagefright: limit audio gap for looped playback...
Eric Laurent [Wed, 11 Jan 2012 19:14:30 +0000 (11:14 -0800)]
am 05985a2e: am c15cf3d2: Merge "stagefright: limit audio gap for looped playback" into ics-mr1

* commit '05985a2e2ae5c21fbf69d2884c59ea475fce7f6d':
  stagefright: limit audio gap for looped playback

12 years agoam c15cf3d2: Merge "stagefright: limit audio gap for looped playback" into ics-mr1
Eric Laurent [Wed, 11 Jan 2012 19:12:45 +0000 (11:12 -0800)]
am c15cf3d2: Merge "stagefright: limit audio gap for looped playback" into ics-mr1

* commit 'c15cf3d286f3d63d141b73f639a5a61ddb028029':
  stagefright: limit audio gap for looped playback

12 years agoMerge "Use correct type for hardware call state"
Glenn Kasten [Wed, 11 Jan 2012 18:25:23 +0000 (10:25 -0800)]
Merge "Use correct type for hardware call state"

12 years agoMerge "Declare IAudioTrack methods in binder opcode order"
Glenn Kasten [Wed, 11 Jan 2012 18:23:34 +0000 (10:23 -0800)]
Merge "Declare IAudioTrack methods in binder opcode order"

12 years agoMerge "Use consistent style of & reference for AutoMutex"
Glenn Kasten [Wed, 11 Jan 2012 18:23:04 +0000 (10:23 -0800)]
Merge "Use consistent style of & reference for AutoMutex"

12 years agoMerge "Fix missing tag in mediaserver ServiceManager: log"
Glenn Kasten [Wed, 11 Jan 2012 18:22:45 +0000 (10:22 -0800)]
Merge "Fix missing tag in mediaserver ServiceManager: log"

12 years agoMerge "AudioFlinger new can't fail"
Glenn Kasten [Wed, 11 Jan 2012 18:22:19 +0000 (10:22 -0800)]
Merge "AudioFlinger new can't fail"

12 years agoMerge "Fix build warning"
Glenn Kasten [Wed, 11 Jan 2012 18:01:34 +0000 (10:01 -0800)]
Merge "Fix build warning"

12 years agoFix race in AudioSystem::getInputBufferSize
Glenn Kasten [Tue, 10 Jan 2012 17:01:19 +0000 (09:01 -0800)]
Fix race in AudioSystem::getInputBufferSize

It was caching the recording parameters without a mutex.

Change-Id: Ic4b9f621cbc080d224c2233cf3ca3454fc0f19bd

12 years agoFix bug in JetPlayer::loadFromFile
Glenn Kasten [Tue, 10 Jan 2012 16:41:33 +0000 (08:41 -0800)]
Fix bug in JetPlayer::loadFromFile

A long pathname would corrupt the heap due to incorrect use of strncpy.

Also was using hard-coded constant 256 instead of PATH_MAX.

Change-Id: Iba382bbb38624fbc41fec91449f9814f77d4ac0d

12 years agoSimplify range check for audio_mode_t
Glenn Kasten [Sat, 7 Jan 2012 00:47:31 +0000 (16:47 -0800)]
Simplify range check for audio_mode_t

AudioSystem::setMode previously allowed negative modes, but these were
then rejected by AudioFlinger.

Now negative modes (including AUDIO_MODE_INVALID and AUDIO_MODE_CURRENT)
are explicitly disallowed.

Change-Id: I0bac8fea737c8eb1f5b6afbb893e48739f88d745

12 years agostagefright: limit audio gap for looped playback
Eric Laurent [Mon, 9 Jan 2012 21:47:48 +0000 (13:47 -0800)]
stagefright: limit audio gap for looped playback

The audio gap when looping audio is mostly due to
a delay requested by the audio player when executing
the end of stream message. This is to allow the audio
to be drained out of the pipe before actually stopping the
AudioTrack.
This delay is not needed when looping as the AudioTrack
is not stopped.

The fix consists in ignoring the requested delay when the
looping flag is set in awesome player.

Issue 5800981.

Change-Id: Ib32d2930c53ecebc21ca8440e6e054c7e20db4a5

12 years agoRename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE
Steve Block [Mon, 9 Jan 2012 18:35:44 +0000 (18:35 +0000)]
Rename LOG_ASSERT to ALOG_ASSERT  DO NOT MERGE

See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3

12 years agoMerge "By convention const goes before the type specifier"
Glenn Kasten [Mon, 9 Jan 2012 19:59:17 +0000 (11:59 -0800)]
Merge "By convention const goes before the type specifier"

12 years agoUse cached reference to media.player service
Glenn Kasten [Tue, 3 Jan 2012 23:28:29 +0000 (15:28 -0800)]
Use cached reference to media.player service

This save unnecessary binder calls

Change-Id: I93a60efc54d9c8fb8fab706cd4477bbfd00ffec8

12 years agoMerge "Replace loop by __builtin_ctz"
Glenn Kasten [Mon, 9 Jan 2012 18:25:00 +0000 (10:25 -0800)]
Merge "Replace loop by __builtin_ctz"

12 years agoMerge "Clean up AudioTrack::mActive and stopped()"
Glenn Kasten [Mon, 9 Jan 2012 18:24:40 +0000 (10:24 -0800)]
Merge "Clean up AudioTrack::mActive and stopped()"

12 years agoMerge "suspended() and isSuspended() are const"
Glenn Kasten [Mon, 9 Jan 2012 18:24:09 +0000 (10:24 -0800)]
Merge "suspended() and isSuspended() are const"

12 years agoRename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
Steve Block [Fri, 6 Jan 2012 19:20:56 +0000 (19:20 +0000)]
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c

12 years agoam 20090b30: Reconcile with ics-mr1-release
The Android Open Source Project [Sat, 7 Jan 2012 02:18:36 +0000 (18:18 -0800)]
am 20090b30: Reconcile with ics-mr1-release

* commit '20090b30340f9382a2eca6a9bed21117f7a27d7e':

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Sat, 7 Jan 2012 02:15:13 +0000 (18:15 -0800)]
Reconcile with ics-mr1-release

Change-Id: Id0aeb30eb75c6c4aee7abbc9877aa5b16389778c

12 years agomerge in ics-mr1-release history after reset to ics-mr1
The Android Automerger [Sat, 7 Jan 2012 00:32:11 +0000 (16:32 -0800)]
merge in ics-mr1-release history after reset to ics-mr1

12 years agoam 4bc873e6: am 7944704e: Merge "Switch camera sounds to always use the system enforc...
Eino-Ville Talvala [Fri, 6 Jan 2012 23:51:44 +0000 (15:51 -0800)]
am 4bc873e6: am 7944704e: Merge "Switch camera sounds to always use the system enforced audio stream." into ics-mr1

* commit '4bc873e6ff73200af866f8c9efca66ad8ed23682':
  Switch camera sounds to always use the system enforced audio stream.

12 years agoam 7944704e: Merge "Switch camera sounds to always use the system enforced audio...
Eino-Ville Talvala [Fri, 6 Jan 2012 23:49:17 +0000 (15:49 -0800)]
am 7944704e: Merge "Switch camera sounds to always use the system enforced audio stream." into ics-mr1

* commit '7944704e6c4cc10105838b78d3d8403bf66a066b':
  Switch camera sounds to always use the system enforced audio stream.

12 years agoAudioFlinger new can't fail
Glenn Kasten [Fri, 6 Jan 2012 23:03:11 +0000 (15:03 -0800)]
AudioFlinger new can't fail

Change-Id: I7dae05a5ea1c962a9975386eab1fedbbe106ffba

12 years agoFix missing tag in mediaserver ServiceManager: log
Glenn Kasten [Mon, 19 Dec 2011 22:09:14 +0000 (14:09 -0800)]
Fix missing tag in mediaserver ServiceManager: log

Change-Id: I2d5525ffee0b66c0bc361a02b313ec4dd61e6552

12 years agoDeclare IAudioTrack methods in binder opcode order
Glenn Kasten [Tue, 3 Jan 2012 22:50:23 +0000 (14:50 -0800)]
Declare IAudioTrack methods in binder opcode order

This makes it easier to match up the declarations.

Change-Id: I0996c20b2903b778b356dfe52b07b0ec634855dd

12 years agoUse consistent style of & reference for AutoMutex
Glenn Kasten [Thu, 5 Jan 2012 23:41:56 +0000 (15:41 -0800)]
Use consistent style of & reference for AutoMutex

AutoMutex, which is a typedef for Mutex::Autolock, is overloaded for
either a reference (&) or pointer (*) parameter, but we prefer to use
the reference form when the mutex is known at compile time.

Change-Id: I3515e6d6ab7959b2356a27fa3b04fd49e42cb31e

12 years agoUse correct type for hardware call state
Glenn Kasten [Wed, 4 Jan 2012 19:02:33 +0000 (11:02 -0800)]
Use correct type for hardware call state

Change-Id: Ic6d98b129e3ec653df1d8f7e829adf8dccb4f378

12 years agoSwitch camera sounds to always use the system enforced audio stream.
Eino-Ville Talvala [Thu, 5 Jan 2012 23:34:53 +0000 (15:34 -0800)]
Switch camera sounds to always use the system enforced audio stream.

Instead of picking between the music stream and the enforced audio
stream, change the camera service to always play sounds through
enforced system stream. Also update the currently-hidden CameraSound
API to match.

Bug: 5778365
Change-Id: I3cc64b1d1ff567dbac8020a665d5b19846197ff3

12 years agoBy convention const goes before the type specifier
Glenn Kasten [Fri, 6 Jan 2012 15:46:30 +0000 (07:46 -0800)]
By convention const goes before the type specifier

Change-Id: I70203abd6a6f54e5bd9f1412800cc01212157e58

12 years agoFix build warning
Glenn Kasten [Fri, 6 Jan 2012 15:47:26 +0000 (07:47 -0800)]
Fix build warning

Change-Id: Ic99608d0c14ed56c02f036e0bbaaae1b16bab8ba

12 years agoRename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
Steve Block [Thu, 5 Jan 2012 23:22:43 +0000 (23:22 +0000)]
Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69

12 years agoReplace loop by __builtin_ctz
Glenn Kasten [Thu, 15 Dec 2011 22:38:29 +0000 (14:38 -0800)]
Replace loop by __builtin_ctz

Using the builtin is faster on some platforms, for example on ARM it's
19 instructions instead of 13, and is O(1) instead of O(n).  Of course,
track creation is an inherently slow operation, so this doesn't matter
much now.  But if we add support for virtual tracks, then physical tracks
will be allocated/freed more frequently.  Also just on principle ...

Change-Id: I3f590934092bd7a1869cbedbc7357928aa5cc8ff

12 years agoMerge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE"
Steve Block [Thu, 5 Jan 2012 22:07:02 +0000 (14:07 -0800)]
Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)  DO NOT MERGE"

12 years agoUse audio_format_t consistently
Glenn Kasten [Wed, 4 Jan 2012 17:36:37 +0000 (09:36 -0800)]
Use audio_format_t consistently

Was int, uint32_t, uint16_t, and uint8_t with 2-bit bitfield.
Also replace 0 by AUDIO_FORMAT_DEFAULT and replace 1 by
AUDIO_FORMAT_PCM_16_BIT.

Change-Id: Ia8804f53f1725669e368857d5bb2044917e17975

12 years agoam d32ee5ba: Reconcile with ics-mr1-release
The Android Open Source Project [Thu, 5 Jan 2012 20:08:48 +0000 (12:08 -0800)]
am d32ee5ba: Reconcile with ics-mr1-release

* commit 'd32ee5baa057992431263907ec5cf8f19b43c043':

12 years agoClean up AudioTrack::mActive and stopped()
Glenn Kasten [Tue, 3 Jan 2012 17:42:47 +0000 (09:42 -0800)]
Clean up AudioTrack::mActive and stopped()

mActive is protected by mLock; volatile is meaningless on SMP.

Fixed a couple of places where mActive was accessed without a lock:
 - stopped()
 - processAudioBuffer()

Added stopped_l() for cases where we already hold the lock.

Made mActive a bool not int.

Moved down a lock in setPosition that was being acquired too early.

Change-Id: I73ff368e991c0db9f9472df0b3f96fd33fcc7311

12 years agosuspended() and isSuspended() are const
Glenn Kasten [Wed, 4 Jan 2012 19:01:11 +0000 (11:01 -0800)]
suspended() and isSuspended() are const

Change-Id: I04b95970b5a645b64e7e64fffd46d868354dda66

12 years agoMerge "Remove the notion of "active track" from mixer"
Glenn Kasten [Thu, 5 Jan 2012 16:20:10 +0000 (08:20 -0800)]
Merge "Remove the notion of "active track" from mixer"

12 years agoReconcile with ics-mr1-release
The Android Open Source Project [Thu, 5 Jan 2012 15:45:28 +0000 (07:45 -0800)]
Reconcile with ics-mr1-release

Change-Id: I8a74c329fc7dd115e36d5180fab8e8680d6df4f8

12 years agoMerge "Use the standard CC_LIKELY and CC_UNLIKELY macros"
Glenn Kasten [Thu, 5 Jan 2012 15:38:29 +0000 (07:38 -0800)]
Merge "Use the standard CC_LIKELY and CC_UNLIKELY macros"

12 years agoUse the standard CC_LIKELY and CC_UNLIKELY macros
Glenn Kasten [Thu, 15 Dec 2011 17:51:17 +0000 (09:51 -0800)]
Use the standard CC_LIKELY and CC_UNLIKELY macros

Several source files privately defined macros LIKELY and UNLIKELY in terms
of __builtin_expect. But <cutils/compiler.h> already has CC_LIKELY and
CC_UNLIKELY which are intended for this purpose.  So rename the private
uses to use the standard names.

In addition, AudioFlinger was relying on the macro expanding to extra ( ).

Change-Id: I2494e087a0c0cac0ac998335f5e9c8ad02955873

12 years agoresolved conflicts for merge of 1a4b9939 to master
Eric Laurent [Thu, 5 Jan 2012 01:39:12 +0000 (17:39 -0800)]
resolved conflicts for merge of 1a4b9939 to master

Change-Id: I0c910d391a38a916d8431f7d1f5b82e39e1a66c2

12 years agomerge in ics-mr1-release history after reset to ics-mr1
The Android Automerger [Thu, 5 Jan 2012 00:42:23 +0000 (16:42 -0800)]
merge in ics-mr1-release history after reset to ics-mr1

12 years agoam fb578b6b: Merge "audioflinger: fix clicks on 48kHz audio." into ics-mr1
Eric Laurent [Wed, 4 Jan 2012 21:00:49 +0000 (13:00 -0800)]
am fb578b6b: Merge "audioflinger: fix clicks on 48kHz audio." into ics-mr1

* commit 'fb578b6b88af51812b71a86ad4dd3a7de56e394b':
  audioflinger: fix clicks on 48kHz audio.