Commit Graph

15398 Commits

Author SHA1 Message Date
Eric Laurent
4edfe75018 Fix issue 2553359: Pandora does not work well with Passion deskdock / Cardock.
The problem is due to a too big difference between the buffer size used at the hardware interface and at the A2DP interface.
When no resampling occurs we don't notice problems but the timing is very tight. As soon as resampling is activated, the AudioTrack underruns.
This is because the AudioTrack buffers are not resized when moving the AudioTrack from hardware to A2DP output.
The AudioTrack buffers are calculated based on a hardware output buffer size of 3072 bytes. Which is much less than the A2DP output buffer size (10240).

The solution consists in creating new tracks with new buffers in AudioFlinger when the A2DP output is opened
instead of just transfering active tracks from hardware output mixer thread to the new A2DP output mixer thread.
To avoid synchronization issues between mixer threads and client processes, this is done by invalidating tracks
by setting a flag in their control block and having AudioTrack release the handle on this track (IAudioTrack)
and create a new IAudioTrack when this flag is detected next time obtainBuffer() or start() is executed.

AudioFlinger modifications:
- invalidate the tracks when setStreamOutput() is called
- make sure that notifications of output opening/closing and change of stream type to output mapping are sent synchronously to client process.
This is necessary so that AudioSystem has the new stream to output mapping when the AudioTrack detects the invalidate flag in the client process.
Previously their were sent when the corresponding thread loop was executed.

AudioTrack modifications:
- move frame count calculation and verification from set() to createTrack() so that is is updated every time a new IAudioTrack is created.
- detect track invalidate flag in obtainBuffer() and start() and create a new IAudioTrack.

AudioTrackShared modifications
- group all flags (out, flowControlFlag, forceReady...) into a single bit filed to save space.

Change-Id: I9ac26b6192230627d35084e1449640caaf7d56ee
2010-05-17 02:23:47 -07:00
Chung-yih Wang
018ad09742 am c7388e35: am 5f1beda1: Merge "Make the SSID field of WifiConfiguration consistent with API description." into froyo
Merge commit 'c7388e3541c9f1d64dd13fc2de49ff77d8993fa5' into kraken

* commit 'c7388e3541c9f1d64dd13fc2de49ff77d8993fa5':
  Make the SSID field of WifiConfiguration consistent with API description.
2010-05-14 23:18:31 -07:00
Chung-yih Wang
74368e0bb6 am 5f1beda1: Merge "Make the SSID field of WifiConfiguration consistent with API description." into froyo
Merge commit '5f1beda18fc7709c2e61ace33607513770faf115' into froyo-plus-aosp

* commit '5f1beda18fc7709c2e61ace33607513770faf115':
  Make the SSID field of WifiConfiguration consistent with API description.
2010-05-14 23:16:31 -07:00
Chung-yih Wang
41613ed3bf Merge "Make the SSID field of WifiConfiguration consistent with API description." into froyo 2010-05-14 23:15:04 -07:00
Dianne Hackborn
ff829f9096 am 39c31bba: am aa77de13: Fix issue #2686193: Can\'t move apps to SD card
Merge commit '39c31bbaf9bb07365a4b63144cdf625483851a08' into kraken

* commit '39c31bbaf9bb07365a4b63144cdf625483851a08':
  Fix issue #2686193: Can't move apps to SD card
2010-05-14 23:13:30 -07:00
Dianne Hackborn
fdcc3559ac am aa77de13: Fix issue #2686193: Can\'t move apps to SD card
Merge commit 'aa77de1348cbda3d5348b15734ab141cb9c7759c' into froyo-plus-aosp

* commit 'aa77de1348cbda3d5348b15734ab141cb9c7759c':
  Fix issue #2686193: Can't move apps to SD card
2010-05-14 23:11:33 -07:00
Dirk Dougherty
2669e12fcc am c6b7a2d7: am d1e9d590: Doc change: add sizes/sums for sdk/ndk/adt packages.
Merge commit 'c6b7a2d704b6196c2f578302af607d58b0b85e4b' into kraken

* commit 'c6b7a2d704b6196c2f578302af607d58b0b85e4b':
  Doc change: add sizes/sums for sdk/ndk/adt packages.
