641 Commits

Author SHA1 Message Date
Jamie Gennis
5bc176b1a6 Refactor the qsd8k gralloc implementation.
The purpose of this change is to add support for allocating gralloc buffers
from either /dev/pmem or /dev/pmem_adsp depending on the usage flags.  It does
this by factoring out and abstracting the interactions with the pmem device.
For /dev/pmem allocations, the kernel allocator is not used, so a single master
fd is opened, and all the allocations are sub-allocated from that by gralloc.
For /dev/pmem_adsp the kernel allocator is used, so it simply opens a new fd
for each allocation.

A very basic unit test that can be run on the host is included.  It requires
gtest, so to run it on a host system gtest must (currently) be compiled with
BUILD_WITH_ASTL=true.

Change-Id: If2ae0151698fad8107e18e808a3fa012a846263f
2010-07-02 12:57:36 -07:00
Mathias Agopian
6c2bc88a03 remove unused YUV formats
Change-Id: Ia590a9cb9a02bf62f35da344f29775d1256e3da7
2010-07-01 21:19:31 -07:00
Mathias Agopian
d3c18d4938 NV12 tiled needs 8K plane alignment
Change-Id: I8f2ca6f058ff9d7dd666871a696428c55dbe6cf1
2010-06-22 22:06:12 -07:00
Mathias Agopian
0adc045aa2 remove unused YUV formats
Change-Id: I41c18551a61bec9f928399544a12024c81947ed0
2010-06-22 16:15:31 -07:00
Mathias Agopian
a82aad454a fix typo in ALIGN macro
Change-Id: Idaddf65f0b726a158f47639223f4281fd07447a7
2010-06-22 16:15:10 -07:00
Mathias Agopian
0f6dc7ea55 Add support for allocating YUV formats
Currently they're all allocated in pmem, instead of pmem_adsp.

Change-Id: Ibc3edf2da4155d2f086d81dee8940270f9cb9f6b
2010-06-22 16:14:35 -07:00
Mike Lockwood
151d2b884b Revert "Add support for allocating YUV formats"
This reverts commit 7b1f00a95490552131d06a13b78c279f6c779a1a.
2010-06-22 13:32:55 -04:00
Mike Lockwood
5d471952a5 Revert "remove unused YUV formats"
This reverts commit 05ea9ede5600fef7a8fdf416b44ec98e58fb224b.
2010-06-22 13:32:36 -04:00
Mathias Agopian
ce599f6e8d remove unused YUV formats
Change-Id: I47769af34112856e6a2ef177a966f6e8e6242031
2010-06-21 18:23:23 -07:00
Mathias Agopian
b43cd9549f Add support for allocating YUV formats
Currently they're all allocated in pmem, instead of pmem_adsp.

Change-Id: Ief367a64667dc0b67fdeabeabbf9f201082d6ad2
2010-06-16 14:27:27 -07:00
Jean-Michel Trivi
fd3b68ca8e Merge "Fix bug 2721016 The AudioPolicyManager for MSM8K overrides the stream volume computation even if the volume index is set to minimum, which prevents the system from ever muting a stream in the car dock. The change consists in comparing the new volume index against the minimum authorized index for that stream and if they are equal, not override the platform's volume computation." into kraken 2010-06-11 09:34:37 -07:00
Jean-Michel Trivi
00aae89922 Fix bug 2721016
The AudioPolicyManager for MSM8K overrides the stream volume computation
even if the volume index is set to minimum, which prevents the system
from ever muting a stream in the car dock.
The change consists in comparing the new volume index against the
minimum authorized index for that stream and if they are equal,
not override the platform's volume computation.

Change-Id: Id3990a3d771d2adb40df56d1b4ee2ddfb37c428d
2010-06-11 09:33:21 -07:00
Chih-Chung Chang
5f64869e3e Change camera interface to support multiple cameras.
Change-Id: I32fa5615b7fcd4caba34283d4b252bac478aa1eb
2010-06-11 16:48:18 +08:00
Brian Swetland
81d0303842 add very very minimal qdsp5v2 support
Change-Id: I028074a745829275c13d3adb14dd00c0179c19e9
2010-06-10 18:09:04 -07:00
Jake Hamby
d4bbea359f Enable librpc for MSM7x30 and patch to add missing defines.
Enable librpc for MSM7x30 and add missing definition of NULLPROC
and function prototype for xdr_u_int().

