[WIP]Call Recording Mod for Sprint/T-Mo variants (and maybe others) - Galaxy S 4 Developer Discussion [Developers-Only]

Trying to get the Call Recording Mod to work for Sprint and other variants as well.
The exact the change I've made in this thread.
The file modded is SecPhone.apk.
This is the Sprint MDL Stock SecPhone.apk
This is the modified one. (Again this doesn't work properly yet...)
The mod itself does what it's intended to do, which is to add the Record button, but the actual recording itself doesn't work properly. The time never increases (On the phone call screen) and the call is never recorded. On top of that it locks up when you try to Stop it or End the call, and it eventually reboots the entire system. (full instant reboot)
Here's the logcat messages that believe are important:
Code:
D/alsa_ucm( 223): Set mixer controls for Capture Call Uplink Downlink enable 1
D/alsa_ucm( 223): Setting mixer control: MultiMedia1 Mixer VOC_REC_UL, value: 1
D/alsa_ucm( 223): Setting mixer control: MultiMedia1 Mixer VOC_REC_DL, value: 1
D/ALSADevice( 223): close: handle 0x43aab7a8 h 0x0
D/ALSADevice( 223): open: handle 0x43aab7a8, format 0x2
D/ALSADevice( 223): Device value returned is hw:0,0
V/ALSADevice( 223): flags 11000000, devName hw:0,0
V/ALSADevice( 223): pcm_open returned fd 59
D/ALSADevice( 223): handle->format: 0x2
D/ALSADevice( 223): setHardwareParams: reqBuffSize 320 channels 1 sampleRate 8000
D/ALSADevice( 223): setHardwareParams: buffer_size 640, period_size 320, period_cnt 2
E/alsa_pcm( 223): cannot prepare channel: errno =-22
D/AudioStreamInALSA( 223): pcm_read() returned n < 0
D/AudioStreamInALSA( 223): standby
D/AudioStreamInALSA( 223): standby
D/AudioStreamInALSA( 223): into standby, stop record
Here is the kmsg output that continuously repeats:
Code:
[ 1601.856506] voice_cvs_stop_record: apr_cvs is NULL.
[ 1601.856658] voice_cvs_stop_record: apr_cvs is NULL.
[ 1601.856719] voice_cvs_stop_record: apr_cvs is NULL.
[ 1601.856872] voice_cvs_stop_record: apr_cvs is NULL.
[ 1601.864715] voice_cvs_stop_record: apr_cvs is NULL.
[ 1601.864868] voice_cvs_stop_record: apr_cvs is NULL.
[ 1601.864929] voice_cvs_stop_record: apr_cvs is NULL.
[ 1601.865020] voice_cvs_stop_record: apr_cvs is NULL.
[ 1601.865386] soc-audio soc-audio.0: can't get BE for INCALL_RECORD_RX
[ 1601.865447] MSM8960 Media1: no BE found for INCALL_RECORD_RX
[ 1601.865600] soc-audio soc-audio.0: can't get BE for INCALL_RECORD_TX
[ 1601.865753] MSM8960 Media1: no BE found for INCALL_RECORD_TX
[ 1601.871398] MSM8960 Media1: dpcm: no backend DAIs enabled for MSM8960 Media1
Anyone know much about the audio API's that can help out here?
errno -22 is EINVAL or Invalid Argument... So something with the recording function in the actual apk seems like it's not setup properly? But yet it works on the International versions without issue... So I'm not sure...

Have you check out the libs and seen if any are missing that the international version has? Maybe a CSC line. Hmm...

clark44 said:
Have you check out the libs and seen if any are missing that the international version has? Maybe a CSC line. Hmm...
Click to expand...
Click to collapse
Ahhh, good point didn't even think about that... I'll compare them when I get time tonight.

Unknownforce said:
Ahhh, good point didn't even think about that... I'll compare them when I get time tonight.
Click to expand...
Click to collapse
Good thread, will try and help as much as possible
On that note, what does the last_kmsg have to say about the reboot? Maybe its kernel related? If im not mistaken, believe there had to be a kernel tweak for the S3...

last_kmsg says same thing as what's listed above, nothing extra... just repeats that over and over.
One thing I can say is that it's not anything in the apk file that makes it work properly, because I was able to flash the international SecPhone.apk and it produced the same results.
So nothing special in there, so it's definitely a library or a kernel thing...

Unknownforce said:
last_kmsg says same thing as what's listed above, nothing extra... just repeats that over and over.
One thing I can say is that it's not anything in the apk file that makes it work properly, because I was able to flash the international SecPhone.apk and it produced the same results.
So nothing special in there, so it's definitely a library or a kernel thing...
Click to expand...
Click to collapse
If it's in the kernel try looking at the variant defconfigs and see if something's included/excluded.

garwynn said:
If it's in the kernel try looking at the variant defconfigs and see if something's included/excluded.
Click to expand...
Click to collapse
I'm leaning towards kernel..
Sent from my SGH-M919 using Tapatalk 2

The ROM I'm using (Mine) is using KT SGS4's latest...
I'm not too familiar with kernel development, but I'll decompile it and take a look... does you guys know what I would need to modify in the kernel?

Unknownforce said:
The ROM I'm using (Mine) is using KT SGS4's latest...
I'm not too familiar with kernel development, but I'll decompile it and take a look... does you guys know what I would need to modify in the kernel?
Click to expand...
Click to collapse
No need to decompile. Kt shoukd have a repo posted. Just look in arch/arm/configs for jf defconfig and the variants. Sprint is spr, for example
Sent from my SPH-L900 using Tapatalk 2

This guy figured out how to do the Call Recorder mod and it works on our Sprint GS4. He has both an odex and deodexed version. I flashed the odex version on stock, odex, rooted MF9 and it works perfectly.
http://forum.xda-developers.com/showthread.php?t=2352797
No issues with the ktoonsez kernel and the Viper4Android mod.

Related

[Kernel][AOSP][2.6.35.9][UV][OC] PureGinger Kernel 25-DEC-2010

This is my own compiled kernel for NEXUS ONE based on the latest source from stock git (http://android.git.kernel.org/)
The branch I use is: android-msm-2.6.35
As I am using my own compiled ROM (PureFroyo) daily, and I am using the stock Froyo camera, I cannot use the IR's kernel (as it is merged with 720p)
Therefore, this triggers my initiative to compile my own kernel. Referenced from intersectRaven's ; Wildmonks ; pershoot ; cyanogen and some other kernels, I have made various adjustments (merge as well). So, here are the features of this ROM:
- intersectRaven's suggested frequency table in acpuclock-qsd8x50.c
- UV to 950mV
- OC to 1152MHz
- All CPU power governors
- 21 MB memory hack (thanks to coolbho3k)
- Target for stock camera, no 720p camera
- No audio boost
- Some minor changes referenced from wildmonks and intersectRaven (thanks!)
- Wifi, Froyo portable hotspot and camera work perfectly
- Not HAVS, but SVS instead
- Battery life is good for my nexus one
- Best match with stock / AOSP ROM
So, here is the link to the kernel, I would be grateful if you could help to test it and feedback whether it works for you (thanks~ ^_^)
Change Log:
2010-12-25 (Merry X'mas )
======================
- Rename to PureGinger
- Tested under AOSP gingerbread for a few days, very stable!
- Changed back to 950mV because 925mV seems not stable in Gingerbread
- Cherry-pick many commits... refer to my github
Link: http://www.mediafire.com/?dawr4f99t4fwc35
Mirror: http://www.4shared.com/file/6pNfdRiQ/PureGinger_26359_AXI_UV_SVS_12.html
File: PureGinger_2.6.35.9_AXI_UV_SVS_122110_223513.zip
MD5: 775007F8C1B549AAF5E18E40B0C704F5
2010-11-26
=========
- Changed to 925mV (UV). Seems running smooth for a few days
- Cherry-pick many commits from various sources (thanks stock, pershoot, raven, redstar, cyanogen, etc...)
- Enhanced ds2784 battery driver
- Other changes could be seen from my github
Link: http://www.mediafire.com/?52aa1h265w1tfau
Mirror: http://www.4shared.com/file/eqA2z7nW/PF_26357_AXI_UV_SVS_112610_014.html
File: PF_2.6.35.7_AXI_UV_SVS_112610_014525.zip
MD5: B17904841A9114BBB453FF4A94676CF2
2010-11-17
=========
- Cherry-pick many commits from various sources
- Kernel scheduler improvement (http://forum.xda-developers.com/showthread.php?t=841599)
Link: http://www.mediafire.com/?lw7mfll6b88qtqx
File: PF_2.6.35.7_AXI_UV_SVS_111710_215623.zip
MD5: 3CD0C4976F5DA7BBFBD42FE95C6A44CE
2010-11-05
=========
- Apply IR's latest oom modifications
- Cherry-pick some latest IR's, pershoot's, cyanogen's & experimental commits
Link: http://www.mediafire.com/?vpb49te3rxpf11z
File: PF_2.6.35.7_AXI_UV_SVS_110510_230204.zip
MD5: F2C2DEE6DF9485B52A5973B243602F6D
2010-11-02
=========
- Merge with a few latest IR's & Wildmonk's commits
- Source push to github
Link: http://www.mediafire.com/?m407xyaub6wuiby
File: PF_2.6.35.7_AXI_UV_SVS_110310_002259.zip
MD5: 3CBF9EFD6A11680FB46253111941CE1E
2010-10-31
=========
- Fix USB mount problem
- Added AXI rate tweak for performance and battery savings (IR's commit: 03ca24721e278eca034f)
Link: http://www.mediafire.com/?xx2sf66sntcrf2r
File: PF_2.6.35.7_AXI_UV_SVS_103110_000825.zip
MD5: 5F4D54E6E3BA63CDA0D35DE4756CC82B
2010-10-27
=========
- First version
Link: http://www.mediafire.com/?t9w73l8qi773qm3
File: PF_2.6.35.7_UV_SVS_signed_102710_012826.zip
MD5: D1EEEA92276BE7965679B1AB173B10B2
---------------------------------------------------------------
Installation procedures are just like what you are flashing with any other kernels (please make backup first):
Instructions:
1.) Reboot to recovery and flash the update zip directly.
OR
Instructions for zImage and bcm4329.ko driver extracted from the update.zip(from command line):
1.) adb remount
2.) adb push bcm4329.ko /system/lib/modules
3.) adb reboot bootloader
4.) fastboot flash zimage zImage
5.) fastboot reboot
---------------------------------------------------------------
Last thing: Please flash the kernel at your own risk Enjoy it.
---------------------------------------------------------------
* I am using my own compiled ROM: PureFroyo
* Source finally push to github: http://github.com/ardatdat/PureFroyo-Kernel
* (OLD) - Link to the 1st version kernel source code:
Part 1
http://www.mediafire.com/?a4q78ux2yy8r8j4
Part 2
http://www.mediafire.com/?yy7t2i9hotq5hg5
---------------------------------------------------------------
You need to post a link to your source code, or make it available for people somehow, according to this.
http://www.xda-developers.com/android/general-public-license-gpl-for-android-kernels/
wdfowty said:
You need to post a link to your source code, or make it available for people somehow, according to this.
http://www.xda-developers.com/android/general-public-license-gpl-for-android-kernels/
Click to expand...
Click to collapse
This is true. Please comply.
EDIT: Thank you. Great work!
wdfowty said:
You need to post a link to your source code, or make it available for people somehow, according to this.
http://www.xda-developers.com/android/general-public-license-gpl-for-android-kernels/
Click to expand...
Click to collapse
overground said:
This is true. Please comply.
Click to expand...
Click to collapse
Just get myself in front of the computer ~
Sure, I am packing the source now and will post the link soon.
Thanks for your prompting
Thank you so much. Since several weeks my wifi at home didn't work very well. I try some kernel with the nightly. Your kernel solved my problem
Source codes finally uploaded to mediafire
THANKSS
Amazing Kernel, just what I was looking for. This overclocks it to 1.152 AWESOME while undervolted and stock!!! The best!
Everyone trying this new kernel, PLEASE REPORT WHICH ROM & VERSION YOU ARE USING?
atlast a custom-kernel for us non 720p, will try when i get home from work iam runnning Geo411´s FRG83 rom.
ardatdat said:
Just get myself in front of the computer ~
Sure, I am packing the source now and will post the link soon.
Thanks for your prompting
Click to expand...
Click to collapse
No problem, wouldn't want your thread to get locked/removed for something like that.
mrdemo007 said:
atlast a custom-kernel for us non 720p, will try when i get home from work iam runnning Geo411´s FRG83 rom.
Click to expand...
Click to collapse
Interested to hear your experience. This kernel seems like a great match for Geo's ROM.
wdfowty said:
No problem, wouldn't want your thread to get locked/removed for something like that.
Click to expand...
Click to collapse
thanks, source already uploaded and link updated in #1 post
Arcarsenal said:
Interested to hear your experience. This kernel seems like a great match for Geo's ROM.
Click to expand...
Click to collapse
Me too, waiting for your report
Arcarsenal said:
Interested to hear your experience. This kernel seems like a great match for Geo's ROM.
Click to expand...
Click to collapse
just flashed it on Geo's ROM it seems everything is fine just need a little more time for testing....
Edit : excellent with Geo's ROM
Rom become more responsive and snappy and battery life is little improved
Been running this kernel with a rooted stock FRG83 ROM for a day now. So far VERY NICE!
One thing...I seem to have a problem with WiFi cutting out for a couple seconds every minute or so when I'm in Airplane mode. I work in a basement and I use airplane mode to keep the radio from killing my battery.
I know this is probably somewhat unique to me, but thought I would let you know.
This is exactly what I'm looking for! Thanks a lot!
Edit: I'm using Geo's Completely Stock Deodexed with busybox, FRG83. I cannot connect to wifi after flashing this kernel, here are my logcat.
D/Tethering( 96): eth0 is not a tetherable iface, ignoring
D/WifiService( 96): ACTION_BATTERY_CHANGED pluggedType: 2
D/WifiService( 96): acquireWifiLockLocked: WifiLock{NetworkLocationProvider ty
pe=2 [email protected]}
V/WifiStateTracker( 96): Connection to supplicant established, state=DISCONNEC
TED
D/NetworkStateTracker( 96): setDetailed state, old =DISCONNECTED and new state
=DISCONNECTED
D/LocationMasfClient( 96): getNetworkLocation(): Location not found in cache,
making network request
I/wpa_supplicant( 686): CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:00:00
:00:00
I/wpa_supplicant( 686): WPS-AP-AVAILABLE
W/wpa_supplicant( 686): Failed to initiate AP scan.
V/WifiStateTracker( 96): Changing supplicant state: DISCONNECTED ==> SCANNING
D/NetworkStateTracker( 96): setDetailed state, old =DISCONNECTED and new state
=SCANNING
V/WifiMonitor( 96): Event [WPS-AP-AVAILABLE ]
D/ConnectivityService( 96): Dropping ConnectivityChange for WIFI: DISCONNECTED
/SCANNING
V/WifiMonitor( 96): Event [CTRL-EVENT-STATE-CHANGE id=-1 state=2 BSSID=00:00:0
0:00:00:00]
D/dalvikvm( 96): GC_FOR_MALLOC freed 24258 objects / 1295032 bytes in 118ms
D/NativeCrypto( 96): Freeing OpenSSL session
D/LocationMasfClient( 96): getNetworkLocation(): Number of prefetched entries
1
D/LocationMasfClient( 96): getNetworkLocation(): Returning network location wi
th accuracy 1467.0
D/WifiService( 96): releaseWifiLockLocked: WifiLock{NetworkLocationProvider ty
pe=2 [email protected]}
I/wpa_supplicant( 686): WPS-AP-AVAILABLE
V/WifiMonitor( 96): Event [WPS-AP-AVAILABLE ]
W/wpa_supplicant( 686): Failed to initiate AP scan.
I/wpa_supplicant( 686): WPS-AP-AVAILABLE
V/WifiMonitor( 96): Event [WPS-AP-AVAILABLE ]
D/SntpClient( 96): request time failed: java.net.SocketTimeoutException: Conne
ction timed out
W/wpa_supplicant( 686): Failed to initiate AP scan.
I/wpa_supplicant( 686): WPS-AP-AVAILABLE
V/WifiMonitor( 96): Event [WPS-AP-AVAILABLE ]
D/AK8973 ( 75): Compass Start
I/power ( 96): *** set_screen_state 0
D/WifiService( 96): ACTION_SCREEN_OFF
D/WifiService( 96): setting ACTION_DEVICE_IDLE timer for 120,000 ms
D/SurfaceFlinger( 96): About to give-up screen, flinger = 0x125b18
D/AK8973 ( 75): Compass CLOSE
W/wpa_supplicant( 686): Failed to initiate AP scan.
D/StatusBar( 96): DISABLE_EXPAND: yes
D/GoogleLoginService( 204): onBind: Intent { act=android.accounts.AccountAuthen
ticator cmp=com.google.android.gsf/.loginservice.GoogleLoginService }
I/wpa_supplicant( 686): WPS-AP-AVAILABLE
V/WifiMonitor( 96): Event [WPS-AP-AVAILABLE ]
D/dalvikvm( 204): GC_EXPLICIT freed 2276 objects / 120416 bytes in 70ms
D/dalvikvm( 411): GC_EXPLICIT freed 35 objects / 2000 bytes in 60ms
BTW, I hide the SSID of my wifi, and the encryption method is WPA2-PSK with AES. And when I connect my nexus one to laptop, there is no notification to ask me to mount the phone as a usb device or something like that. There should be an android, green or orange, depends on mounted or not, but I notice nothing happens when I connect.
Interesting.. Which radio are you using at the moment?
Using Geo411's latest ROM I get no USB SD mount notification, anyone else having this issue? I am using the latest Korean radio ROM as well.
Arcarsenal said:
Interesting.. Which radio are you using at the moment?
Click to expand...
Click to collapse
32.50.00.32U_5.12.00.08, the latest Korean radio.
niftydl said:
Using Geo411's latest ROM I get no USB SD mount notification, anyone else having this issue? I am using the latest Korean radio ROM as well.
Click to expand...
Click to collapse
Me.
For those of you with USB mount and WiFi issues are you all using the latest Korean radio? Have you tried downgrading the radio and seeing if the issues are resolved?
Is swap enabled or disabled?