2010-05-14 18:43:45 -07:00
Dirk Dougherty
42e980e1a0 am d1e9d590: Doc change: add sizes/sums for sdk/ndk/adt packages.
Merge commit 'd1e9d590941303c004459f3d798b26f1bf091535' into froyo-plus-aosp

* commit 'd1e9d590941303c004459f3d798b26f1bf091535':
  Doc change: add sizes/sums for sdk/ndk/adt packages.
2010-05-14 18:42:11 -07:00
Mathias Agopian
0d184f0169 Merge "fix uninitialized variable in DisplayHardware" into kraken 2010-05-14 18:35:34 -07:00
Mathias Agopian
0d4e00dd6a fix uninitialized variable in DisplayHardware
this fixes the issue where the display is all messed-up sometimes.

Change-Id: I20be91b5166bfff0c6d353a777351842c9df8e95
2010-05-14 18:33:30 -07:00
Andreas Huber
4843fbd206 am a5cd816c: am eb9128f9: Fix sampleTable instantiation, this makes sure that the sample table refers to the custom datasource that caches the metadata to prevent needless seeking.
Merge commit 'a5cd816c720ed87b91a33aa5d000a0d308c74453' into kraken

* commit 'a5cd816c720ed87b91a33aa5d000a0d308c74453':
  Fix sampleTable instantiation, this makes sure that the sample table refers to the custom datasource that caches the metadata to prevent needless seeking.
2010-05-14 16:30:29 -07:00
Andreas Huber
2188a17156 am eb9128f9: Fix sampleTable instantiation, this makes sure that the sample table refers to the custom datasource that caches the metadata to prevent needless seeking.
Merge commit 'eb9128f9b0ee660504621381fd96f82d5bf8a3fd' into froyo-plus-aosp

* commit 'eb9128f9b0ee660504621381fd96f82d5bf8a3fd':
  Fix sampleTable instantiation, this makes sure that the sample table refers to the custom datasource that caches the metadata to prevent needless seeking.
2010-05-14 16:28:09 -07:00
Nick Kralevich
cf44a76d7f Merge "Get rid of warnings when compiled with -Wformat-security" into kraken 2010-05-14 15:28:09 -07:00
The Android Open Source Project
0259a7534f am 900b6157: merge from open-source master
Merge commit '900b6157f5dee2ed7b2c73cf320b2baf293230ff' into kraken

* commit '900b6157f5dee2ed7b2c73cf320b2baf293230ff':
  Only hold a weak pointer on SurfaceComposerClients
2010-05-14 15:12:17 -07:00
The Android Open Source Project
4c53558835 merge from open-source master
Change-Id: I0249c6d796b35af9ba08cbccd463a1f5cf779ecd
2010-05-14 15:04:52 -07:00
Scott Main
58e1173cf0 am fb580943: am 826c9f77: docs: fix broken link, reduce API info about backup and point to dev guide
Merge commit 'fb580943133d3e9ad3e342b8038726b04686f283' into kraken

* commit 'fb580943133d3e9ad3e342b8038726b04686f283':
  docs: fix broken link, reduce API info about backup and point to dev guide
2010-05-14 14:26:14 -07:00
Scott Main
cf6dd9bdef am 826c9f77: docs: fix broken link, reduce API info about backup and point to dev guide
Merge commit '826c9f7773188c2a7f48d5b2d1ae4612ec2bbb49' into froyo-plus-aosp

* commit '826c9f7773188c2a7f48d5b2d1ae4612ec2bbb49':
  docs: fix broken link, reduce API info about backup and point to dev guide
2010-05-14 14:24:44 -07:00
Dirk Dougherty
0f27e3d642 am 0d54b806: am 60026c3a: Merge "Doc change: adjust compatibility doc." into froyo
Merge commit '0d54b806c62cbe3ae71ce21f5d8bad78b0bee279' into kraken

* commit '0d54b806c62cbe3ae71ce21f5d8bad78b0bee279':
  Doc change: adjust compatibility doc.
2010-05-14 14:01:59 -07:00
Dirk Dougherty
d1ad52a21f am 60026c3a: Merge "Doc change: adjust compatibility doc." into froyo
Merge commit '60026c3ab0093e6d4cd464061ab9f36d4d041532' into froyo-plus-aosp

