summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* audio: Audio resampler support for 192Khz playbackYamit Mehta2015-10-061-0/+9
| | | | | | | | | | | | | | | | | | | | | Add support for QTI audio resampler audio: Audio resampler support for 192Khz playback Change-Id: Ia8f24a0874ebf6e16ef7bd1f2759a14f47149875 audio: Add audio mixing support for qti resampler Change-Id: Ib657aa12b2a72323564148c302ff8891e1bb7433 AudioMixer: Extend use of QTI resampler for 44.1Khz sampling rate Change-Id: I2a819dbc9f1e3e280cb4fa79328e331883a3e981 AudioMixer: fill 0s at right place when no more buffers available Change-Id: I50504c5a02eb0c69abfc9b047792b0f6f85b9ce8 audioflinger: add channel count check to use QTI resampler Change-Id: I8f76dd82b72a0dd8b77343e77e0d0545e1be2114 Change-Id: Ia8f24a0874ebf6e16ef7bd1f2759a14f47149875
* SEEMP: add more framework instrumentationWilliam Clark2015-10-061-0/+3
| | | | | | Instrument framework files to log events of interest. Change-Id: I5157649ccd88a20459c1a72562960f6d5b43e7c0
* AudioTrack: Fix for offload to BT/SSR fallback at EOSPreetam Singh Ranawat2015-10-061-0/+6
| | | | | | | | | | | -With big offload buffer size, connect BT or trigger SSR while waiting for stream to be completed, playback is moving to next clip. -avoid notifying EOS to client on any error while waiting for stream end event if it is offload playback. Change-Id: I748ed299df106385eaa030faecd0df6dc8e3c176
* audio: add encoding support for linear PCM formatMingming Yin2015-10-061-1/+11
| | | | | | - add encoding support for linear PCM format. Change-Id: Iecf402064d67d35d5057b814c842d79af92756d0
* libmedia: avoid processing stale callback events when track recycledYamit Mehta2015-10-061-0/+6
| | | | | | | | | | | | when track is reused from SoundPool and started again, the previous callback events could be processed immediately after track started, the new playback will be stopped then clear the stale cblk flags when recycled track is started again to avoid triggering unexpected callback events Change-Id: Ifc6fd973c655e9c7866391e7004016a7df9a9b9c CRs-Fixed: 819973
* libmedia: fix for underrun and gapless issue.Preetam Singh Ranawat2015-10-061-0/+1
| | | | | | | | | | | -change offload shared buffer size to avoid failure to restart on an underrun. (Merged changeid I4dd9e5e5a7c8aebb34b13f2e6626b73adc2ba557) -fix for gap seen during gapless playback due to big buffer size. (Merged changeid If5234059aa4629e9eb02e236a43214de9ef2204b) Change-Id: I1ad25d3789aced6b804aa695485341bfa4e97eae
* audio: add parameters for device shutdown notificationDhanalakshmi Siddani2015-10-061-0/+1
| | | | | | - Add new define and variable to receive device shutdown notification Change-Id: I06d7a8a36a5bf5490818561ec3bb9c5d43c5bf37
* AVCustomizations: Enable 16 and 24 bit PCM offload.Preetam Singh Ranawat2015-10-061-7/+24
| | | | | | | | | | | | -create extended decoder and renderer -add change to pass bit width and format info to renderer. -add change for PCM conversions -add changes for time calucation Conflicts: media/libmediaplayerservice/nuplayer/NuPlayer.cpp Change-Id: I3363140fad441a7746884076c40b46e777f2e06e
* ToneGenerator: Limit tones to 48kHaynes Mathew George2015-10-061-1/+7
| | | | | | | | | DTMF tones are played at the hardware module sampling rate. Until now, this rate was limited to 48k. Tones sound not too pleasant at higher rates (like 96k and 192k). Ergo, limit the rate to 48k. Change-Id: I7fbc3185d988628ce3ee478076a322857221dece
* audioTrack: Handle track invalidate on wait for stream doneYamit Mehta2015-10-061-30/+30
| | | | | | | | | If a track invalidate is called while waiting for a stream done, AudioCallback handler is notified with event EVENT_STREAM_END. This might cause substantial data loss for offload playback. Try to recreate the track if needed. Change-Id: Ie663c85e92588ddfd8d633f4bf5024f9fa4f5c2e
* Stagefright: Make classes customizable and add AV extensionsPraveen Chavan2015-10-061-1/+2
| | | | | | | | | | | Change access modifiers and qualify methods with virtual, to allow extensions. Add facility for loading customizations (Extended classes) dynamically. Conflicts: media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp Change-Id: Icc8965754fb1c73175a13a9ad24c19665ad60988
* CamcorderProfiles: add VGA and 4K-DCI profilesPraveen Chavan2015-10-061-2/+13
| | | | | | Also add high-speed profile for CIF. Change-Id: Iacd8537f62112171ee611a7534f9d432f45d5d3f
* IMediaPlayer.cpp: make sure structures are initialized to 0Nick Kralevich2015-09-021-0/+2
| | | | | | | | Credit https://code.google.com/p/android/issues/detail?id=183310 Bug: 23515142 Change-Id: Idbd66fb148bd0ac1dd78f8651d0164f2a41e2427 (cherry picked from commit b73b826cc16291b33649402497efbe0f946413bd)
* libmedia: clear reply data for IEffect commandAndy Hung2015-09-021-2/+2
| | | | | Bug: 23540907 Change-Id: Ib89afc6b273b0eb310bbc5a1bd92b1e3d407c249
* Merge "Part of fix for libmedia OOB write anywhere" into mnc-devJeff Tinker2015-08-191-3/+3
|\
| * Part of fix for libmedia OOB write anywhereJeff Tinker2015-08-171-3/+3
| | | | | | | | | | | | | | | | | | Clarify that decrypt destination is not a pointer for secure case. b/23223325 Change-Id: I642dcf790a9eb9e32175f3e0d8f040c82228e3ac
* | NuPlayerRenderer: handle error when resuming an offloaded trackEric Laurent2015-08-121-1/+1
|/ | | | | | | | | | | Make sure that an offloaded audio track is torn down if start() returns an error in onResume(). This makes sure that a track invalidated due to a potential audio path change while paused is re created on the correct output. Bug: 22256441. Change-Id: I6c7bfec6e7322415daffc0451bab46d0c558522a
* Merge "Explicitly disconnect in MediaPlayer::reset" into mnc-devRobert Shih2015-07-241-0/+1
|\
| * Explicitly disconnect in MediaPlayer::resetRobert Shih2015-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Even without calling disconnect in MediaPlayer::reset, MediaPlayerService::Client (which lives on the other side of a binder with MediaPlayer) would still perform a disconnect in its destructor. Object destruction across binder is not synchronous, but method calls are. This commit merely makes sure that the disconnect happens deterministically before reset returns. Bug: 22451733 Change-Id: Id9146a63a1872d68087a252aa614248b16d2556d
* | Merge "Fix restore position warning and static track adjustment" into mnc-devAndy Hung2015-07-241-9/+9
|\ \
| * | Fix restore position warning and static track adjustmentAndy Hung2015-07-241-9/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary restoreTrack_l() position warning when AudioTrack output device changes. Also, fix rare getPosition() offset error if a static track is continuously playing a long time (> 24 hours at 48khz sampling) and its output device changes. Bug: 22524122 Bug: 21699132 Change-Id: I5a35c13d62ff9f0702b09d5cd9362c730364b18c
* | Fix race condition in AudioTrackThread::wakeAndy Hung2015-07-221-4/+8
| | | | | | | | | | Bug: 22533684 Change-Id: I2f46770dca44fc9dae41e067d3bec893c42a826e
* | Fix race condition in AudioRecordThread::wakeAndy Hung2015-07-221-4/+8
|/ | | | | Bug: 22533684 Change-Id: Iba73d633b088dbc84159ed692019da39cc8e2233
* Merge "mediaresourcemanager: add pid to removeResource method" into mnc-devRonghua Wu2015-07-181-2/+4
|\
| * mediaresourcemanager: add pid to removeResource methodRonghua Wu2015-07-171-2/+4
| | | | | | | | | | Bug: 22496209 Change-Id: I73311573e8d1ac15fec668a9ef6e6af7a07a1d30
* | Fix buildGlenn Kasten2015-07-171-1/+1
| | | | | | | | Change-Id: I18b63d68d452c4ee7544ff1614f4e3f57f5a9e73
* | Merge "Fix AudioTrack flush pointer wrap" into mnc-devAndy Hung2015-07-171-1/+13
|\ \
| * | Fix AudioTrack flush pointer wrapAndy Hung2015-07-161-1/+13
| |/ | | | | | | | | | | | | | | Occurs when read offset / write offset span the power of 2 mask boundary. Bug: 22513776 Change-Id: If863577dac6666e8b2083d78f78fe9b9490fcf76
* | mediaplayer: fix audio attributes override by stream typeEric Laurent2015-07-151-9/+14
|/ | | | | | | | Make sure that when audio attributes are set, the stream type is always derived from them. Bug: 22481669. Change-Id: Ia10c7017eb27e7753faf97a42dd4f44e15f2c986
* audio: several fixes in audio routing callbacksEric Laurent2015-07-101-5/+14
| | | | | | | | | | | | | | | | | | | | | | - audio policy: Force device change to ensure new audio patch creation upon first track activity on a given output. Fix function device_distinguishes_on_address() which could mistake some output device with remote submix input device. - audio flinger: Reduce number of binder calls upon new client registration by only sending ioConfigChanged() callbacks to newly registered client. Fix first patch after output thread creation not triggering an ioConfigChanged() callback. -audio system: Force client registration upon routing callback installation to force new ioConfigChanged() callback from audio flinger. Bug: 22381136. Change-Id: Ieb0d9f92f563a40552eb31bc0499c8ac65f78ce4
* reduce number of binder calls from mediaserverEric Laurent2015-06-262-9/+32
| | | | | | | | | | | | | | | Reduce the number of audio port, audio patch and IO config changed binder calls from mediaserver to client processes: - Do not call IO config changed callback if selected device is the same as previously selected one on a given audio flinger playback or capture thread. - Do not call the audio port or audo patch list update callback on a client if this client as no listener registered. Bug: 22045560. Change-Id: If780e105404de79b7cb5c80c27b793ceb6b1c423
* Merge "Using centralized isAudioPlaybackRateValid to validate parameters" ↵Ricardo Garcia2015-06-231-12/+20
|\ | | | | | | into mnc-dev
| * Using centralized isAudioPlaybackRateValid to validate parametersRicardo Garcia2015-06-221-12/+20
| | | | | | | | | | | | | | Centralized validation code bug: 20701446 Change-Id: I9d9941c7639c05b2afe069ff4f858c693c910bfe
* | Merge "Fix for Visualizer release bug" into mnc-devRicardo Garcia2015-06-221-8/+4
|\ \
| * | Fix for Visualizer release bugRicardo Garcia2015-06-191-8/+4
| |/ | | | | | | | | | | | | Setting callback reference to NULL before requesting exit. bug: 21804802 Change-Id: I54323959686880f4e7a10b766850f8c86c06edb6
* | Merge "Check binder transact status" into mnc-devJeff Tinker2015-06-191-30/+124
|\ \
| * | Check binder transact statusJeff Tinker2015-06-161-30/+124
| |/ | | | | | | | | | | | | | | | | | | If mediaserver restarts, the binder transact methods return DEAD_OBJECT. This status wasn't being checked, so calls would proceed with unpredictable results. bug: 20614102 Change-Id: I11271974ef2ccf0129529d1f67204dff1f1d03b0
* | Merge "Return DEAD_OBJECT if getTimestamp cannot restore track" into mnc-devAndy Hung2015-06-191-1/+6
|\ \
| * | Return DEAD_OBJECT if getTimestamp cannot restore trackAndy Hung2015-06-181-1/+6
| | | | | | | | | | | | | | | Bug: 21699132 Change-Id: I90443f8674ed949e2546048b231be75cd6fe6615
* | | Merge "Fix AudioTrack comments relating to use of restoreTrack_l()" into mnc-devAndy Hung2015-06-181-4/+8
|\ \ \ | |/ /
| * | Fix AudioTrack comments relating to use of restoreTrack_l()Andy Hung2015-06-181-4/+8
| |/ | | | | | | | | Bug: 21699132 Change-Id: Ib0d029a5e28676aeffbbbafc88c52a17367a413c
* | readAt can return negative values (error codes).Alex Klyubin2015-06-181-1/+8
|/ | | | | | | | | | | | | | This fixes the regression introduced in 59cea2616269f34b1f3d046995efd8da42cd5549 due to which MediaPlayer treated all error codes returned by MediaHTTPConnection as ERROR_OUT_OF_RANGE. The regression was caused by accidentally converting negative values (which represent error codes) returned by MediaHTTPConnection to very large positive ones (which represent length of data received). Bug: 21922241 Change-Id: I1b4592b5fec724aac1ba6c1ff8fdabcba56bcd2d
* Return correct error code from IMediaHttpConnectionMarco Nelissen2015-06-111-1/+1
| | | | | | | It returns a boolean, not a status_t Bug: 21654826 Change-Id: Id364a90598c5cf0bb567b5b25bbc9b7c73412760
* Use only strong references to AudioEffectEric Laurent2015-06-081-4/+7
| | | | | | | | | | | | Do not refer to an AudioEffect instance by a raw pointer from the child AudioEffectClient. Also align destructor cleanup sequence on those of AudioTrack and AudioRecord. Bug: 21629892. Change-Id: I970307aedbc38db2e41a2cc652fd6df9112f712c
* stagefright: add support for batching OMX eventsLajos Molnar2015-06-051-18/+40
| | | | | Bug: 20503131 Change-Id: I762c419ed1245f8b83fb1f6bf61e5557213ca07b
* Improve AudioTrack offload timestamp startup glitch detectorAndy Hung2015-06-041-4/+26
| | | | | | | | | | | | | New or existing glitch behavior for Nexus 5 offload audio: we receive several 0 timestamps, then we get a stale timestamp (very large), then a few ms later we get a correct nonzero timestamp. We attempt to hide the glitch because the retrograde timestamp correction makes the glitch "sticky". Bug: 21633313 Change-Id: I39153af718c151f9435e7d315651a811f72743da
* Compute sleep time when AudioTrack client callback returns no PCM dataAndy Hung2015-06-031-10/+79
| | | | | | | | | | | | Callbacks can go into a sleep-wait cycle if the client/app is unable to deliver data. This can happen if the buffer is large, or if the client/app cannot keep the buffer filled, or upon a stream end condition. We improve the sleep time computation for AudioTrack PCM callbacks. This minimizes the number of callbacks to NuPlayerRenderer. Bug: 21198655 Change-Id: I4247798a6638def2f0d8f1b46f60323482065cb2
* stagefright: add support for fences in OMXLajos Molnar2015-06-021-9/+23
| | | | | | | Pass Fence between Surface and ACodec, and between ACodec and IOMX. Bug: 12386081 Change-Id: Ifdc566979dec0d91ed8b07c3b69d2cf092accc73
* Merge "Store server latency, sample rate, framecount information in ↵Andy Hung2015-06-021-38/+12
|\ | | | | | | AudioTrack" into mnc-dev
| * Store server latency, sample rate, framecount information in AudioTrackAndy Hung2015-06-011-38/+12
| | | | | | | | | | Bug: 21198655 Change-Id: I24590196642a97ea5d61bc6356f0aff782bd37d3