5516 Commits

Author SHA1 Message Date
Glenn Kasten
1c66547ba2 Merge "Use audio_format_t consistently" 2012-01-12 10:30:28 -08:00
Marco Nelissen
3fbc0b2062 Merge "MediaScanner: Disable bulk insert for settings" 2012-01-12 07:49:23 -08:00
Glenn Kasten
80f3fc2cb6 libmedia new can't fail on Android
Change-Id: Ie79dd5abb8078b35474bf0f1b3a6ff994a3a3360
2012-01-11 12:27:41 -08:00
Glenn Kasten
a89226c786 Merge "Fix race in AudioSystem::getInputBufferSize" 2012-01-11 11:40:27 -08:00
Glenn Kasten
c57b063192 Merge "Fix bug in JetPlayer::loadFromFile" 2012-01-11 11:39:06 -08:00
Glenn Kasten
1eac460122 Merge "Simplify range check for audio_mode_t" 2012-01-11 11:38:21 -08:00
Eric Laurent
cc598b2b8b am 05985a2e: am c15cf3d2: Merge "stagefright: limit audio gap for looped playback" into ics-mr1
* commit '05985a2e2ae5c21fbf69d2884c59ea475fce7f6d':
  stagefright: limit audio gap for looped playback
2012-01-11 11:14:30 -08:00
Glenn Kasten
f733831fc7 Merge "Declare IAudioTrack methods in binder opcode order" 2012-01-11 10:23:34 -08:00
Glenn Kasten
1ea8a35197 Merge "Fix missing tag in mediaserver ServiceManager: log" 2012-01-11 10:22:45 -08:00
Sungsoo Lim
6c4c155696 MediaScanner: Disable bulk insert for settings
Since the settings (notifications, ringtones, and alarms) request
rowId after inserting into DB, do not use bulk insert for them.
(Bulk insert does not return the rowId)

Change-Id: I8faf993f8ac2da96672594a1c92ddc917f964d6f
2012-01-11 11:34:20 +09:00
Glenn Kasten
81801adc14 Fix race in AudioSystem::getInputBufferSize
It was caching the recording parameters without a mutex.

Change-Id: Ic4b9f621cbc080d224c2233cf3ca3454fc0f19bd
2012-01-10 15:43:48 -08:00
Glenn Kasten
77b6aaf62d 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
2012-01-10 15:43:24 -08:00
Glenn Kasten
01aaf2c401 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
2012-01-10 15:42:32 -08:00
Steve Block
38e90751a2 Merge "Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE" 2012-01-10 14:08:32 -08:00
Eric Laurent
577d6ccb7b 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
2012-01-09 13:48:25 -08:00
Steve Block
ec193dec4d Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE
See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
2012-01-09 21:36:22 +00:00
Glenn Kasten
b282e08ab6 Fix build
Change-Id: Ia140af1a61edf124ef3d48b60351f850a3475af1
2012-01-09 13:11:07 -08:00
Glenn Kasten
5c17a820f9 Audio Java doc comment typos and minor changes
Change-Id: Id6ea6dccb8054c9f05db9a9c045387ce813659e6
2012-01-09 12:15:18 -08:00
Glenn Kasten
13f94dc5bd Merge "Fix race conditions related to ringer mode" 2012-01-09 12:01:37 -08:00
Glenn Kasten
8cf6d6f148 Merge "Clean up AudioTrack::mActive and stopped()" 2012-01-09 10:24:40 -08:00
Steve Block
3762c31172 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
2012-01-08 13:19:13 +00:00
Glenn Kasten
97a2d174e6 Fix missing tag in mediaserver ServiceManager: log
Change-Id: I2d5525ffee0b66c0bc361a02b313ec4dd61e6552
2012-01-06 14:40:14 -08:00
Glenn Kasten
798ef8e882 Declare IAudioTrack methods in binder opcode order
This makes it easier to match up the declarations.

Change-Id: I0996c20b2903b778b356dfe52b07b0ec634855dd
2012-01-06 13:35:57 -08:00
Steve Block
f4c2294b01 Merge "Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE" 2012-01-06 10:30:56 -08:00
Marco Nelissen
18c6afa0c5 Merge "Also accept non-parenthesized genre numbers" 2012-01-06 08:08:15 -08:00
Steve Block
8564c8da81 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
2012-01-06 10:07:54 +00:00
Marco Nelissen
ad35f9165e Also accept non-parenthesized genre numbers
b/5790684