* commit '60026c3ab0093e6d4cd464061ab9f36d4d041532':
  Doc change: adjust compatibility doc.
2010-05-14 14:00:12 -07:00
Dirk Dougherty
9b0f549757 Merge "Doc change: adjust compatibility doc." into froyo 2010-05-14 13:58:12 -07:00
The Android Open Source Project
50c434ca21 am 55b7d124: merge from open-source master
Merge commit '55b7d1243f15395a102971e8fdc57444638729ac' into kraken

* commit '55b7d1243f15395a102971e8fdc57444638729ac':
  SetLocaleByCarrier, only if its not an unknown carrier.
2010-05-14 13:54:56 -07:00
The Android Open Source Project
4dd72e10ee merge from open-source master
Change-Id: I3e36061d7ba4b8a3962bf8391d663b861a4ede38
2010-05-14 13:52:52 -07:00
Dirk Dougherty
078418eccd am 3d52305f: am 59cfe713: Merge "Doc change: adjustments to the api changes description" into froyo
Merge commit '3d52305faa682366eb34c30892ddd2b390940048' into kraken

* commit '3d52305faa682366eb34c30892ddd2b390940048':
  Doc change: adjustments to the api changes description
2010-05-14 13:49:56 -07:00
Dirk Dougherty
1e588cfedc am 59cfe713: Merge "Doc change: adjustments to the api changes description" into froyo
Merge commit '59cfe7137ca411bdbb5ffcdf418eecc55d65d09e' into froyo-plus-aosp

* commit '59cfe7137ca411bdbb5ffcdf418eecc55d65d09e':
  Doc change: adjustments to the api changes description
2010-05-14 13:48:04 -07:00
Dirk Dougherty
e5588e132b am cae9cfee: am bba70cdb: Merge "Doc change: add note about future instruction set support." into froyo
Merge commit 'cae9cfeed7b0895189e08a4fadf63c917b1aec7b' into kraken

* commit 'cae9cfeed7b0895189e08a4fadf63c917b1aec7b':
  Doc change: add note about future instruction set support.
2010-05-14 13:47:07 -07:00
Dirk Dougherty
2363a9d496 Merge "Doc change: adjustments to the api changes description" into froyo 2010-05-14 13:46:42 -07:00
Dirk Dougherty
b7a9cbc7e1 am bba70cdb: Merge "Doc change: add note about future instruction set support." into froyo
Merge commit 'bba70cdba284c3d76cab9843e44097d664882938' into froyo-plus-aosp

* commit 'bba70cdba284c3d76cab9843e44097d664882938':
  Doc change: add note about future instruction set support.
2010-05-14 13:45:17 -07:00
Dirk Dougherty
c04d390b92 Merge "Doc change: add note about future instruction set support." into froyo 2010-05-14 13:43:19 -07:00
Dirk Dougherty
7e54c66fa9 am bf4cecd2: am 89969d4c: Merge "Doc change: documentation for library projects in sdk." into froyo
Merge commit 'bf4cecd2822ff74c8c246d2595a836b5f1130ad8' into kraken

* commit 'bf4cecd2822ff74c8c246d2595a836b5f1130ad8':
  Doc change: documentation for library projects in sdk.
2010-05-14 13:41:46 -07:00
Dirk Dougherty
4d8158737f am 89969d4c: Merge "Doc change: documentation for library projects in sdk." into froyo
Merge commit '89969d4cdaf7abbbf6d3fce86c274e7b79113e8d' into froyo-plus-aosp

* commit '89969d4cdaf7abbbf6d3fce86c274e7b79113e8d':
  Doc change: documentation for library projects in sdk.
2010-05-14 13:40:19 -07:00
Jean-Baptiste Queru
6b4a87862e Merge "Only hold a weak pointer on SurfaceComposerClients" 2010-05-14 13:39:48 -07:00
Dirk Dougherty
a3f10c57af Merge "Doc change: documentation for library projects in sdk." into froyo 2010-05-14 13:38:20 -07:00
James Dong
00fe5059ca Merge "Detect and handle premature termination of a recording session" into kraken 2010-05-14 12:19:17 -07:00
Nick Kralevich
d76c034794 Merge "Forgot to fix one -Wformat-security in my previous change. Fixed." into kraken 2010-05-14 12:07:05 -07:00
Chih-Chung Chang
1a03efaa17 Merge "Fix deadlock if the last reference of ICameraClient is removed in ICamera::connect()" into kraken 2010-05-14 12:05:06 -07:00
Scott Main
c297cbfb2b am 6d8e4fd8: am b83a283a: docs: add dev guide for backup
Merge commit '6d8e4fd83bb7f4eabc942dd17fa229cf9baf5fcf' into kraken

