yashsingh1/xdaforums huggingface dataset:
[Samsung Captivate Glide] amppcguru:
Thanks for the tips. Tried them with the new Pacrom but it still crashes the dialer with a clean wipe & install & fresh download from playstore of skype & the new fix. Will 2try with others later.

Edit:

Just tried it with CM10.1 & it doesnt crash my contacts/dialer! :)

Gonna redo pacrom & see how it goes...

Edit2:

Just redid clean install of new jb4.2.2 pacrom with your tips & is now fully functional! :)

Edit3:

Also Since installing the Skype fix i've noticed that when i pair my bluetooth speakers & the phone says it's connect yet when i try to play some music it still comes out of the phone & not the connected speakers. I use PowerAmp which has output options & it says its also going to speakers but isn't & still coming out of the phone. Very weird... :confused:

Sent from my Rooted Samsung SGH-i927 Captivate Glide

Running [MENTION=559414]ndroid[/MENTION] JB 4.2. 2 CM10.1 & TWRP 2.4.4.0 using xda-dev app.
[Samsung Captivate Glide] Adam77Root:
So I have repacked audio libs from stock ICS and it seems to be working quite well. It needs to be adapted to your frameworks, so I have also posted the method and all the patches that have been used. spyke555 or anyone having the build environment set up can come up with a package that includes the fixes.

Link: http://xdaforums.com/showpost.php?p=40762738&postcount=317
[Samsung Captivate Glide] davidpartay:
You might just be my hero :P (along with all the other devs of course!)
[Samsung Captivate Glide] kick buttowski:
Thanks for that, I've been trying to use the external sources that samsung provided for ICS and yours but it fails trying to find glib.h but I know it's there and it should work but perhaps I'm missing something.

Have you seen this before ?

external/bluetooth/bluez/src/dbus-common.c:39:18: fatal error: glib.h: No such file or directory
compilation terminated.
make: *** [/home/marcelo/android/out/target/product/i927/obj/SHARED_LIBRARIES/libbluetoothd_intermediates/dbus-common.o] Error 1
make: *** Waiting for unfinished jobs....
external/bluetooth/bluez/src/agent.c:38:18: fatal error: glib.h: No such file or directory
compilation terminated.
make: *** [/home/marcelo/android/out/target/product/i927/obj/SHARED_LIBRARIES/libbluetoothd_intermediates/agent.o] Error 1
external/bluetooth/bluez/src/adapter.c:45:18: fatal error: glib.h: No such file or directory
compilation terminated.
make: *** [/home/marcelo/android/out/target/product/i927/obj/SHARED_LIBRARIES/libbluetoothd_intermediates/adapter.o] Error 1
external/bluetooth/bluez/src/android_bluez.c: In function 'write_flush_timeout':
external/bluetooth/bluez/src/android_bluez.c:72:9: warning: implicit declaration of function 'error' [-Wimplicit-function-declaration]
[Samsung Captivate Glide] bubor:
Welcome with my world, I spent 3 days, but build was crash on my phone.

You must write /build/core/pathmap.mk in pathmap_INCL :=

I hope it helps.
[Samsung Captivate Glide] spyke555:
Thanks Adam77Root!

If I understand right though there is a work around needed for calls where by we need to switch to speaker first and then back to ear piece otherwise there is no sound right? Or is that just in Skype calls?

Also would those additional libs normally come out of the proprietary blobs? Just trying to see how I add this stuff to my ROM build tree...

Thanks!

---------- Post added at 11:12 PM ---------- Previous post was at 10:46 PM ----------

One additional question on this:

- In looking to apply the patch you suggested I've found that this is under the framework folder in the CM10.1 tree. Do you typically make changes directly in there or do you move that stuff to the devices folder and make the change there. I know it's probably a noob question but want to avoid corrupting my CM10.1 tree here...

Thanks!

--- EDIT -------