Change-Id: Ia13feebeaadd45d9196486c012538c5b80840163
2012-01-05 15:15:53 -08:00
Marco Nelissen
4b4d00e714 Merge "ThumbnailUtils: To fix misuse of FileInputStream." 2012-01-05 14:11:40 -08:00
Steve Block
bd47cac4df Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE" 2012-01-05 14:07:02 -08:00
Glenn Kasten
1c5a89d4af 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
2012-01-05 13:34:54 -08:00
Glenn Kasten
e6810ffaa1 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
2012-01-05 11:55:24 -08:00
Glenn Kasten
a8719ad9d5 Merge "Use the standard CC_LIKELY and CC_UNLIKELY macros" 2012-01-05 07:38:29 -08:00
Glenn Kasten
e80a4ccd2b 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
2012-01-05 07:33:45 -08:00
Dongwon Kang
3993818689 ThumbnailUtils: To fix misuse of FileInputStream.
We need to close it explicitly after using it. Without this, fd will be closed
non-deterministically, and that will break the decode procedure.

Bug: 5808889
Change-Id: Icf9ff9abd6e327b122c6916df9750016b3d1b616
2012-01-05 17:17:48 +09:00
Steve Block
6215d3ff4b Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2012-01-04 20:05:49 +00:00
Steve Block
5baa3a62a9 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2012-01-03 22:38:27 +00:00
Eric Laurent
afbb047c39 AudioService: simplified handler messages.
For historical reasons, messages to the AudioSystem
handler in AudioService have a complex identifier combining several information.
Messages for a particular stream contain the stream type as part of the message type.
This complexity is not needed as the stream messages also carry a reference to the
VolumeStreamState object which contains all necessary information, including the stream type.

Also grouped parameters of MSG_PERSIST_VOLUME message into a single bit field to make room for
further needs.

Change-Id: Ia27af626b3447541e8f9eaceba21389a824d88e2
2011-12-20 18:07:41 -08:00
Eric Laurent
0ca16d6ba6 Merge "audio effects: rename configure command" 2011-12-19 17:26:24 -08:00
Eric Laurent
4abf88244b audio effects: rename configure command
Renamed audio effect library interface command for audio format
configuration from EFFECT_CMD_CONFIGURE to EFFECT_CMD_SET_CONFIG.
This makes the naming more consistent with other exixsting commands
and allow adding a new command to get the configuration (EFFECT_CMD_GET_CONFIG).
Same change for reverse channel configuration renamed from
EFFECT_CMD_CONFIGURE_REVERSE to EFFECT_CMD_SET_CONFIG_REVERSE.

Implemented EFFECT_CMD_GET_CONFIG in exisitng effect libraries.

Change-Id: Ia7b1c620f13797fe5aceb3b0b4acbacce09fb067
2011-12-19 17:08:31 -08:00
Hong Teng
f15784a5ef Merge "Fix for 5754998 testPerformanceTransitionWithEffectOverlapping test failed." 2011-12-16 15:17:46 -08:00
Glenn Kasten
d9de2d21ef Merge "Extract out audio DSP code to utility library" 2011-12-16 15:02:30 -08:00
Hong Teng
a76f6262c9 Fix for 5754998 testPerformanceTransitionWithEffectOverlapping test failed.
-Fix the index is out of sync frame array boundary when seeking to end of a 3gp file.
Validation only were done for video editor cts test and Movie Studio application.
Futher validation may include media player, youtube application,.etc.

Change-Id: Ib01314f1768cfab702dbe25c307553ace0b85e77
2011-12-16 14:32:59 -08:00
Glenn Kasten
490909d2c0 Extract out audio DSP code to utility library
Change-Id: Ib8ce72028a7ea30e82baa518e381370e820ebbd0
2011-12-16 11:42:03 -08:00
Dave Burke
2b6449bbbc am 0cc1e42d: am ac279de9: Merge "SurfaceMediaSource: use the HW_TEXTURE usage bit" into ics-mr1
* commit '0cc1e42d74e09c259a6da0abc9009d1abf7537b1':
  SurfaceMediaSource: use the HW_TEXTURE usage bit
2011-12-15 19:27:17 -08:00
Jamie Gennis
09fc76664a SurfaceMediaSource: use the HW_TEXTURE usage bit
This change makes SurfaceMediaSource request Gralloc buffers with the
HW_TEXTURE usage bit rather than the VIDEO_ENCODER bit.  It is a
temporary workaround for what is likely a Gralloc bug.

Bug: 5771063
Change-Id: I9cce615e80fc14a1644fae27ba06970c262dd179
2011-12-15 18:36:08 -08:00
Glenn Kasten
d9a723bc92 Merge "Fix build error when verbose logging is enabled" 2011-12-15 10:46:14 -08:00
Glenn Kasten
16dabac224 Fix build error when verbose logging is enabled
Change-Id: I30f4e5d35d1b24dce2e6152a13fd0fb61414a3e2
2011-12-15 08:34:59 -08:00
Glenn Kasten
25adf47477 Merge "Fix indentation and whitespace" 2011-12-14 17:35:36 -08:00
Glenn Kasten
da7923ac29 Merge "Audio C++ comments" 2011-12-14 16:56:31 -08:00
Glenn Kasten
fb2ab9efc3 Fix indentation and whitespace
Use git diff -w to verify.

Change-Id: Ib65be0a1ecf65d6cad516110604e3855bf68a638
2011-12-14 16:54:05 -08:00