* commit '6d8e4fd83bb7f4eabc942dd17fa229cf9baf5fcf':
  docs: add dev guide for backup
2010-05-14 11:56:14 -07:00
Scott Main
62cabab267 am b83a283a: docs: add dev guide for backup
Merge commit 'b83a283ac178ab0a72f1d811189d79b26097835e' into froyo-plus-aosp

* commit 'b83a283ac178ab0a72f1d811189d79b26097835e':
  docs: add dev guide for backup
2010-05-14 11:53:44 -07:00
Ray Chen
c58bb54070 Merge "Fix issue 2622023 Clean up all hardcoded '/sdcard' in camera related codes." into kraken 2010-05-14 11:48:45 -07:00
Jean-Baptiste Queru
d181206cab Merge "SetLocaleByCarrier, only if its not an unknown carrier." 2010-05-14 11:39:06 -07:00
Nick Kralevich
e8de8f47c6 Forgot to fix one -Wformat-security in my previous change. Fixed.
Change-Id: Ice7459b30e1d7dbfe400b68d27ebc04fcca78bae
2010-05-14 10:29:13 -07:00
The Android Open Source Project
5b803f0865 am 1d628c5d: merge from open-source master
Merge commit '1d628c5d3dd7998b29c339292a2dc391015d0782' into kraken

* commit '1d628c5d3dd7998b29c339292a2dc391015d0782':
  Accept media files by file extension in case insensitive manner.
2010-05-14 09:46:11 -07:00
The Android Open Source Project
f614ba9a79 merge from open-source master
Change-Id: I934cf85c4673f9ca3a9549c2074907ad572310f4
2010-05-14 09:44:36 -07:00
Eric Laurent
9f6d082b43 Merge "AudioFlinger: rename variables to clarify reference to track channel count or channel mask" into kraken 2010-05-14 09:39:12 -07:00
Nick Kralevich
a60221223a Merge "Remove libdrm2. This code appears to be unused." into kraken 2010-05-14 09:32:45 -07:00
The Android Open Source Project
f2abe4c093 am 9167ba50: merge from open-source master
Merge commit '9167ba50e4d7e08e02119d9c4a0f0392296cc3f1' into kraken

* commit '9167ba50e4d7e08e02119d9c4a0f0392296cc3f1':
  Corrected debug message in WindowManager
  Put the wifi status icon in the right place.
2010-05-14 09:15:41 -07:00
The Android Open Source Project
d69ec09f47 merge from open-source master
Change-Id: I57f108d2b3415eddb0b20a4a9dec4c44285de226
2010-05-14 09:11:31 -07:00
Nick Kralevich
df325c5325 Get rid of warnings when compiled with -Wformat-security
Change-Id: Ibd814d894ff0eba26b01932b9865098b7bb26f95
2010-05-14 09:06:55 -07:00
Jean-Baptiste Queru
a7b36de932 Merge "Accept media files by file extension in case insensitive manner." 2010-05-14 09:06:43 -07:00
Eric Laurent
e151216d38 AudioFlinger: rename variables to clarify reference to track channel count or channel mask
Some variables and structure members should be renamed to reflect the fact that they contain the
number of channels in a track (channel count) or the actual channels used by a track (channel mask).
Especially member "channels" of track control block (struct audio_track_cblk_t) is actually the
number of channels (channels count).

Change-Id: I220c8dede9fc00c8a5693389e790073b6ed307b8
2010-05-14 05:45:46 -07:00
Dirk Dougherty
73e1599b0e am d48e0382: am fb473bb6: Merge "Doc change: adjustments for ndk feature description" into froyo
Merge commit 'd48e0382c3db1827ccb79fe912d271d426dd46ad' into kraken

* commit 'd48e0382c3db1827ccb79fe912d271d426dd46ad':
  Doc change: adjustments for ndk feature description
2010-05-13 21:34:31 -07:00