[Q&A] [DEV-only][WIP] ALSA BCM21553 Audio libs built from source - BroadcomCM - Galaxy Ace S5830i Q&A, Help & Troubleshooting

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

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?

Paypal Here not working CM10

I am trying to get the Paypal Here mobile card reader working on my E4GT running CM10. I don't know if the problem is device specific or OS specific. Here is an excerpt from a logcat that shows the only errors I found:
I/dalvikvm( 4987): Could not find method com.bbpos.swiper.uploader.WavIO.convertToWav, referenced from method com.bbpos.swiper.SwiperRecorder.convertSoundFiles
W/dalvikvm( 4987): VFY: unable to resolve static method 3198: Lcom/bbpos/swiper/uploader/WavIO;.convertToWav (Ljava/lang/String;Ljava/lang/StringZ
D/dalvikvm( 4987): VFY: replacing opcode 0x71 at 0x0050
I/HeadsetService( 2731): Selected configuration: headset
I/AudioPolicyManager( 1804): getDeviceForInputSource()input source 1, device 00400000
W/AudioFlinger( 1804): findSuitableHwDev_l() loading well know audio hw modules
W/AudioFlinger( 1804): loadHwModule() module primary already loaded
W/AudioFlinger( 1804): loadHwModule() module a2dp already loaded
E/AudioFlinger( 1804): int android::load_audio_interface(char const*, audio_hw_device_t**) couldn't load audio hw module audio.usb (No such file or directory)
I/AudioFlinger( 1804): loadHwModule() error -2 loading module usb​
It looks like the device shows up as an audio device and converts the card swipes to audio. The app sees the device, but does not get any data from it. Anyone have any ideas?
Im having the same problem unfortunately
________________________________________________________________________________________________________________________
shaunneutron said:
I am trying to get the Paypal Here mobile card reader working on my E4GT running CM10. I don't know if the problem is device specific or OS specific. Here is an excerpt from a logcat that shows the only errors I found:
I/dalvikvm( 4987): Could not find method com.bbpos.swiper.uploader.WavIO.convertToWav, referenced from method com.bbpos.swiper.SwiperRecorder.convertSoundFiles
W/dalvikvm( 4987): VFY: unable to resolve static method 3198: Lcom/bbpos/swiper/uploader/WavIO;.convertToWav (Ljava/lang/String;Ljava/lang/StringZ
D/dalvikvm( 4987): VFY: replacing opcode 0x71 at 0x0050
I/HeadsetService( 2731): Selected configuration: headset
I/AudioPolicyManager( 1804): getDeviceForInputSource()input source 1, device 00400000
W/AudioFlinger( 1804): findSuitableHwDev_l() loading well know audio hw modules
W/AudioFlinger( 1804): loadHwModule() module primary already loaded
W/AudioFlinger( 1804): loadHwModule() module a2dp already loaded
E/AudioFlinger( 1804): int android::load_audio_interface(char const*, audio_hw_device_t**) couldn't load audio hw module audio.usb (No such file or directory)
I/AudioFlinger( 1804): loadHwModule() error -2 loading module usb​
It looks like the device shows up as an audio device and converts the card swipes to audio. The app sees the device, but does not get any data from it. Anyone have any ideas?
Click to expand...
Click to collapse
I am having the same problem on my T-mo Galaxy S II. Customer support said it could be because I am rooted or because I am on a custom Firmware. I am going to do the following:
1.) Flash to complete stock and test
2.) Root the stock Rom and test
3.) Try a TouchWiz Rom (if possible will try one that is rooted and one that is not)
Will post all results here with links to LogCats. If it appears to be a CM problem I will also be submitting a bug report.
BlackFang171 said:
I am having the same problem on my T-mo Galaxy S II. Customer support said it could be because I am rooted or because I am on a custom Firmware. I am going to do the following:
1.) Flash to complete stock and test
2.) Root the stock Rom and test
3.) Try a TouchWiz Rom (if possible will try one that is rooted and one that is not)
Will post all results here with links to LogCats. If it appears to be a CM problem I will also be submitting a bug report.
Click to expand...
Click to collapse
Well that is anti-climactic. It doesn't seem to work on stock Samsung ICS. Maybe I got a bad card reader? Maybe it is not compatible with the T-Mo GS II?

