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
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
Enable librpc for MSM7x30 and add missing definition of NULLPROC
and function prototype for xdr_u_int().
Change-Id: I97fe08abbf2d8157a6ce990ebd4dfcec41fce1d5
Merge commit '7f16e88be738d63e33e2e7c652c594379b136a01' into froyo-plus-aosp
* commit '7f16e88be738d63e33e2e7c652c594379b136a01':
Fix bug 2599652 increase attenuation on 3.5mm jack for music
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
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
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
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
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
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
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
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>
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.