On that second question, I've moved the files to the device tree under the pre-built folder to keep the vendor tree clean as well. Not sure if that's the right way to do it but oh well... At least others using my tree might benefit! ;)
[Samsung Captivate Glide] Adam77Root:
The manual workaround only applies to normal calls. Skype works fine.

They are all proprietary libs, taken from stock ICS so they fit well into vendor files.

I don't always modify the source, but when it's needed, I do. In this case, changes need to be done to libaudioflinger and libmedia which are core parts of the system. That's why I chose this way.

It would also be a good move to only include the Phone and framework-res patches in the system. It would not cause any issues with open source libaudio and users could decide if they wanted to flash the additional libs for Skype on the cost of manual workaround in voice calls. (The stock libs package should be repacked accordingly of course.)
[Samsung Captivate Glide] spyke555:
Thanks for the clarification Adam77Root!

Agreed that the vendor folder is the right place for these files, learning as I go here!

I've got everything setup and building a ROM with this all included to try this out myself. The only thing I'm not sure of is that left alone the system does build an audio_policy.n1.so and an audio.primary.n1.so file. I take it these need to be replaced by the ones you provided. Will try it out both ways to see.

Thanks a ton for sharing this and I'll let you know how I make out!
[Samsung Captivate Glide] Adam77Root:
I've reimplemented the whole audio HAL based on Galaxy S2's TinyALSA-Audio. It seems to be very stable and bugless atm.

See here: http://xdaforums.com/showpost.php?p=41285108&postcount=340

Source will be up at GitHub as soon as I get enough feedback.
[Samsung Captivate Glide] xtacb4:
Testing it with spyke555's M2 CM10.1, so far, so good.
[Samsung Captivate Glide] Adam77Root:
Only one bug has been reported so far: Camcorder has very low sound. Already fixed it, will be uploaded with the source.
[Samsung Captivate Glide] lorddavid:
Just a noob question. With that fix, doesnt need the workaround? and will work with all? (skype, magicjack, viber, etc)
[Samsung Captivate Glide] Adam77Root:
It doesn't need the workaround. Skype works, I tested. Other applications had the same bug, so they have to work too.

Sent from my CM10.1-powered GT-I9103
[Samsung Captivate Glide] jzamoras:
does bt headset has been fixed also?
[Samsung Captivate Glide] santimaster2000:
Thanks Adam !!! You're just awesome !!!
[Samsung Captivate Glide] brunobbarcelos:
BT headset working will be the best news since leaked ICS.
[Samsung Captivate Glide] soadzoor:
I've just flashed it. Regular cell calls don't work since :\ there is no sound on either end of the phone line
[Samsung Captivate Glide] salary:
are u sure ?

xtacb4:

Testing it with spyke555's M2 CM10.1, so far, so good.

ThanksThanks

edited : after test in pac 22.1

Regular cell calls don't work
[Samsung Captivate Glide] soadzoor:
Yea, I'm pretty sure.. I use spyke's cm10.1 build from 20130414 with kickass stock kernel. I dont know if it's m2 or m3, but after flashing that zip, cell calls stop working. Both phones become deaf. Tried downloading/flashing it twice to be sure
[Samsung Captivate Glide] bubor:
Regular phone works sometimes, but now I dont have sound in or output.I tried to on speaker, then off, mute mic and unmute, but nothing helped.

I attached logcat.
[Samsung Captivate Glide] santimaster2000:
I think your problems may be related to kickass kernel, but I'm not sure, bubor, what kernel are you using ? Another thing, I talked with xtacb4 over Skype Yesterday, and he told me he's running the patch with no issues so far, but, don't forget he's still running M2 build, not M3 that is the latest, but, again, I think your problem it's related to the fact that you're not using the stock kernel, there for, you don't have the same config adam had when he first implemented this patch.
[Samsung Captivate Glide] bubor:
nop, its litekernel 0414
[Samsung Captivate Glide] gkri:
Regular Phone Calls = NO AUDIO, Skype Works perfect