Change-Id: I97fe08abbf2d8157a6ce990ebd4dfcec41fce1d5
2010-06-07 14:13:02 -07:00
Dima Zavin
f53f4e648e msm7k: build lights for 7x30 also
Change-Id: I7f2f43caeac34c675765d7b6e83016288a9f61ed
Signed-off-by: Dima Zavin <dima@android.com>
2010-05-17 21:49:10 -07:00
Jean-Baptiste Queru
b4532a8f6f am f4ee522e: Add missing NOTICE/MODULE files
Merge commit 'f4ee522ec23d86f55777a7eb4a0772a11cbf01fe' into kraken

* commit 'f4ee522ec23d86f55777a7eb4a0772a11cbf01fe':
  Add missing NOTICE/MODULE files
2010-05-17 14:04:57 -07:00
Jean-Baptiste Queru
5c55e02c66 Add missing NOTICE/MODULE files
Change-Id: Id7120f3f2833d8b4e706a0725f6193b804d7199e
2010-05-17 12:29:36 -07:00
Dima Zavin
f94abc992c gralloc-qsd8k: Build for msm7x30 as well
Change-Id: Ibc0be16a02d1dcd8461f74ee486d228503c7709a
Signed-off-by: Dima Zavin <dima@android.com>
2010-05-12 20:48:35 -07:00
Dan Bornstein
dc308af31f resolved conflicts for merge of 4ba46c7f to froyo-plus-aosp
Change-Id: Iab84d24a291e182c5f63ea95d1d50a01b8680443
2010-05-06 13:20:23 -07:00
Jean-Baptiste Queru
4847bd1cde Merge "Initial open-source code drop of libopencorehw and libstagefrighthw" into froyo-plus-aosp 2010-04-29 16:09:30 -07:00
Jean-Michel Trivi
4a3cfcaa4d am 7f16e88b: Fix bug 2599652 increase attenuation on 3.5mm jack for music stream in car dock.
Merge commit '7f16e88be738d63e33e2e7c652c594379b136a01' into froyo-plus-aosp

* commit '7f16e88be738d63e33e2e7c652c594379b136a01':
  Fix bug 2599652 increase attenuation on 3.5mm jack for music
2010-04-15 14:24:44 -07:00
Jean-Michel Trivi
954b441a40 Fix bug 2599652 increase attenuation on 3.5mm jack for music
stream in car dock.

Change-Id: I3a8bf092adf0a5725636c4d79266cfb02768cacc
2010-04-15 14:12:01 -07:00
The Android Open Source Project
d9fb27b5a4 merge from open-source master
Change-Id: I8d09ba9fc18f72c453bb04b2ee915c9412971f30
2010-04-08 10:56:23 -07:00
Jean-Baptiste Queru
1cdb8474ea Initial open-source code drop of libopencorehw and libstagefrighthw
Bug: 2565258
Change-Id: I5cacca55e173c3209c2e74447219b34587a914b5
2010-04-07 10:40:45 -07:00
Kevin.KY_Tsai
ed2c5bc46a librpc: Fix kernel enter suspend before reply rpc callback
grab wakelock before reading data from kernel

Change-Id: I0597363aac60249590fc755a76eec5b5eef92766

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-06 11:51:54 -04:00
Mathias Agopian
e5df818f4e fix [2501808] sapphire: OOM in GPU Surface area
Just retry for up to 5s when this happens. There could be a delay
for surfaceflinger to be notified when a process dies and delay
freeing those resources by that much.

Change-Id: If90d26626f7cbb7d37cdcf471f680c1b17deab50
2010-03-26 17:07:57 -07:00
Mathias Agopian
0380c43f6e fix [2501808] sapphire: OOM in GPU Surface area
Just retry for up to 5s when this happens. There could be a delay
for surfaceflinger to be notified when a process dies and delay
freeing those resources by that much.

Change-Id: I324262daab99dd6f16a2c8487c40ffd82f8847d7
2010-03-25 20:17:38 -07:00
Jean-Baptiste Queru
ec040bb3a1 Add tags and notices where appropriate.
Also tweak copyright notices as appropriate.

Bug: 2084753
Change-Id: Ifbf795b8b16dbc45cf5ac9a72b97f2b74cbf3550
2010-03-19 15:50:23 -07:00
Mike Lockwood
0176d59b6b liblights: Don't set attention light color when clearing battery light.
BUG: 2483314

Change-Id: Ie4abad8b9448f5d7c1f05585f43e85bc832bcdf6
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-19 17:30:29 -04:00
Mathias Agopian
e55ffb9bb8 gralloc and copybit now can properly handle EBI or SMI GPU surfaces
up until now we relied on the EBI region map_offset being zero, which
prevented us to use SMI for surfaces, as their map_offset is different.
the copybit hal needs the map_offset to figure out which region to use.