Help with BoardConfig.mk

I'm working on a device directory to get CM7 building for the Galaxy Player 5.0 USA. I'm using Entropy512's kernel and copying some things out of vzwtab mostly, but there's some parameters in the BoardConfig.mk that I'm not sure how to find out. The Galaxy Player 5.0 seems to be unique among the example galaxy-based devices I could find in having only mmc partitions. So does anyone know what the proper values should be for:
BOARD_KERNEL_BASE
BOARD_NAND_PAGE_SIZE
BOARD_FLASH_BLOCK_SIZE
BOARD_PAGE_SIZE
As far as I can tell the BOARD_KERNEL_BASE is supposed to be the offset into the boot.img where the kernel can be found? But Samsungs don't use the boot.img so does this paremeter make sense? The various samsung devices all define this value though, and with different values, so maybe it means something else..
I found this in the make file in arch/arm of Entrophy512's code.
I think this is what you need for BOARD_KERNEL_BASE ...
HTML:
# The byte offset of the kernel image in RAM from the start of RAM.
TEXT_OFFSET := $(textofs-y)
Above that textofs-y was defined as
HTML:
textofs-y := 0x00008000
textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
# We don't want the htc bootloader to corrupt kernel during resume
textofs-$(CONFIG_PM_H1940) := 0x00108000
# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
ifeq ($(CONFIG_ARCH_SA1100),y)
textofs-$(CONFIG_SA1111) := 0x00208000
endif
I think your value should be 0x00008000 ...
Thanks for that! A bit of googling on TEXT_OFFSET led me to PHYS_OFFSET, which is defined in arch/arm/mach-*/include/mach/memory.h, I think that's the value I need, it matches up in a couple of other kernels anyway. At least it matches up for galaxys2, but for mach-s5pv210 products, the PHYS_OFFSET is 0x30000000 but the kernel base is 0x32000000, I'm not sure why they don't match but I think one of those values should be galaxy player kernel base.
A quick grep turns this up...
./mach-s5pc100/include/mach/memory.h:#define PHYS_OFFSET UL(0x20000000)
s5pc100 is the name of the board for the Galaxy Player 5.0 right?
---------- Post added at 06:50 PM ---------- Previous post was at 06:08 PM ----------
HTML:
> As long as the zImage is placed within the 256MB range from the
> start of the memory, ZRELADDR (Address where the decompressed
> kernel will be placed, usually == PHYS_OFFSET + TEXT_OFFSET)
I think I may have it. It seems like we need both values PHYS_OFFSET +TEXT OFFSET.
So if that is what the BOARD_KERNEL_BASE is supposed to be then the value should be 0x20008000.
It would be nice to find a way to get the address off of our currently running devices. I'm going to look for some command or app that will say what it is.
References
http://www.spinics.net/lists/arm-kernel/msg89507.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-June/017614.html
Meticulus said:
A quick grep turns this up...
./mach-s5pc100/include/mach/memory.h:#define PHYS_OFFSET UL(0x20000000)
s5pc100 is the name of the board for the Galaxy Player 5.0 right?
Click to expand...
Click to collapse
According to /proc/config.gz from Entropy512's kernel it's the s5pv210.
Come on Meticulous, get back in the game! We need you!
Sent from my cm_tenderloin using Tapatalk
ambrice said:
According to /proc/config.gz from Entropy512's kernel it's the s5pv210.
Click to expand...
Click to collapse
According to the build.prop (ro.build.platform) it's s5pc110. I'm betting the boards are pretty close. I'm just trying to help out. This is all new to me...
Meticulus said:
I think I may have it. It seems like we need both values PHYS_OFFSET +TEXT OFFSET.
So if that is what the BOARD_KERNEL_BASE is supposed to be then the value should be 0x20008000.
It would be nice to find a way to get the address off of our currently running devices. I'm going to look for some command or app that will say what it is.
Click to expand...
Click to collapse
The source for the unpackbootimg is at system/core/mkbootimg/unpackbootimg.c, and it has the line:
printf("BOARD_KERNEL_BASE %08x\n", header.kernel_addr - 0x00008000);
So I think in the boot.img header header.kernel_addr is the ZRELADDR and the BOARD_KERNEL_BASE is supposed to be ZRELADDR - TEXT_OFFSET, which would be the PHYS_OFFSET.
Meticulus said:
According to the build.prop (ro.build.platform) it's s5pc110. I'm betting the boards are pretty close. I'm just trying to help out. This is all new to me...
Click to expand...
Click to collapse
I definitely appreciate the help! It's all new to me too..
They are very close:
http://odroid.foros-phpbb.com/t198-differences-between-s5pc110-and-s5pv210
I downloaded the official samsung released YP-G70 sources, and the defconfig has CONFIG_ARCH_S5PV210=y. So maybe they're close enough as far as the build.prop is concerned? I'm not sure what ro.build.platform is used for..
HTML:
./unpackbootimg -i zImage
BOARD_KERNEL_CMDLINE 
BOARD_KERNEL_BASE e19f8000
BOARD_PAGE_SIZE 24061976
Segmentation fault
It looks like that code can not unpack Entrophy512's kernel...
Also regarding the board name, look in "/system/lib/hw/". All the filenames are like "*.s5pc110.so"
I think that "s5pv210" is also the same board as the galaxy s...
I think, but am not sure, but some of those values there are placeholders on Samsung-based devices.
I was a dumbass and accidentally nuked my device tree so I need to rebuild it. I may instead just fork ambrice's to redo it.
Looks like this week/weekend will consist of some fun decobwebbing.
I would appreciate the help. My current state is that it builds an image but an assert fails when flashing the boot.img.
I've done some updates, I have a working kernel and recovery.
When I boot CM7 system_server crashes with this error:
Code:
I/Zygote ( 165): Accepting command socket connections
I/sysproc ( 223): Entered system_init()
I/sysproc ( 223): ServiceManager: 0x76d18
I/SurfaceFlinger( 223): SurfaceFlinger is starting
I/SurfaceFlinger( 223): dithering enabled
I/SurfaceFlinger( 223): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
E/HAL ( 223): load: module=/system/lib/hw/gralloc.s5pc110.so
E/HAL ( 223): Cannot load library: reloc_library[1311]: 165 cannot locate '__android_log_print'...
E/FramebufferNativeWindow( 223): Couldn't get gralloc module
system_server is linked against liblog.so which defines the __android_log_print, I think maybe this error is misleading. /system/lib/hw/gralloc.s5pc110.so is a library I pulled off the stock image as part of the vendor proprietaries.
stack trace in log shows it's crashing in android:isplayHardware::init(unsigned int) in libsurfaceflinger.so
Any ideas of things to try?
I'm just throwing this stuff out there but, assuming that "gralloc.s5pc110.so" is in the location specified, perhaps the "gralloc.s5pc110.so" is trying to locate "liblog.so" and it is "liblog.so" that is in the incorrect location (from stock). If "__android_log_print" is what it can not find and that is defined in "liblog.so" then that leads me to believe that it's not loaded and may be in the wrong location. So, you could compare the location from stock and put a duplicate there and see if that gets you any further. Maybe it's the "PATH" var in init.rc does not include the path for liblog.so...?
As a last resort you could try pulling a "gralloc.aries.so" and renaming it to match since the boards are so similar and see what that gets you?
In a couple days, I may join you on your quest to get a cm7 port. This is your project and you seem to be doing quite well but maybe I can get lucky help out.