Just tested on new PAC Flash.

Skype Works Perfect.

Regular Phone Calls NO AUDIO, audio is death on both sides.
[Samsung Captivate Glide] Adam77Root:
Does the a Glide use TTY modes? It's not implemented in this libaudio.

Sent from my CM10.1-powered GT-I9103
[Samsung Captivate Glide] soadzoor:
how can I check that?
[Samsung Captivate Glide] xtacb4:
Warning, found some bugs?

Adamn! I found some strange (broken) beheavior, it could even be called bug.

- Skype works terrific!, but, if I make a regular phone call, I have no audio at all, and on the other side they cannot hear me. Now, if they call me, so far 5 out of five, it did work both ways the audio like a charm, but only if they call me.

- Switching to speaker while connected half of the times it makes outputs some noise from the person on the other side, but it is for less than a half a sec, just an instant and then it is gone, complete silence.

Basically I cannot place outgoing calls, BUT, I can call my phone operator at *611 (Claro Argentina) and works everytime, but does not work with landline or another cellphone.

- Once I "bug" the audio by placing an outgoing call, two beheaviors arise

1 - No notification sounds, I get emails for example but the ringtone does not play, nothing.

2 - I have poweramp as mp3-etc player, if I play some mp3, there is no audio on the external speaker either, and the progress bar skips/jumps regularly, like if the cpu was decoding the mp3 as fast as it can and the gui updates of the progress bar lags a bit behind.

Both this issues are solved restarting the phone. Also, if I play some music via BT, when I disconnect and turn off bluetooth the same thing seems to happend, but I can turn on BT again and pair it to my headseat and listen music normaly.

Remember, I'm sill with CM10.1 M2 (M3 was unstable for me). I tried cleaning cache an dalvik cache, but this issues persists.

Is there anything I can to to be more help, logcat or something? Let me know please.

Thank you!

Edit: sorry for the broken "engrish" I know I accidently more than one word.
[Samsung Captivate Glide] yohan4ws:
xtac, great troubleshooting!!

yes, definitely post a logcat... if you can show it when you successfully place a call and receive a call, should be great.

I haven't had a chance to play with this yet... though I'm thinking if there's a patch and unpatch we can switch between being able to skype and back to normal audio after a quickreboot vs. full rom dump ....

I haven't had time to do anything and am feeling left out of contributing :( .. sorry guys.. real life prevails.
[Samsung Captivate Glide] xtacb4:
well... sh*it

Please take a look at the logcat, some nasty thing is going on...

Also, Im not sure if im using catlog correctly (default settings).

Sample of 2013-05-13-22-27-45.zip (audio not working)

05-13 22:27:21.113 D/TinyALSA-Audio Output(114): audio_out_get_latency(0x4123eda8)
05-13 22:27:21.123 D/TinyALSA-Audio Output(114): audio_out_get_latency(0x4123eda8)
05-13 22:27:21.123 D/TinyALSA-Audio Output(114): audio_out_get_latency(0x4123eda8)
05-13 22:27:21.123 D/TinyALSA-Audio Output(114): audio_out_get_latency(0x4123eda8)

Not even the DTMF tones on the phone are played when I tried dialing. I see not need at this moment to try to place a call being that the logcat is complety full of this, see the duration of the logcat and the size of it!!!

- audio working 2013-05-13-22-38-34.zip

What I did here was:

- Call *611, hear audio, put it on speaker, turn off speaker, hang up.

- Play some mp3 with poweramp, next track a couple of times, skip inside the track to some position, then stop.

Have fun, I do not know what to make of all the alsa lines ( I remember from my linux days alsa was a sound-driver something platform).
[Samsung Captivate Glide] yohan4ws:
ya alsa is the sound kernel so to speak... there must be a single operation that changes how the latency reports .. or alsa is crashing.. ill have a dig into the logs here now
[Samsung Captivate Glide] xtacb4:
Any progress?