Change-Id: I920b31ecb77a7b0943dfcd8e3362e2c38ac83297
2010-03-18 18:16:45 -07:00
Mathias Agopian
66fa227f44 Merge "a fix for [2462396] Driveabout stress tests fail" 2010-03-17 20:25:35 -07:00
Mathias Agopian
edb3498ecb a fix for [2462396] Driveabout stress tests fail
an uninitialized variable caused the unmapping of some random pages
when buffers were resized, which happens on orientation changes.
unfortunatelly, I'm still seeing crashes on orientation changes, but
less of them and less random ones. so far, I've only seen an ASSERT
triggering in the GL driver, all "meomry corruptions" (crashes in
dalvik, skia, etc...) seem gone.

Change-Id: Icd6077e26e050670b75b715f205b6c7c9ea1a476
2010-03-17 20:22:05 -07:00
Eric Laurent
3128b13cc8 Fix issue 2416481: Support Voice Dialer over BT SCO.
Hold a wake lock also when an input stream is active (not only for output stream).
Apply Audience a1026 configuration also when output routing selects a bluetooth device.
Allow acdb settings for bluettoth devices if not incall.

Change-Id: Ibaa24ecf44af2e00f24664c7be9e1b9813861ce4
2010-03-17 07:21:16 -07:00
Jean-Michel Trivi
e4a3ac8aff Fix bug 2203203 Route STREAM_VOICE_CALL to A2DP when not in call.
Change-Id: I4b6bfafeee0ea1a2f2e7f72de49b82e8cdadd9f9
2010-03-14 11:14:39 -07:00
Mathias Agopian
ee8a4e4546 fix [2473605] The GLSurfaceView is skewed in Sapphire
the alignment must be a multiple of 8 pixels, no more no less

Change-Id: I5ab9555f306cf2c141d38fd77056c9f50217a8ff
2010-03-11 12:27:41 -08:00
Mathias Agopian
1f920972b5 fix [2473605] The GLSurfaceView is skewed in Sapphire
the alignment must be a multiple of 8 pixels, no more no less.

Change-Id: Id1f4c2615270335ad3de515f65e7184db9c8aa40
2010-03-09 13:48:15 -08:00
Jean-Michel Trivi
bd5cc6f8f2 Merge "Fix bug 2329540 Part 2 of fix Modify the behavior of the volume computation in the APM for the MSM8K to deal with the car dock limitation where the user doesn't have access to the physical volume buttons on the side of the phone when it is docked. Docking the phone with too low a media volume would make the 3.5mm headphone jack unusable when connecting the device to a wired analog car stereo adapter. The change consists in setting a fixed volume value for the MUSIC streams played through the wired accessories when docked in a car dock." 2010-03-09 13:17:25 -08:00
Jean-Michel Trivi
6bc7ad3f59 Fix bug 2329540 Part 2 of fix
Modify the behavior of the volume computation in the APM for the
 MSM8K to deal with the car dock limitation where the user doesn't
 have access to the physical volume buttons on the side of the
 phone when it is docked. Docking the phone with too low a media
 volume would make the 3.5mm headphone jack unusable when connecting
 the device to a wired analog car stereo adapter.
 The change consists in setting a fixed volume value for the MUSIC
 streams played through the wired accessories when docked in a car
 dock.

Change-Id: I2e5c81571b0f553c914c8adb73b51e7eac5084c6
2010-03-09 12:25:04 -08:00
Mike Lockwood
17ae3f0a86 Merge "Fix kernel enter suspend before reply rpc callback" 2010-03-09 11:20:07 -08:00
Kevin.KY_Tsai
1dd994c3f7 Fix kernel enter suspend before reply rpc callback
grab wakelock before reading data from kernel

Change-Id: I0597363aac60249590fc755a76eec5b5eef92766

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-09 14:17:04 -05:00
Eric Laurent
b56ea129b1 Fix issue 2428760: Driveabout: volume of navigator through Bluetooth headset much too loud.
Driveabout navigation instructions are ususally played with a loud volume in order to be heard while driving.
When in call, all audio generated by the application processor is routed to the device in use by the
call, in this case the bluetooth SCO headset. For some reason, when audio at loud volume is output
by the application processor to the bluetooth headset the sound is saturated.

The fix consists in limiting the stream volumes to -18dB when playing over a bluetooth SCO device.