[WIP]Call Recording Mod for Sprint/T-Mo variants (and maybe others)

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.

[Q] Connecting USB Sound Device(esp. Microphone) to Android

Hello,
I hope that this is the right Forum section where I can ask my question. If it is the wrong place, I would be pleased if the Mods can place it in the right Forum.
So to my Problem now
I am trying for hours without any luck, so before I spend another day resolving the problem without solution, I am trying my luck here
I have an Android Device with rooted Omnirom kitkat that have no internal microphone built in. So I was hoping to connect any sort of usb microphone as default android audio input device that can be used for google voice for example.
I connected a Logitech webcam that has a built in microphone.
The usb audio device of the webcam get well recognized by the OS:
Code:
cat /proc/asound/cards
gives me
Code:
0 [SMDKI2S ]: SMDK-I2S - SMDK-I2S
SMDK-I2S
1 [U0x46d0x819 ]: USB-Audio - USB Device 0x46d:0x819
USB Device 0x46d:0x819 at usb-s5pv210-1.2, high speed
So the hardware device I would like to use, has the number 1 and it's name is U0x46d0x819.
Code:
cat /proc/asound/devices
gives me
Code:
0: [ 0] : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
32: [ 1] : control
33: : timer
56: [ 1- 0]: digital audio capture
So the mic is also detected as digital audio capture.
When I connect the webcam I get in /proc/asound/card1/ the following entries:
id
stream0
usbbus
usbid
usbmixer
usbmixer has the following content (some sort of controls):
Code:
USB Mixer: usb_id=0x046d0819, ctrlif=2, ctlerr=0
Card: USB Device 0x46d:0x819 at usb-s5pv210-1.2, high speed
Unit: 5
Control: name="Mic Capture Volume", index=0
Info: id=5, control=2, cmask=0x0, channels=1, type="S16"
Volume: min=768, max=6912, dBmin=300, dBmax=2700
Unit: 5
Control: name="Mic Capture Switch", index=0
Info: id=5, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
When connecting the Webcam I get under /dev/snd/ two new devices:
controlC1 and pcmC1D0c
When I try the mic with this app (link) where I can choose the usb audio device to test it, I get cristal clear recording! So it is working from the hardware point of view.
My issue now is how can I get that sound device configured to be the default mic for all apps in android?
I've read that it has to do with asound.conf or audio_policy.conf files in /system/etc, but I have absolutly no idea how they can be configured correctly.
May be it is a very basic question for all the modders and dev gurus out there, so thanks for any help for taking time pointing me to the right direction.:good:
Did you ever get this to work?
I have the same issue.
I created the /system/etc/asound.conf but the Android 4.4-r3 seems to be ignoring the config file.

[CM13] ALSA instead of tinyALSA

Hey guys
I already asked this in some way over at Zenfone 2 sub forum but it might be better to post it here since it could be more CM-related than phone related.
At work we're developing an app which requires an x86 based processor to function properly. But we also need to use ALSA instead of tinyALSA related to various startup scripts required for that mentioned application and the application itself. Rewrite the whole parser is out of question due to the amount of work involved to port it over ARM platform.
Anyway we digged through the mixer settings of tinyALSA and came to the conclusion that it's not suitable for our app.
Currently I'm using the CyanogenMod 13 source code with ALSA lib and ALSA utils packages from Android x86 project (the Marshmallow-one of course). The build process is all fine and the binaries are usable inside an ADB shell but I'm not really able to use aplay for recording or playback of audio files.
Right now I'm stuck with the following error:
Code:
aplay: pcm_write:1684: write error: I/O error
I used "alsa_aplay /sdcard/Front_Center.wav -D hw:0,5 " to test the audio playback.
Some other problems occur when I want to use "alsa_ctl init", alsa_amixer can't load default mixer settings, "alsa_aplay -L" results in "NULL" output and so on.
Any suggestions on how to get audio capabilities working with true ALSA?
By the way: Our Zenfone 2 uses an Intel Atom Z3560 processor with rt5647-audio codec.

Categories

Resources