edit:

Didn't want to double post, but I insist in asking [MENTION=4913608]yohan4ws[/MENTION] if there is any news on this issue?
[Samsung Captivate Glide] yohan4ws:
hey sorry been pretty slammed with real life stuffs..... scrolling through these logs sucks..

there's a lot going on here and hard to decipher what is and isn't working as I haven't looked at other logs from a working build to compare.. We should hitup Adam77root and ask him if he can show us a logcat of items that ARE working from his build.

Things like this ::

05-13 22:38:51.794 I/ActivityManager( 422): START u0 {act=android.intent.action.MAIN flg=0x10840000 cmp=com.android.phone/.InCallScreen} from pid 674

05-13 22:38:51.814 D/TinyALSA-Audio Hardware( 114): audio_hw_set_parameters(0x40ba1c70, dualmic_enabled=false)++

05-13 22:38:51.814 D/TinyALSA-Audio Hardware( 114): audio_hw_set_parameters(0x40ba1c70, dualmic_enabled=false)-- (PARAMETER ERROR)

An error in setting the audio_hw for dualmic, not sure if this is supposd to mean full duplex (microphone and sound on at the same time) which could point to another piece of code besides latency.

for bluetooth . I see these lines here :

E/BluetoothPhoneService( 674): Could not get a handle on Connection object for the call

05-13 22:38:52.144

05-13 22:38:52.144

05-13 22:38:52.174 E/BluetoothPhoneService( 674): Could not get a handle on Connection object for the call

05-13 22:38:52.174 D/InCallScreen( 674): onNewIntent: intent = Intent { act=android.intent.action.MAIN flg=0x10c40000 cmp=com.android.phone/.InCallScreen }, phone state = OFFHOOK

Looks as though the changing of the speaker to receiver works in this part

D/InCallScreen( 674): toggleSpeaker(): newSpeakerState = false

05-13 22:39:07.484 D/TinyALSA-Audio Output( 114): audio_out_set_parameters(0x40ba1ea8, routing=1)

05-13 22:39:07.484 D/TinyALSA-Audio Mixer( 114): tinyalsa_mixer_set_device(1)

05-13 22:39:07.484 D/TinyALSA-Audio Mixer( 114): tinyalsa_mixer_set_route(card=0,device=1)++

05-13 22:39:07.484 D/TinyALSA-Audio Mixer( 114): Setting Playback Path to RCV