Instant crash when governor set to msm-dcvs

I just got my GSIV today and rooted it using the stickied root method. I have installed setcpu. The rom crashes the second I set the governor to MSM-DCVS. Any ideas?
PelPix said:
I just got my GSIV today and rooted it using the stickied root method. I have installed setcpu. The rom crashes the second I set the governor to MSM-DCVS. Any ideas?
Click to expand...
Click to collapse
My S4 GT-i9505 crash too...
PelPix said:
I just got my GSIV today and rooted it using the stickied root method. I have installed setcpu. The rom crashes the second I set the governor to MSM-DCVS. Any ideas?
Click to expand...
Click to collapse
Same here.... i searched and really have not found an answer.
Stacktrace from enabling msm-dcvs
Here's the relevant stack trace from the kernel panic when enabling the msm-dcvs governor.
Code:
[ 2811.452880] MSM_DCVS: msm_dcvs_freq_sink_start: msm_dcvs_freq_sink_start invalid dcvs_core_id = 0 returning -EINVAL
[ 2811.462585] ------------[ cut here ]------------
[ 2811.466979] kernel BUG at /opt/jenkins/android/workspace/android/jellybean/kernel/samsung/jf/drivers/cpufreq/cpufreq_gov_msm.c:206!
[ 2811.478790] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 2811.484557] Modules linked in: dhd vpnclient
[ 2811.488799] CPU: 0 Not tainted (3.4.0-cyanogenmod-gfbaa5c7 #1)
I've done a little cursory exploring and noticed that the CPU_OFFSET parameter starts at 1 on this kernel module, but it is being told to enable this governor on core 0, hence the message above. Not sure at the moment if it's the module's fault, or just some misconfiguration from settings activity when enabling this module.
I plan to look into this in a bit more depth sometime in the next few weeks(hopefully).
Follow up to stepheno's message
stephenopdx said:
Here's the relevant stack trace from the kernel panic when enabling the msm-dcvs governor.
Code:
[ 2811.452880] MSM_DCVS: msm_dcvs_freq_sink_start: msm_dcvs_freq_sink_start invalid dcvs_core_id = 0 returning -EINVAL
[ 2811.462585] ------------[ cut here ]------------
[ 2811.466979] kernel BUG at /opt/jenkins/android/workspace/android/jellybean/kernel/samsung/jf/drivers/cpufreq/cpufreq_gov_msm.c:206!
[ 2811.478790] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 2811.484557] Modules linked in: dhd vpnclient
[ 2811.488799] CPU: 0 Not tainted (3.4.0-cyanogenmod-gfbaa5c7 #1)
I've done a little cursory exploring and noticed that the CPU_OFFSET parameter starts at 1 on this kernel module, but it is being told to enable this governor on core 0, hence the message above. Not sure at the moment if it's the module's fault, or just some misconfiguration from settings activity when enabling this module.
I plan to look into this in a bit more depth sometime in the next few weeks(hopefully).
Click to expand...
Click to collapse
Hi, stephenopdx and I are working together on this issue in our free time. As a follow up, we've found that the call to msm_dcvs_scm_init is returning a non-zero value (specifically 4). This function is calling the command DCVD_CMD_INIT (command ID 5) in the SCM_SVC_DCVS service. The continues down to an ARM instruction call to move the processor into "secure mode" (aka TrustZone). I'd like to emphasize at this point that both stephenopdx are complete noobs when it comes to kernel development.
We are wondering:
1) Why, if the scm_call to DCVS_CMD_INIT fails, does the kernel continue on its merry way?
2) What does that return code of 4 mean?
3) What preconditions are necessary to initialize DCVS?
4) Is there a place where we can find reference materials (things like return codes and their meanings) for the Qualcomm MSM 8960 SoC? Googling for return code 4 was fairly futile.
5) Is there some sort of kernel debugger so that we can stop using terrible pr_err messages?
We can also produce stack traces or kernel panic logs (heavily augmented with demented pr_err messages to help us figure out what's going on) if anyone is interested.
Thanks!

[DEV] LegacyXperia development discussion - DEVS ONLY

Hi, since I closed my DEV threads there is no place for discussing development related things.
I've opened this thread so we can discuss any development related stuff (kernel etc).
Please keep the thread clean. I will report any non-low-level development posts.
ION kernel status
Kernel boots, lcd backlight is on but no image is shown.
I only get a display full of noise for half a second, after the following error occurs:
Code:
[ 8.994812] ------------[ cut here ]------------
[ 8.995025] WARNING: at /home/mike/android/cm10.1/kernel/semc/msm7x30/kernel/mutex.c:198 __mutex_lock_slowpath+0x70/0x27c()
[ 8.995483] Modules linked in:
[ 8.995758] [<c001428c>] (unwind_backtrace+0x0/0x11c) from [<c008a6f0>] (warn_slowpath_common+0x4c/0x64)
[ 8.996154] [<c008a6f0>] (warn_slowpath_common+0x4c/0x64) from [<c008a720>] (warn_slowpath_null+0x18/0x1c)
[ 8.996582] [<c008a720>] (warn_slowpath_null+0x18/0x1c) from [<c061b524>] (__mutex_lock_slowpath+0x70/0x27c)
[ 8.998138] [<c061b524>] (__mutex_lock_slowpath+0x70/0x27c) from [<c061b73c>] (mutex_lock+0xc/0x24)
[ 9.007171] [<c061b73c>] (mutex_lock+0xc/0x24) from [<c02988dc>] (mddi_host_timer_service+0x374/0x430)
[ 9.016448] [<c02988dc>] (mddi_host_timer_service+0x374/0x430) from [<c00949dc>] (run_timer_softirq+0x18c/0x260)
[ 9.026519] [<c00949dc>] (run_timer_softirq+0x18c/0x260) from [<c008fa1c>] (__do_softirq+0x74/0x120)
[ 9.035705] [<c008fa1c>] (__do_softirq+0x74/0x120) from [<c008fe8c>] (irq_exit+0x44/0xa8)
[ 9.043884] [<c008fe8c>] (irq_exit+0x44/0xa8) from [<c000f08c>] (handle_IRQ+0x68/0x8c)
[ 9.051788] [<c000f08c>] (handle_IRQ+0x68/0x8c) from [<c00084e4>] (vic_handle_irq+0x28/0x30)
[ 9.060119] [<c00084e4>] (vic_handle_irq+0x28/0x30) from [<c000dd80>] (__irq_svc+0x40/0x70)
[ 9.068511] Exception stack(0xc0879f58 to 0xc0879fa0)
[ 9.073547] 9f40: ffffffff 000000b0
[ 9.081634] 9f60: 00000001 00000000 c0878000 c0889470 c0908048 c0889464 00204059 511f00f2
[ 9.089874] 9f80: 00000000 00000000 00000000 c0879fa0 c007dbd8 c000f1a0 400b0013 ffffffff
[ 9.098052] [<c000dd80>] (__irq_svc+0x40/0x70) from [<c000f1a0>] (default_idle+0x24/0x2c)
[ 9.106201] [<c000f1a0>] (default_idle+0x24/0x2c) from [<c000f458>] (cpu_idle+0x5c/0xac)
[ 9.114196] [<c000f458>] (cpu_idle+0x5c/0xac) from [<c060af7c>] (rest_init+0x84/0x9c)
[ 9.122100] [<c060af7c>] (rest_init+0x84/0x9c) from [<c0840a54>] (start_kernel+0x368/0x3c4)
[ 9.130432] ---[ end trace 826fbc4fa566ec66 ]---
EDIT: Full log with mddi & msm_fb debugging enabled here: http://pastebin.com/Tj1izvyt
I don't see anything useful
I'm not familiar with these kernel building i know u people @android1234567 @DevConnection_Team @Christopher83 @johnnyslt @arco68 can help us building ION kernel for xperia 2011 devices ... sorry if I'm interrupting u .. thank you
mike maybe we need some specific changes in qcom_display_caf try to use arco'w variant
Does kernel panic if you exclude display driver?
Gesendet von meinem Xperia Neo V mit Tapatalk 2
deccen90 said:
I'm not familiar with these kernel building i know u people @android1234567 @DevConnection_Team @Christopher83 @johnnyslt @arco68 can help us building ION kernel for xperia 2011 devices ... sorry if I'm interrupting u .. thank you
Click to expand...
Click to collapse
Where is the stable pmem kernel source? and in what branch @mikeioannina tried to enable ION?
johnnyslt said:
Where is the stable pmem kernel source? and in what branch @mikeioannina tried to enable ION?
Click to expand...
Click to collapse
current pmem kernel: https://github.com/LegacyXperia/msm7x30-3.4.x-nAa/commits/cm-10.1
new ion kernel: https://github.com/mikeNG/android_kernel_semc_msm7x30/commits/cm-10.1-mutex-error
You can check the second post for more info.
mikeioannina said:
current pmem kernel: https://github.com/LegacyXperia/msm7x30-3.4.x-nAa/commits/cm-10.1
new ion kernel: https://github.com/mikeNG/android_kernel_semc_msm7x30/commits/cm-10.1-mutex-error
You can check the second post for more info.
Click to expand...
Click to collapse
I'm seeing that pmem_adsp doesn't get allocated and it should:
Code:
[ 3.558837] pmem: pmem_setup: unable to register pmem driver(pmem_adsp) - zero size passed in!
What adreno libs are you using?
Also are you using patched gralloc with PMEM_ADSP support?
hi @mikeioannina
I would like to help fix the fm radio in cm11. I am not a dev and I only have some basic C programming and github skills. If you think it is worth the time ( mine and yours), could you describe how to build the fm app for cm11 and where to look for bugs?
johnny.tifosi said:
hi @mikeioannina
I would like to help fix the fm radio in cm11. I am not a dev and I only have some basic C programming and github skills. If you think it is worth the time ( mine and yours), could you describe how to build the fm app for cm11 and where to look for bugs?
Click to expand...
Click to collapse
I believe that the FM app is broken because there is no wrapper for the SEMC FM libs...
johnny.tifosi said:
hi @mikeioannina
I would like to help fix the fm radio in cm11. I am not a dev and I only have some basic C programming and github skills. If you think it is worth the time ( mine and yours), could you describe how to build the fm app for cm11 and where to look for bugs?
Click to expand...
Click to collapse
kemoba said:
I believe that the FM app is broken because there is no wrapper for the SEMC FM libs...
Click to expand...
Click to collapse
You can pick this change: http://legacyxperia.us.to:8080/131 in order to build the TI FM stuff. It's only for cm10.1 currently but in my opinion it's the best version to work on FM, since we have the most complete code for msm7x30 & TI wl12xx in that version.
I'm afraid you won't manage to do anything since you need some knowledge of how android audio stuff works (I also haven't worked on audio stuff very much in the past and don't have much knowledge)
Anyway, the code is there for anyone who wants to try
mikeioannina said:
Kernel boots, lcd backlight is on but no image is shown.
I only get a display full of noise for half a second, after the following error occurs:
Code:
[ 8.994812] ------------[ cut here ]------------
[ 8.995025] WARNING: at /home/mike/android/cm10.1/kernel/semc/msm7x30/kernel/mutex.c:198 __mutex_lock_slowpath+0x70/0x27c()
[ 8.995483] Modules linked in:
[ 8.995758] [<c001428c>] (unwind_backtrace+0x0/0x11c) from [<c008a6f0>] (warn_slowpath_common+0x4c/0x64)
[ 8.996154] [<c008a6f0>] (warn_slowpath_common+0x4c/0x64) from [<c008a720>] (warn_slowpath_null+0x18/0x1c)
[ 8.996582] [<c008a720>] (warn_slowpath_null+0x18/0x1c) from [<c061b524>] (__mutex_lock_slowpath+0x70/0x27c)
[ 8.998138] [<c061b524>] (__mutex_lock_slowpath+0x70/0x27c) from [<c061b73c>] (mutex_lock+0xc/0x24)
[ 9.007171] [<c061b73c>] (mutex_lock+0xc/0x24) from [<c02988dc>] (mddi_host_timer_service+0x374/0x430)
[ 9.016448] [<c02988dc>] (mddi_host_timer_service+0x374/0x430) from [<c00949dc>] (run_timer_softirq+0x18c/0x260)
[ 9.026519] [<c00949dc>] (run_timer_softirq+0x18c/0x260) from [<c008fa1c>] (__do_softirq+0x74/0x120)
[ 9.035705] [<c008fa1c>] (__do_softirq+0x74/0x120) from [<c008fe8c>] (irq_exit+0x44/0xa8)
[ 9.043884] [<c008fe8c>] (irq_exit+0x44/0xa8) from [<c000f08c>] (handle_IRQ+0x68/0x8c)
[ 9.051788] [<c000f08c>] (handle_IRQ+0x68/0x8c) from [<c00084e4>] (vic_handle_irq+0x28/0x30)
[ 9.060119] [<c00084e4>] (vic_handle_irq+0x28/0x30) from [<c000dd80>] (__irq_svc+0x40/0x70)
[ 9.068511] Exception stack(0xc0879f58 to 0xc0879fa0)
[ 9.073547] 9f40: ffffffff 000000b0
[ 9.081634] 9f60: 00000001 00000000 c0878000 c0889470 c0908048 c0889464 00204059 511f00f2
[ 9.089874] 9f80: 00000000 00000000 00000000 c0879fa0 c007dbd8 c000f1a0 400b0013 ffffffff
[ 9.098052] [<c000dd80>] (__irq_svc+0x40/0x70) from [<c000f1a0>] (default_idle+0x24/0x2c)
[ 9.106201] [<c000f1a0>] (default_idle+0x24/0x2c) from [<c000f458>] (cpu_idle+0x5c/0xac)
[ 9.114196] [<c000f458>] (cpu_idle+0x5c/0xac) from [<c060af7c>] (rest_init+0x84/0x9c)
[ 9.122100] [<c060af7c>] (rest_init+0x84/0x9c) from [<c0840a54>] (start_kernel+0x368/0x3c4)
[ 9.130432] ---[ end trace 826fbc4fa566ec66 ]---
EDIT: Full log with mddi & msm_fb debugging enabled here: http://pastebin.com/Tj1izvyt
I don't see anything useful
Click to expand...
Click to collapse
Hello,
I'm porting 3.x kernel on an other xperia device (x10) and facing the same issue ... Did you managed to solve it ?
I'm using ion memory management and as johnnyslt wrote I got this line in log too :
PHP:
pmem: pmem_setup: unable to register pmem driver(pmem_adsp) - zero size passed in!
I'll look with for this (that musn't be a big deal to allocate pmem_adsp with fitting lines in board ... let's see if this is what is causing the trouble.
If you didn't find the solution yet, I'll let you know if I find
Regards
Tof37 said:
Hello,
I'm porting 3.x kernel on an other xperia device (x10) and facing the same issue ... Did you managed to solve it ?
I'm using ion memory management and as johnnyslt wrote I got this line in log too :
PHP:
pmem: pmem_setup: unable to register pmem driver(pmem_adsp) - zero size passed in!
I'll look with for this (that musn't be a big deal to allocate pmem_adsp with fitting lines in board ... let's see if this is what is causing the trouble.
If you didn't find the solution yet, I'll let you know if I find
Regards
Click to expand...
Click to collapse
No, still having the problem. I have limited time these days so no much progress...
If you manage anything let me know
@mikeioannina
Hope it'll help ... you should have a look to your drivers/video/msm/logo.c and msm_fb.c and .h files
In the last 2 files the lines which are dealing with fb_msm_logo ...
I ported 3.4 video drivers in the 3.0.8 kernel I use and add the same issue.
I add this problem too with 3.0.8 drivers and solving the problem of fb_msm_logo did it.
If you disable fb_msm_logo in your config file but still have the issue this means you're mising lines specific for your device.
If 3.0.X kernel is already working on your device, try to make a diff with video drivers.
I'll take a look at your repo when I'll have a little time
Regards
Tof37 said:
@mikeioannina
Hope it'll help ... you should have a look to your drivers/video/msm/logo.c and msm_fb.c and .h files
In the last 2 files the lines which are dealing with fb_msm_logo ...
I ported 3.4 video drivers in the 3.0.8 kernel I use and add the same issue.
I add this problem too with 3.0.8 drivers and solving the problem of fb_msm_logo did it.
If you disable fb_msm_logo in your config file but still have the issue this means you're mising lines specific for your device.
If 3.0.X kernel is already working on your device, try to make a diff with video drivers.
I'll take a look at your repo when I'll have a little time
Regards
Click to expand...
Click to collapse
Thanks for the hints,
hmm... I think I have tried without bootlogo with no luck, I will try again to be sure.
3.0.8 works fine on our devices, 3.4 works too but with 3.0.8 video drivers. When I try pure 3.4 it doesn't boot with the above error.
EDIT:
I tried disabling bootlogo with no change, still no display.
Making a diff of 3.0.8/3.4 drivers/video/msm is almost impossible since there are too many changes involved, I already tried it with no luck, spent hours and it didn't even compile.
I'm really sad with this situation, I'm working for 3 months on this kernel with the exact same issue. where the hell is the problem?
mikeioannina said:
Thanks for the hints,
hmm... I think I have tried without bootlogo with no luck, I will try again to be sure.
3.0.8 works fine on our devices, 3.4 works too but with 3.0.8 video drivers. When I try pure 3.4 it doesn't boot with the above error.
EDIT:
I tried disabling bootlogo with no change, still no display.
Making a diff of 3.0.8/3.4 drivers/video/msm is almost impossible since there are too many changes involved, I already tried it with no luck, spent hours and it didn't even compile.
I'm really sad with this situation, I'm working for 3 months on this kernel with the exact same issue. where the hell is the problem?
Click to expand...
Click to collapse
I see so I'm facing exactly the same problem ...
do you have this problem with your kernel with pmem ?
I didn't try with mine (only tried with the one where ion is enabled)
Even in the ion enabled version, pmem_adsp is allocated but still have the problem.
ps : It's been nearly 1 year I started to port 3.0.8 kernel on x10 ... I got nearly 6 months (including 2 months to not work on it) to try to solve display problem
@mikeioannina
You should try this ...
in drivers/video/msm/mddi.c
in void pmdh_clk_enable() you've got
PHP:
if (mddi_host_timer.function)
mddi_host_timer_service(0);
In my .32 video drivers this if is in static int mddi_resume ...
Try to get the the above function like this :
PHP:
static int mddi_resume(struct platform_device *pdev)
{
mddi_host_type host_idx = MDDI_HOST_PRIM;
if (!mddi_is_in_suspend)
return 0;
mddi_is_in_suspend = 0;
if (mddi_power_locked)
return 0;
pmdh_clk_enable();
mddi_host_reg_out(PAD_CTL, mddi_pad_ctrl);
[B]if (mddi_host_timer.function)
mddi_host_timer_service(0);[/B]
return 0;
}
The mddi_host_timer_service error in log dissapeared ... seems there are some problems is it stays in pmdh_clk_enable...
Tof37 said:
@mikeioannina
You should try this ...
in drivers/video/msm/mddi.c
in void pmdh_clk_enable() you've got
PHP:
if (mddi_host_timer.function)
mddi_host_timer_service(0);
In my .32 video drivers this if is in static int mddi_resume ...
Try to get the the above function like this :
PHP:
static int mddi_resume(struct platform_device *pdev)
{
mddi_host_type host_idx = MDDI_HOST_PRIM;
if (!mddi_is_in_suspend)
return 0;
mddi_is_in_suspend = 0;
if (mddi_power_locked)
return 0;
pmdh_clk_enable();
mddi_host_reg_out(PAD_CTL, mddi_pad_ctrl);
[B]if (mddi_host_timer.function)
mddi_host_timer_service(0);[/B]
return 0;
}
The mddi_host_timer_service error in log dissapeared ... seems there are some problems is it stays in pmdh_clk_enable...
Click to expand...
Click to collapse
that did nothing, still getting the same error...
mikeioannina said:
that did nothing, still getting the same error...
Click to expand...
Click to collapse
Have to solve a |kgsl_mh_intrcallback| axi read error interrupt: error in my kernel and will take a more attentive look to 3.4 video drivers .
Stay tuned
btw if you ever have a solution for my problem
Thanks
mikeioannina said:
Code:
[ 8.994812]
[ 8.995025] WARNING: at /home/mike/android/cm10.1/kernel/semc/msm7x30/kernel/mutex.c:198 __mutex_lock_slowpath+0x70/0x27c()
Click to expand...
Click to collapse
I'm going to just throw this out, is it possible that you are building a kernel for CM10.1 and booting it on CM11 ?

[Q&A] [DEV-only][WIP] ALSA BCM21553 Audio libs built from source - BroadcomCM

Q&A for [DEV-only][WIP] ALSA BCM21553 Audio libs built from source - BroadcomCM
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [DEV-only][WIP] ALSA BCM21553 Audio libs built from source - BroadcomCM. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Same Kernel but Cm 7 vs cm 9 have opposite Audio bug. Help?
Hi guys, just recently moved from Glass kernel modding and realized that my old Galaxy Y s5360 needed a fix. Ace and Y share same chipset so I'm writing to the most knowledgeable thread.
I see that you guys have got the BT a2dp working. I flashed bieltv rc4 kernel + cm 9.2 rc 5 and my bluetooth a2dp audio was fine but no mic / speaker working with normal phone call. Although phone music plays fine.
Also noticed that the ported ics rom from cm made phone slow + gms / vending didn't recognize device. So i decided to revert back to gingerbread using same kernel with customized hyperion 2015 rom.
With this the phone and all other audio fine + faster using gingerbread but the Bluetooth audio didn't work even after successful pairing with beats pill (thus worked before using cm 9.2).
So basically
cm 9 based ics rom works bt audio but not phone call.
Vs
CM 7 based gingerbread works phone and play service but not Bluetooth.
I understand that broad com stopped support and many devs moved to Alcatel-Lucent based libs and merged them.
Currently the rom I'm using is great except the bt audio. Which you guys have fixed in cm 9.
So my question is since both are running off biel last kernel, it would be possible to rewrite some of the cfg and libs on my current os to get it fully working (on gingerbread).
There are lots of threads and many git repo shared by all devs so basically I'm unclear which one had the right combo of libs.
I hope you can take few mins tui reply me back. I'm not a very active forum user but I am an experienced modder working for Google Glass QA Testing team, so hopefully if you can just show me the way i will be able to fix the rest without bothering you.
Thanks in advance
RK
 @AUGmedix
nvsetup said:
I've created this thread to join developers into the final audio fix for android 2.3.7. Although the prupose of this thread is to fix Audio on Android 4.0.4 we first need audio drivers source.
On all our based Android 2.3.7 ROMs we fixed audio using some AOSP Alcatel .so files (to remove Samsung lib dependency) and some Samsung .so libraries too, this is the whole list:
Our device uses ALSA audio system, which is also used on stock ROM. This is related to software more than hardware, although we are not planning at the momnt to "change" this audio way. To activate ALSA audio some changes need to be done on kernel, that samsung provide to us on their kernel sources. Mostly we need to enable ALSA on device .config file:
Code:
CONFIG_BRCM_SOUND_ALSA=y
CONFIG_BRCM_SOUND_ATHENA_ALSA=y
That's not an issue as prebuilt alsa libs work, so new libs should work too. Ramdisk needs some edit too, as ALSA audio system is stored on dev/snd, and this is well defined too on our ramdisk, ueventd.rc
Code:
/dev/snd/* 0660 system audio
We realised after that that actually CyanogenMod 7.2 Sources include ALSA lib sources, what we didn't know if those sources could work with our devices. This sources build the following libs, as releated to its Android.mk files:
We can found inside /android_hardware_alsa_sound/tree/gb-release-7.2"]hardware/sound_alsa the following sources to build
libaudio
libaudioflinguer
hw/alsa.default
hw/acoustics.default
On
libasound
And apart from that, some other audio libs such as libaudiopolicy are built inside framework/base repository, but they doesn't make any conflict. Other libs are included on Android source files.
To enable the build of those libs, using ALSA software instead af "Android default (not sure about that)". I've enabled on Boardconfig.mk the following configs:
Code:
# Audio
BOARD_USES_GENERIC_AUDIO := false
BOARD_USES_ALSA_AUDIO := true
BOARD_PREBUILT_LIBAUDIO := false # even not writted.
BUILD_WITH_ALSA_UTILS := true
This configs enable the building of those libs on their Android.mk files.
Also, I've added on device_cooperve.mk the following lines to build those hw modules releated to audio:
Code:
# Audio
PRODUCT_PACKAGES += \
alsa.default \
acoustics.default
After the build finished, and fixed some errors, AUDIO WAS WORKING, but not as expected. There were issues on Audio Routing:
Headphones are detected through system, but audio is not reproduced on headphones (speakers does)
When you make a call, sometimes you can't and phone freezes, or when you hangout the call, phone freezes.
Everything else apart from that seems to be working, even microphone, although this bugs are pretty weird, I took a look to logcat.
Code:
[COLOR="Gray"]D/AndroidRuntime( 1419): CheckJNI is OFF
I/ ( 1420): ServiceManager: 0xad50[/COLOR]
[COLOR="Red"]E/ALSALib ( 1420): external/alsa-lib/src/control/control.c:882:(snd_ctl_open_noupdate) Invalid CTL AndroidOut[/COLOR]
W/AudioHardwareALSA( 1420): Unable to attach mixer to device AndroidOut: No such file or directory
[COLOR="Red"]E/ALSALib ( 1420): external/alsa-lib/src/control/control.c:882:(snd_ctl_open_noupdate) Invalid CTL AndroidIn[/COLOR]
W/AudioHardwareALSA( 1420): Unable to attach mixer to device AndroidIn: No such file or directory
D/AudioHardwareALSA( 1420): openOutputStream called for devices: 0x00000002
D/ALSAModule( 1420): open called for devices 00000002 in mode 0...
I/ALSAModule( 1420): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
I/AudioHardwareALSA( 1420): buffer size (bytes) to AF = 16384
D/AudioFlinger( 1420): setParameters(): io 1, keyvalue routing=2, tid 1593, calling tid 1420
I/AudioFlinger( 1420): AudioFlinger's thread 0x1d978 ready to run
D/ALSAModule( 1420): route called for devices 00000002 in mode 0...
I managed to fix those errors (E/) by moddifying asound.conf, found on system/etc, adding this lines on the top and deleting old ones:
Code:
ctl.AndroidOut {
type hw
card 0 # Can replace with drivers name from /proc/asound/cards
}
ctl.AndroidIn {
type hw
card 0
}
Now logcat shows this at the moment
Code:
[COLOR="Gray"]D/AndroidRuntime( 1425): CheckJNI is OFF
I/ ( 1426): ServiceManager: 0xad50[/COLOR]
D/AudioHardwareALSA( 1426): openOutputStream called for devices: 0x00000002
D/ALSAModule( 1426): open called for devices 00000002 in mode 0...
I/ALSAModule( 1426): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
I/AudioHardwareALSA( 1426): buffer size (bytes) to AF = 16384
D/AudioFlinger( 1426): setParameters(): io 1, keyvalue routing=2, tid 1604, calling tid 1426
I/AudioFlinger( 1426): AudioFlinger's thread 0x1d960 ready to run
D/ALSAModule( 1426): route called for devices 00000002 in mode 0...
Actually that's the actual logcat, using headphones, and sound goes through speakers:
Code:
D/dalvikvm( 1926): GC_EXTERNAL_ALLOC freed 324K, 49% free 3317K/6471K, external 571K/579K, paused 58ms
V/HeadsetObserver( 1607): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=2, DEVPATH=/devices/virtual/switch/h2w, SEQNUM=1335, ACTION=change, SWITCH_NAME=h2w}
W/Vold ( 1415): Ignoring unknown switch 'h2w'
V/HeadsetObserver( 1607): Intent.ACTION_HEADSET_PLUG: state: 1 name: h2w mic: 0
I/HeadsetService( 1907): Headset plugged: true
I/Effect-DRC( 2115): Compression factor set to: 1.000000
I/Effect-BassBoost( 2115): New strength: 0
D/SurfaceFlinger( 1607): Layer[1c62e0] [2] non-RGB565 reloads
I/Effect-Equalizer( 2115): Setting band 2 to 0
I/Effect-Equalizer( 2115): Setting band 2 to 1
I/Effect-Equalizer( 2115): Setting band 2 to 2
I/Effect-Equalizer( 2115): Setting band 2 to 3
I/Effect-Equalizer( 2115): Setting band 2 to 4
I/Effect-Equalizer( 2115): Setting loudness correction reference to 100.000000 dB
D/AudioFlinger( 2115): setParameters(): io 1, keyvalue routing=8, tid 2117, calling tid 2115
D/ALSAModule( 2115): route called for devices 00000008 in mode 0...
D/ALSAModule( 2115): open called for devices 00000008 in mode 0...
I/ALSAModule( 2115): Initialized ALSA PLAYBACK device AndroidPlayback
D/dalvikvm( 1926): GC_EXTERNAL_ALLOC freed 323K, 49% free 3327K/6471K, external 571K/579K, paused 44ms
We must take a look if that is kernel relevant or not, as we really need this libs to work, to then start working on CyanogenMod 9.1 / Android 4.0.4 audio. Any suggestions are welcomed, although if they are from newbie or developer, don't want this thread to be spammed as others
Click to expand...
Click to collapse

Categories

Resources