summaryrefslogtreecommitdiffstats
path: root/services
Commit message (Collapse)AuthorAgeFilesLines
* Check stream type in AudioFlinger::createTrackGlenn Kasten2012-01-173-10/+14
| | | | | | | | | | 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
* Merge "Fix locking for mMasterVolume and mMute"Glenn Kasten2012-01-172-4/+15
|\
| * Fix locking for mMasterVolume and mMuteGlenn Kasten2012-01-132-4/+15
| | | | | | | | | | | | | | | | | | 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
* | Merge "Use size_t for frame size"Glenn Kasten2012-01-172-7/+8
|\ \
| * | Use size_t for frame sizeGlenn Kasten2012-01-132-7/+8
| |/ | | | | | | | | | | | | | | | | 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
* | Merge "Use audio_stream_type_t consistently"Glenn Kasten2012-01-174-41/+43
|\ \
| * | Use audio_stream_type_t consistentlyGlenn Kasten2012-01-134-41/+43
| |/ | | | | | | | | | | | | | | | | 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
* | AudioTrack and AudioFlinger send level cleanupGlenn Kasten2012-01-131-1/+7
|/ | | | | | | | | | | 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
* Merge "Simplify range check for audio_mode_t"Glenn Kasten2012-01-112-2/+2
|\
| * Simplify range check for audio_mode_tGlenn Kasten2012-01-102-2/+2
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "Use correct type for hardware call state"Glenn Kasten2012-01-112-2/+2
|\ \
| * | Use correct type for hardware call stateGlenn Kasten2012-01-062-2/+2
| | | | | | | | | | | | Change-Id: Ic6d98b129e3ec653df1d8f7e829adf8dccb4f378
* | | Merge "Use consistent style of & reference for AutoMutex"Glenn Kasten2012-01-111-3/+3
|\ \ \
| * | | Use consistent style of & reference for AutoMutexGlenn Kasten2012-01-061-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "AudioFlinger new can't fail"Glenn Kasten2012-01-111-2/+1
|\ \ \
| * | | AudioFlinger new can't failGlenn Kasten2012-01-061-2/+1
| |/ / | | | | | | | | | Change-Id: I7dae05a5ea1c962a9975386eab1fedbbe106ffba
* | | Merge "Fix build warning"Glenn Kasten2012-01-111-1/+1
|\ \ \ | |_|/ |/| |
| * | Fix build warningGlenn Kasten2012-01-061-1/+1
| |/ | | | | | | Change-Id: Ic99608d0c14ed56c02f036e0bbaaae1b16bab8ba
* | Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGESteve Block2012-01-093-6/+6
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/157519 Bug: 5449033 Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
* | Merge "By convention const goes before the type specifier"Glenn Kasten2012-01-095-23/+24
|\ \
| * | By convention const goes before the type specifierGlenn Kasten2012-01-065-23/+24
| |/ | | | | | | Change-Id: I70203abd6a6f54e5bd9f1412800cc01212157e58
* | Use cached reference to media.player serviceGlenn Kasten2012-01-091-5/+4
| | | | | | | | | | | | This save unnecessary binder calls Change-Id: I93a60efc54d9c8fb8fab706cd4477bbfd00ffec8
* | Merge "Replace loop by __builtin_ctz"Glenn Kasten2012-01-091-9/+4
|\ \
| * | Replace loop by __builtin_ctzGlenn Kasten2012-01-051-9/+4
| |/ | | | | | | | | | | | | | | | | | | 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
* | Merge "suspended() and isSuspended() are const"Glenn Kasten2012-01-092-4/+5
|\ \
| * | suspended() and isSuspended() are constGlenn Kasten2012-01-052-4/+5
| |/ | | | | | | Change-Id: I04b95970b5a645b64e7e64fffd46d868354dda66
* | Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-088-76/+76
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* | am 4bc873e6: am 7944704e: Merge "Switch camera sounds to always use the ↵Eino-Ville Talvala2012-01-062-12/+1
|\ \ | | | | | | | | | | | | | | | | | | system enforced audio stream." into ics-mr1 * commit '4bc873e6ff73200af866f8c9efca66ad8ed23682': Switch camera sounds to always use the system enforced audio stream.
| * | Switch camera sounds to always use the system enforced audio stream.Eino-Ville Talvala2012-01-062-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-065-73/+73
| | | | | | | | | | | | | | | | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* | | Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE"Steve Block2012-01-054-9/+9
|\ \ \
| * | | Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-044-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* | | | Merge "Remove the notion of "active track" from mixer"Glenn Kasten2012-01-053-81/+89
|\ \ \ \ | |_|_|/ |/| | |
| * | | Remove the notion of "active track" from mixerGlenn Kasten2011-12-203-81/+89
| | | | | | | | | | | | | | | | | | | | | | | | This is a first step towards making the mixer more object-oriented. Change-Id: Ifd445d0e471023a7f5c82e934736ffc95ba1b05b
* | | | Merge "Use the standard CC_LIKELY and CC_UNLIKELY macros"Glenn Kasten2012-01-054-45/+36
|\ \ \ \
| * | | | Use the standard CC_LIKELY and CC_UNLIKELY macrosGlenn Kasten2012-01-054-45/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | resolved conflicts for merge of 1a4b9939 to masterEric Laurent2012-01-044-1/+30
|\ \ \ \ \ | |_|_|/ / |/| | | / | | |_|/ | |/| | Change-Id: I0c910d391a38a916d8431f7d1f5b82e39e1a66c2
| * | | audioflinger: fix clicks on 48kHz audio.Eric Laurent2011-12-224-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calculation done in prepareTracks_l() for the minimum amount off frames needed to mix one output buffer had 2 issues: - the additional sample needed for interpolation was not included - the fact that the resampler does not acknowledge the frames consumed immediately after each mixing round but only once all frames requested have been used was not taken into account. Thus the number of frames available in track buffer could be considered sufficient although it was not and the resampler would abort producing a short silence perceived as a click. Issue 5727099. Change-Id: I7419847a7474c7d9f9170bedd0a636132262142c
* | | | Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-036-17/+17
| |/ / |/| | | | | | | | | | | | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* | | Merge "Remove dead code"Glenn Kasten2011-12-202-5/+4
|\ \ \ | |_|/ |/| |
| * | Remove dead codeGlenn Kasten2011-12-192-6/+4
| | | | | | | | | | | | Change-Id: Icf23f7f90fdeb660f4015f22cf239e6d05f5d03c
* | | Merge "audio effects: rename configure command"Eric Laurent2011-12-191-1/+1
|\ \ \
| * | | audio effects: rename configure commandEric Laurent2011-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Use constants for 2 and 32"Glenn Kasten2011-12-162-8/+8
|\ \ \ \
| * | | | Use constants for 2 and 32Glenn Kasten2011-12-162-8/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: If820dfd58b6df258570750610a07af99598d9e53
* | | | | Merge "Extract out audio DSP code to utility library"Glenn Kasten2011-12-164-117/+10
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Extract out audio DSP code to utility libraryGlenn Kasten2011-12-164-117/+10
| | |/ / | |/| | | | | | | | | | Change-Id: Ib8ce72028a7ea30e82baa518e381370e820ebbd0
* | | | Merge "Use switch in AudioMixer::setParameter"Glenn Kasten2011-12-162-36/+49
|\ \ \ \
| * | | | Use switch in AudioMixer::setParameterGlenn Kasten2011-12-162-36/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace series of if/then/elses by easier-to-read switch. Also return void instead of status_t, since callers weren't checking it. Assert on bad input parameters. Change-Id: Ie1f0a297977b28501d20e1af819afed9b4750616
* | | | | deleteTrackName now asserts on bad input parameterGlenn Kasten2011-12-161-17/+16
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This is safe, as the input parameter is always track->name(), which must be valid. Change-Id: Iea8ea3a5706c27026335526ba8851030d00681f8