What has my attention is audio_out_set_parameters 0x40ba1ea8.. I dont know what these parameters are ... I remember looking at the libaudio code (and couldn't make sense of it) there is a bunch of settings and it actually shows the sound latency rates .. I wonder if we changed them all to 44khz and then did a compile if it would work ... it would mess up other things by using a static latency im sure but it may be worth a go.
[Samsung Captivate Glide] yohan4ws:
K for the above post that was all from the audio working log cat..

for the non-working what did you do ? its just a string of getting audio latency values that points to a different hex address than the working ...

When you say audio was working, is this via a bluetooth adapter? There are items in that log that show Skype was using speaker as well.
[Samsung Captivate Glide] xtacb4:
Hi, sorry the late reply, lotta stuff going on in my life right now (incl. work).

Nothing basically, eventually with time it breaks, and I cannot get audio placing a phone call, mp3 player does not play audio, etc. I mean, I cannot specify what steps breaks the audio, I just let it be for a shorte while and then, bam! not working, have to rebooto to make it work.

FYI, I reverted to a working backup I had.

I reffer to audio working, as oposite as the non working audio, no BT was used, I used the external speaker with skype, and phone call.

Your post before this one is a total brain**** for me, my profile is IT support/sysadmin, not programmer :p

Cheers.
[Samsung Captivate Glide] yohan4ws:
I'm a sys admin too ... think about the logs as the event viewer, and the actions of the applications are pointing to options in the registry but not a setting we can change in the app. conf files really is all the source looks at if you goto github and lookup the source code.

What needs to happen right now for further troubleshooting::

Logcat needed of the most current working PACROM May 21. Why this build? because its assumed bluetooth/skype is fixed.

A phone call to landline being connected, then hangup.

Then : a logcat of a call made to a mobile line, then hangup.

Then: a logcat of a call being made via skype, then hangup.

Then: a logcat of a call being made to a landline with a bluetooth headset connected.

Anybody want to volunteer ???

The above needs to be repeated with a working ICS build, and with the PACRom from 1 version prior to the 21st that bluetooth is *NOT* fixed.

The audio patch putting out to speakers isn't going to help us, unfortunately, as there is no radio in that code for headset speaker (those are the libs from galaxy tab).

All of these logs need to be cross referenced to help isolate the issue .... :( bit f'n pain in the arse requires nandroid backups and install of other roms.. probably a couple hours of time messing with it.

If we could see a working logcat of all of the above from Galaxy R we could skip the ICS.
[Samsung Captivate Glide] thescot33:
I can do some logging...alogcat from market fine...any settings need changed? Should be able to get done over the next couple days if someone else doesn't

PeACe

KB_JB PAC-man 22.2.0
[Samsung Captivate Glide] m1batt1:
I'll see what I can do as far as that whole mess goes too. It'll probably be late Thursday night before I can do so but still I'll try.
[Samsung Captivate Glide] paganinia:
In the attached are logcats for ROMs I927UCLG9_OneClick and i927_PAC_JB_4.2.2-v22.3.0_20130518-215201. I could not get a USB connection working for the May 21st build.
[Samsung Captivate Glide] Adam77Root:
Looking at radio logs may also help as you have issues only with mobile calls.

Sent from my CM10.1-powered GT-I9103
[Samsung Captivate Glide] soadzoor:
what the heck could this issue be?

btw I just tested voip (internet) call via sip.freevoipdeal.com, it has the same issue as skype and the others.. that low-rated distorted voice stuff..
[Samsung Captivate Glide] thescot33:
Sorry KiCK, obessed with latest Dirty Heads album...I'll get those cats done this weekend, no take backs! PeACe

KB_JB PAC-man 22.2.0
[Samsung Captivate Glide] yohan4ws:
These logs are extremely long.... What did you do in each of them ? how long were you logging for ? And what method of obtaining the logs did you take ?
[Samsung Captivate Glide] paganinia:
I used:http://xdaforums.com/showthread.php?t=1747544

None of those could have been longer than a minute, after starting capture I pushed the phone icon, dialed, let it connect, hung up, and ended the capture.

If you have explicit instructions for a cleaner way to do it, I can follow while redo-ing.
[Samsung Captivate Glide] xtacb4:
FYI, I used CatLog when I did mine. Perhaps this method produces different outputs by default?
[Samsung Captivate Glide] thescot33:
As far as I know the 'Log' which the program is reading something already there...just make sure to use a clear log or whatever before you start your test

I use alogcat from the market and Kick seems sat with the records

PeACe

KB_JB PAC-man 22.2.0
[Samsung Captivate Glide] trevd:
[MENTION=3605868]tonyp[/MENTION] Thanks for that, Nice to see folks being proactive about stuff very community spirited and obviously kudos all round. Also Framework base and settings seem to be available in the gitorious sources now.

I'm doing some hacking of my own around this area. I want a phone to pair to an N7 and the N7 control the dialling answer etc and also act as the speaker and Microphone. So basically the Phone is just providing the radio services. :D

I've got the microphone routing working so and the rest seems fairly easy to do on 4.1 far but it seems google have cooked bluedroid just enough for their implementation to work which Is understandable. I also read that Headset Profile is not properly supported on bluedroid ( yet ). Obviously the project is very fluid and I'd expect to see a trickle of what's really being done to get pushed into the AOSP tree.

If I'm going to nit pick ( and I am ;) ) I'd say the Bluez reimplementation has been sledgehammered back in, again understandable giving that It probably wasn't meant for public consumption. I think I'm going to have a go at seeing If I can get the two ( bluez / bluedroid ) to live together a bit better failing that at least a patchset that works with the master branches would be useful for folks I think. I don't like having to compile certain branches to get specific features, not on a fluid project like android anyway

If have any insights regarding audio qualities etc I'll be sure to share them here and elsewhere.
[Samsung Captivate Glide] soadzoor:
heads up!

After hours of testing, I could say that radio calls DO work sometimes.. just as much as calls to landlines! Yea, I managed to call another cell phone and have voice on both phones (I tried many many times (30 or so.. and since the first time it had sound it's about 50% that we hear each other) ) ! and also on landlines, but when I called it again, it was as deaf as the calls to the radio ones (sometimes).

So I'm absolutely sure the issue is NOT related whether you call a cell phone or a landline, and also not related wheter you call someone, or you're the receiver. It's just the case that sometimes it work, and sometimes (probably more often) it doesn't.

I attach two logcat files, the first one was made during I managed to make an appropriate phonecall, the second one is with the "deaf phone call" issue.

If someone of you is an expert of logcats, it would be great to compare them.

I also tried calling with the latest galaxy R CM10.1 nightly (yes, it can be flashed to the cappy(with kickass kernel), but don't do it, since there are much more things that doesn't work than the ones that do.). Calls seemed to be OK, but I tried it only once or twice, and maybe I was "lucky" at that moment, so I'll try that again now and report.

if these informations are useful, remember to thank Adam77Root as well who helped me a lot with the tests

EDIT: So, I tested the calls again with the galaxy R nightly, it worked 10 times from 10 times, so I'm pretty sure, it works as it should be, and since tinyalsa is there, I'm pretty sure skype would work as well (I couldn't test, because on the cappy wifi doesn't work with the GSR rom)

Someone should merge the SGR rom into ours, so they should be more alike. every audiolib and everything related to calls should be copied from the SGR nightly into our cm10.1 and I'm pretty sure it'll work!

EDIT2: My bro managed to write a script to filter those long logcat files. The first one contains every line that's not in the second (but nothing more), and vica-versa.

I'm no expert, so it might be nothing important, but this line has drawn my attention (it can be found in the first logcat where call didnt work well, but not in the second, where it was good)

"E/TinyALSA-Audio Mixer( 112): Unable to find a matching ctrl with attr: voice-volume"

I think it has something to do with our issue.
[Samsung Captivate Glide] yohan4ws:
Are you telling me that the Galaxy R will work minus wifi ? ...

because if thats the case, its very easy to download the sgr source fix wifi and compile a working rom for our phones....
[Samsung Captivate Glide] tonyp:
[MENTION=4179234]trevd[/MENTION]: Great to hear :)

I totally agree, it would be great to be able to switch between the bluetooth stacks more easily.

You could have a look at the androidarmv6 team - they worked on sth like that:

https://github.com/androidarmv6

http://review.androidarmv6.org/

By adding BOARD_HAVE_BLUETOOTH_BLUEZ := true to the BoardConfig you'll build for bluez. Perfect design if you ask me.

See e.g. here.

I'm not sure what's the state there currently - the last time I checked their sources (before niko released his bluez work at gitorious) weren't fully working, yet.

Seems to have further evolved since then, though.

If you make any progress feel free to hit me up via PM :)
[Samsung Captivate Glide] trevd:
[MENTION=3605868]tonyp[/MENTION] You sir, are the gift that keeps on giving LOL. I'd not thought that far ahead yet, I need to look into it further but at first glance that's the "droid" we're looking for.

Thanks again mate!

EDIT: Actually I had thought that far ahead .... I was contemplating the feasibility of bluez being just another bt vendor library in the bluedroid setup!