Change-Id: I2a5643c7f91a136f1f3adfce75d77e59c09e42b3
2010-03-09 08:42:13 -08:00
Jean-Baptiste Queru
0dd22ed634 Add an empty CleanSpec.mk
Change-Id: I095b02726dc10a2960a9774370690f53a61a6bb6
2010-03-08 18:04:53 -08:00
Eric Laurent
c27675248b Fix issue 2317760: Change the priority between wired headset and A2DP.
Modified audio policy manager so that wired headset has precedence over A2DP headset.
2010-03-06 15:51:40 -08:00
Brian Swetland
9dfe9ad88d dspcrashd: service to obtain ramdumps from DSP on crash
How this works is that when the DSP crashes, *if* dspcrashd is
running, instead of immediately rebooting, dspcrashd halts the dsp and
writes a 32MB memory image to /sdcard/dsp.crash.1266967900.img (or
similar -- number is unix UTC seconds), and *then* we panic and
reboot.

The last_kmsg log will contain:
[   82.357543] *** WROTE DSP RAMDUMP TO /sdcard/dsp.crash.1266967900.img ***

So we'll know if there's a dsp crash file to request when bugs are
filed (if the user doesn't realize this).

The dsp.crash.%d.img also contains (starting at 24MB offset):
---- ---- ---- ---- ---- ---- ---- ---- ---- ----
ro.product.name: passionc
ro.build.id: ERE50
ro.build.date: Fri Feb 19 11:53:10 PST 2010
ro.serialno: HT01YHK00073
ro.baseband: 1.00.01.DSPNMI
---- ---- ---- ---- ---- ---- ---- ---- ---- ----
<6>[    0.000000] Initializing cgroup subsys cpu
<5>[    0.000000] Linux version 2.6.32-00619-g7f79ddb
(swetland@bulgaria) (gcc version 4.4.0 (GCC) ) #13 PREEMPT Tue Feb 23
15:28:53 PST 2010
<4>[    0.000000] CPU: ARMv7 Processor [510f00f2] revision 2 (ARMv7),
cr=10c53c7f
<4>[    0.000000] CPU: VIPT nonaliasing data cache, VIVT ASID tagged
instruction cache
<4>[    0.000000] Machine: mahimahi
<4>[    0.000000] Ignoring unrecognised tag 0x4d534d71
<4>[    0.000000] Ignoring unrecognised tag 0x4d534d72
...

so these are self-contained (they identify the radio build, userspace
build, and include the kernel log) with all the information we need to
provide context for the dsp crash.

Signed-off-by: Brian Swetland <swetland@google.com>
2010-03-03 17:11:40 -08:00
Eric Laurent
b593c76fed Fix issue 2473820: The ACDB ID used for audio playback is not correct after MT call.
The problem comes from a mismatch between the audio policy manager and the audio HAL behavior.
AudioHardware design requires that the audio routing is reapplied every time we enter or exit in call mode to
force audio paths and acoustics settings update. This is done by audio policy manager forcing a route change
in this case. It is also necessary that AudioHardware does not ignore this change request and to this purpose
current snd device stored in mCurSndDevice is cleared by setMode() so that next call to doRouting() actually
reapplies the device selection.
The problem is that setMode() clears mCurSndDevice unconditionnaly which makes that if we enter ringtone mode
but go back to normal mode (rejected call), audio policy manager will not reapply current device and we will remain
in a state where mCurSndDevice is undefined. This state will persist until a new device selection is performed.

The fix consists in clearing mCurSndDevice only if transitioning to/from in call mode.
2010-03-02 18:59:08 -08:00
Dima Zavin
08320899ac Merge "libgralloc-qsd8k: flush SW_WRITE cached pmem regions in unlock" 2010-03-02 16:56:43 -08:00
Mathias Agopian
b5c6441c47 Merge " fix [2473605] The GLSurfaceView is skewed in Sapphire" 2010-03-02 15:55:07 -08:00
Mathias Agopian
eb6b0ce0cc fix [2473605] The GLSurfaceView is skewed in Sapphire
Make sure we respect the 16 pixels alignment requirement of the GPU
2010-03-02 15:54:07 -08:00
Dima Zavin
c0f1d75920 libgralloc-qsd8k: flush SW_WRITE cached pmem regions in unlock
Change-Id: I31d1257f031c6b9b8dae604c2c1a8aa246ce3b84
Signed-off-by: Dima Zavin <dima@android.com>
2010-03-02 15:14:57 -08:00