yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] pengus77:
About bluetooth, just found a similar issue reported on the HTC One X forums (http://xdaforums.com/showpost.php?p=38647415&postcount=11481). Similar as in same log output, probably not in the result. But both our logs and his log show that there's a buffer overload that after a few starts exploding (our log follows)

...
03-07 19:54:21.230 W/bt-btif ( 834): btif_media_aa_prep_2_send congestion buf count 25
03-07 19:54:21.230 W/bt-btif ( 834): btif_media_aa_prep_2_send congestion buf count 24
03-07 19:54:21.230 E/GKI_LINUX( 834): ##### ERROR : timer_thread: tick delayed > 5 slots (-547249208,-50000000) -- cpu overload ? #####
03-07 19:54:21.230 E/GKI_LINUX( 834): ##### ERROR : timer_thread: tick delayed > 5 slots (-538364208,-50000000) -- cpu overload ? #####
03-07 19:54:21.230 E/GKI_LINUX( 834): ##### ERROR : timer_thread: tick delayed > 5 slots (-529468208,-50000000) -- cpu overload ? #####
03-07 19:54:21.230 W/bt-btif ( 834): btif_media_aa_prep_2_send congestion buf count 25
03-07 19:54:21.230 E/GKI_LINUX( 834): ##### ERROR : timer_thread: tick delayed > 5 slots (-520578208,-50000000) -- cpu overload ? #####
03-07 19:54:21.230 W/bt-btif ( 834): btif_media_aa_prep_2_send congestion buf count 24
03-07 19:54:21.240 E/GKI_LINUX( 834): ##### ERROR : timer_thread: tick delayed > 5 slots (-511690208,-50000000) -- cpu overload ? #####
03-07 19:54:21.240 W/bt-btif ( 834): btif_media_aa_prep_2_send congestion buf count 25
03-07 19:54:21.240 E/GKI_LINUX( 834): ##### ERROR : timer_thread: tick delayed > 5 slots (-502803208,-50000000) -- cpu overload ? #####
03-07 19:54:21.240 W/bt-btif ( 834): btif_media_aa_prep_2_send congestion buf count 24
...

Of course this leads to faster / slower output (in any case inconsistent). Now, the interesting report from that guy on the One X forum is that bt works fine when wifi is off, and doesn't when it's in COEX mode. Anyone that is able to reproduce the problem, please, can you log an a2dp streaming session with wifi on and one with wifi off ? I need to see if there are different outputs and i'm not on 10.1 at the moment. Probably later today or in the weekend i'll setup dual boot so i can test first hand.
[LG Optimus 2x] amardeepsingh77:
Pengus, I cam confirm that BT without wifi works the same way. I pair my phone for music streaming in my car and it's the same accelerated streaming.
[LG Optimus 2x] defcomg:
About the hdmi this is also an issue on the P920 what i think lg did here was set the natural orientation in surface flinger to landscape 90 then countered it to 0 when using auto sensor while on cm10+ its @ 0 the hdmi output only reads the default orientation
[LG Optimus 2x] pengus77:
Something like that. I managed to have portrait hdmi work correctly changing only a bit of rom code in surface flinger, but the rotation to full landscape mode is achievable only using private methods from the blobs or, as i'm attempting to do, by hijacking the hdmi output and sensor orientation directly in the kernel at the framebuffer level.
[LG Optimus 2x] defcomg:
from my understanding its surface flinger -> hwc -> framebuffer

in my case the current output is 648x1080 if i were to make changes @ kernel level would it not result in 1080x648 not 1920x1080? do you guys use ida pro to check lib exports?
[LG Optimus 2x] pengus77:
I'm waiting to get my hands on the hex-ray arm decompiler... soon :)

Anyway this is the base init of the hdmi fb in kernel world

static struct tegra_fb_data star_hdmi_fb_data = {
#ifdef CONFIG_MACH_STAR
.win	= 0,
.xres	= 1366,
.yres	= 768,
.bits_per_pixel	= 16,
#else
.win	= 0,
.xres	= 800,
.yres	= 480,
.bits_per_pixel	= 32,
#endif
.flags	= TEGRA_FB_FLIP_ON_PROBE,
};

In fact on boot it's correctly set, then it rotates when surfaceflibger/hwc takes control and never get back to the right mode.

Moreover in the drivers/video/tegra/dc/hdmi.c source file we can see that both 720p and 1080p resolutions are supported by the driver, together with 480p and 576p modes.

As soon as i'll get hex-rays i'll decompile the ics surfaceflinger lib and try to see what externals it calls for panel setup / rotation. I guess it'll happen somewhere next week.
[LG Optimus 2x] tonyp:
Guys please do not push this thread without reason - so no "thank you" posts, no "good luck" posts and stuff like that.

Each post in here should have a valid reason (read: should be development related).

Read the instructions of the developer discussion section first.

Thank you :)
[LG Optimus 2x] defcomg:
Further investigation into surfaceFlinger from ics from 2x + p920

Shows ics had this

.text:00021880 loc_21880 ; CODE XREF: android::SurfaceFlinger::setOrientation(int,int,uint)+24j
.text:00021880 MOVS R1, #1
.text:00021882 STRB.W R7, [R4,#0x6D]
.text:00021886 STRB.W R5, [R4,#0x6C]
.text:0002188A MOV R0, R4
.text:0002188C BL _ZN7android14SurfaceFlinger19setTransactionFlagsEj ; android::SurfaceFlinger::setTransactionFlags(uint)
.text:00021890 ADD.W R0, R4, #0x74 ; cond
.text:00021894 MOV R1, R6 ; mutex
.text:00021896 BLX pthread_cond_wait
.text:0002189A
.text:0002189A loc_2189A ; CODE XREF: android::SurfaceFlinger::setOrientation(int,int,uint)+2Aj
.text:0002189A ; android::SurfaceFlinger::setOrientation(int,int,uint)+64j
.text:0002189A MOV R0, R6 ; mutex
.text:0002189C BLX pthread_mutex_unlock
.text:000218A0
.text:000218A0 loc_218A0 ; CODE XREF: android::SurfaceFlinger::setOrientation(int,int,uint)+12j
.text:000218A0 MOV R0, R5
.text:000218A2 POP.W {R4-R8,PC}
.text:000218A6 ; ---------------------------------------------------------------------------
.text:000218A6
.text:000218A6 loc_218A6 ; CODE XREF: android::SurfaceFlinger::setOrientation(int,int,uint)+Cj
.text:000218A6 ADD.W R6, R0, #0x54
.text:000218AA MOV R0, R6 ; mutex
.text:000218AC BLX pthread_mutex_lock
.text:000218B0 LDRB.W R0, [R4,#0x6C]
.text:000218B4 CMP R0, R5
.text:000218B6 BNE loc_21868
.text:000218B8 B loc_2189A
.text:000218B8 ; End of function android::SurfaceFlinger::setOrientation(int,int,uint)

setOrientation(int,int,uint)

public static native void setOrientation(int display, int orientation, int flags);

think they excluded the method for hdmi from being called from the framework but just ran it from with in the lib

all they would have needed was the orientation value coming from display 0x0 and sent it to display 0x1 ie hdmi

jellybean is using nativeSetDisplayOrientation(IIII)V with the addition of parameter "externalRotation"

by the way getExternalRotation in Display.java is set to 0x0 i don't if CM10 CM10.1 etc knows what todo with "externalRotation" on our devices
[LG Optimus 2x] tonyp:
Could someone on the newbl who has problems with bluetooth fast-forwarding-sound please try this build:

http://tonyp.hopto.org/temp/cm-10.1-20130311-UNOFFICIAL-p990.zip

My headset doesn't have any problems whatsoever - neither with official CM sources nor with this build, so I need to wait for testers.

Attach a kernel log + logcat as well please.

Oh and of course one of the most annoying bugs:

After unlocking the brightness often gets reset to a way too low value.

Logcat and kernel log don't show any error.

arcee already tried to fix it some time ago (see here) but this didn't fix it fully.

I guess we can workaround it in here:

https://github.com/CyanogenMod/lge-kernel-star/blob/cm-10.1/drivers/video/backlight/aat2870.c
[LG Optimus 2x] wfd:
Got this bug immideatly with this rom.

dmesg: http://pastebin.com/F0rTb6fR

logcat: http://pastebin.com/08h2bJBW

BT headset: Jabra BT3030
[LG Optimus 2x] chp2:
Here is mine. Hope it help.
[LG Optimus 2x] chp2:
Does the provided logs help a bit?

Are they sufficient or do you need more?
[LG Optimus 2x] pengus77:
I finally compiled and flashed a clean 10.1 on my phone. I'm currently working on fixing both bluetooth media and the low I/O. What i found out so far:

- I/O is perfectly fine on ext4 filesystems (system / data / cache) but slow to a crawl on the sdcards (internal and external both). This is most probably a rom-related problem because testing the speed from a shell results in perfectly fine speeds. I'm looking into a fix.

- Bluetooth media is a mess. We're not the only ones facing this problem and it's not related to CM. I've found on google references to the same error on both CM and AOSP. I'm starting to think this one will be messy to fix and i'm following closely the AOSP git activity related to bt and audio.
[LG Optimus 2x] chp2:
Yeepeee....

Pingus, I have no doubt you'll find the bugs.

(you're the best hehe)

Question : is it possible to use JB 4.1.2 BT subroutines here?
[LG Optimus 2x] tonyp:
Google changed from bluez to bluedroid in Android 4.2. It would be possible to revert that but it would be extremely messy and is only the last resort.
[LG Optimus 2x] darkcastleking:
I understand that you don't want to revert bluedroid to Bluez but I found this when searching on Google where someone has already tried to do so. I'm not a dev so don't know if it was successful.
[LG Optimus 2x] tonyp:
Thank you very much for this, I will check out these instructions on Monday/Tuesday and do another testbuild! :)

Edit: Oh no, had a quick look, as you can see in the activity stream he deleted a couple repos in january which are linked in the manifest.

Additionally I'll try to revert the Wifi Hotspot changes. It would be better to write a new Interface for the Wifi Hotspot, but I don't really know how to do so.

Both approaches can't be submitted to Gerrit unfortunately, but as long as it works it would be nice.

Hopefully arcee will gain interest into the 2x again some day - I'm pretty sure he can easily fix that stuff, as he knows the Android Source and overall background really well.
[LG Optimus 2x] tonyp:
Okay, I forwardported the 4.1 netd to the 4.2 branch today, but it doesn't seem to work.

Source: here and here.
[LG Optimus 2x] chp2:
It's a pity :crying:

As additionnal info, I use for my emulators a 3rd party software called "Sixaxis Controler" wich use BT to connect to my PS3 controler and it works fine on CM10.1.
[LG Optimus 2x] tonyp:
Okay, I committed a ****load of bluetooth patches and compiled a new (newbl) testbuild.

Works perfectly fine on my Nokia-BH504 headset while listening to mp3s - no speedsups whatsoever.

But this just means that my patches didn't break anything, as I never had any issues.

http://tonyp.hopto.org/temp/cm-10.1-20130323-UNOFFICIAL-p990.zip

Please give some feedback :)

If it doesn't work attach logcats again - and try to find out which A2DP profile your headset is using.

Mine is using 1.0 - pengus one (which suffers from the accellerations) has version 1.2, so it's possibly related to that.

Edit: I just got my first speedup - after listening for half an hour and pausing/resuming a couple times.

After a bluetooth disable+enable it works again for 10 minutes now. If this would be the case for everyone it would be pretty awesome!

Edit2: I think I can trigger it by pausing apollo for some time, then pressing play again.
[LG Optimus 2x] amardeepsingh77:
Hi tonyp, i dont use apollo music player and instead use google player. I also freeze apollo with titanium backup. This problem of accelerated streaming stays the same no matter which player is used. The problem is bluetooth code not the player.
[LG Optimus 2x] chp2:
Hi Tony.

You got it. T'hat's one of the many problems we got.

As I explained some time ago, for me, the best way to reproduce the problem is : The player (any player and any music) works fine just after a phone restart and some time after, the music begin to be accelerated.

I'll try to test your build and to colect some logcat i'll post tonight for analyse.
[LG Optimus 2x] chp2:
Here is the catlog

As expected, I experience the same problem.
[LG Optimus 2x] Mazout360:
Could you add the MDM6600 spi driver in the "to-fix" list ?

Devs from the P999 forums would surely join you guys to try to finally get a fully working CM10.1 build, but without radio we are somewhat stuck without a working phone while debugging.

I know this is not easy to work on if you can't test it by yourself, but many users could try beta builds and provide logcats/kmsgs since this bug is definitely killing our device right now.

We are still trying to find out why PTS1-32 nodes are not answering to RIL calls. GPIO settings looks all right (in our sources, not CM's) and this radio driver has been used, again via a SPI bus, in other devices such as the startablet with a >2.6.39 kernel and a working JB ROM...so it should work somehow.
[LG Optimus 2x] asmerito:
Can this be of any help for HDMI orientation broken bug:

http://xdaforums.com/showthread.php?t=1963785

?
[LG Optimus 2x] tonyp:
bluetooth fixed!

Sorry I didn't update this thread for a while, I have been terribly busy with university stuff.

I tried lots of different configs, fixes, reverts and so on.

The best result has been reverting this commit:

https://github.com/CyanogenMod/andr...mmit/ff8e103bae6deafbce4bfc2b4bedcada6f0b7752

Without this BT worked - until the phone went into deep sleep., then it sped up.

But I didn't make any further progress looking into the ICS_AUDIO_BLOB implementation and it's connection to the phone sleeping.

Soo.. screw it, I chose the last resort straw and went back to replace bluedroid with bluez.

Thanks to Andrei Emeltchenko for his work and kind help I managed to do it.

And.. *drumroll* I succeeded :) Bluetooth fully works with the bluez stack, confirmed by chp2 who used to get audio speedups with all my former testbuilds.

:victory: :fingers-crossed: :good: HAPPY :good: :fingers-crossed: :victory:

Finally! Lots of work has been put into this, and it's been especially annoying that my headset didn't suffer which made it hard to debug.

There is a drawback though - this will never make it into official CM, it required (partially deep) changes in ten different android packages.

As bluedroid is the future it might be worth looking further into it, but for now I'll do a break and am happy about using bluez and a fully functional bluetooth.

I need to clean everything up now. Once all testers gave a green light I will post my testbuild here to get feedback from a broader test cycle, then get a release ready.

Stay tuned - and patient.
[LG Optimus 2x] imayoda81:
Great work then tony... and don't worry because it won't be the first time that this LG won't be upstream.

I strongly believe this CM10.1 will be the last one really possible for this phone, and your modifications won't change Cyanogen flavour at all.

Congratulations meanwhile
[LG Optimus 2x] tonyp:
Okay, here's the build (newbl): http://tonyp.hopto.org/cm-10.1-20130410-UNOFFICIAL-p990.zip

The speed-up bug should be totally gone and everything work exactly as in CM10 (it's the same bluetooth stack).

If something isn't please report it with an attached logcat.

Development related posts are totally okay in here, for everything else you can use the CM 10.1 Bug Thread in the General section.
[LG Optimus 2x] chp2:
For me it work fine now for all my BT devices.

Tony, Don't forget to update the 1st page if BT is OK
[LG Optimus 2x] KiRAdot47:
tonyp is it possible to make that commint (reverting to BlueZ) a flashable zip?

thank you
[LG Optimus 2x] tonyp:
hell no. the only way to have this in a flashable zip is a the zip file I posted above ;)
[LG Optimus 2x] Cubel89:
Good morning!

took yesterday with the rom and now goes very smoothly.

The only problem I had was with the camera this morning. When taking a picture has frozen image and saved me but to teach the rom after a classmate to teach him the problem I could do 7 shots in a row without problems.

I'm the only one with this problem?

Not if I worked for ever or will fail again the next time you need to use ...
[LG Optimus 2x] tonyp:
SoftAP fixed

Okay guys - another great news :)

I had some time today again and managed to fix the Wifi hotspot!

I finished the work I started 2 weeks ago (with forwardporting the CM10 netd).

Last time I missed a spot in the framework, I tracked it down, fixed it as well and booom :)

My testbuild (newbl):

http://tonyp.hopto.org/cm-10.1-20130415-UNOFFICIAL-p990.zip

(note that it's an engineering build, you will see flashing red borders from time to time)

pengus asked me to hold back on releasing the sources - while I've been working on forwardporting the old CM10 code into CM10.1 he's working on another approach:

Updating the kernel to the newer nvidia sources, including the bcmdhd wifi driver.

As this kernel might make my fixes obsolete it could create a mess if lots of people try to include these fixes into their rom now, as they would break the newer kernel.

I will polish everything and release a CM10.1 for both bootloaders with my bluetooth, wifi hotspot and whatever other fixes I stumble across.

Gimme a couple days to wrap everything up.

We're LG users - we know how to be patient, right? :D
[LG Optimus 2x] tonyp:
I've been asked to create a proper CM10.1 discussion thread withour the posting restrictions like in here.

So here you go: http://xdaforums.com/showthread.php?t=2236544

At first I need to know on which basebands call rejecting works, read the other thread for more information.
[LG Optimus 2x] I.m.Tuga:
Hey Tony, I read on pengus kernel thread that you'll post a test built for CM10.1 with brightness bug fixed. The thread you'll post it is this one isn't it?

Thank you
[LG Optimus 2x] tonyp:
As this is the development thread I will only post development related stuff here - e.g. instructions for other developers.

You'll find my testbuilds in the discussion thread I posted above - I think that's the better approach and will keep this thread cleaner.

But as I'm posting here anyways I can link to the build as well:

http://tonyp.hopto.org/cm-10.1-20130421-UNOFFICIAL-p990.zip

Note that this build isn't meant to be used as a daily driver. This build is a

development preview

of the upcoming CM10.1 ROM.

For one it's an engineering build again - you will get some red flashing borders when the cpu ramps up.

Secondly it requires kk 119 to work as intended - which isn't publicly released, yet.

If you flash an earlier kernel you won't be able to change the brightness at all.

You need to keep the included kernel where everything works, but that isn't optimized performance-wise unlike the official release kernels.

If you don't touch the kernel it should fix the low brightness after unlocking bug.

Additionally I included the v30 automatic time fix properly this time, there was a fishy bug in the last version which I accidently introduced when fixing call rejecting.

Please check if everything (brightness after unlocking, automatic time, call rejecting) works and tell me if you notice any issues (in the thread in the general section!).

I'm not yet in release mode, so don't complain about anything else.

But as the most annoying bugs are fixed now you can expect a release "soon" - no ETA of course.
[LG Optimus 2x] sudden36:
Hey ho,

I found a problem with bluetooth, my bluetooth keyboard isn't working. I'm able to pair with it but if i want to type something nothing happens.

I flashed your last build from this thread: cm-10.1-20130410 with a full wipe

only app I installed was aLogCat for the logs

and now the strange thing, my bluetooth mouse (Logitech M555b) works fine, and so does file transfer with my pc :confused:

this problem is reproducible also in your PA roms.

lg sudden
[LG Optimus 2x] alexander555:
Hello tonyp,

is it possible to add pdroid to your cm 10.1 rom base?
[LG Optimus 2x] tonyp:
Oups, I did totally forget about that, thanks to [MENTION=4753898]JordanRulz[/MENTION] for sending me a PM asking about it!

I've just pushed these fixes to the p990-dev Github account:

fix search button hardwarekeys binding

fix autobrightness compatibility with pengus77 kernel (warning: requires revert of this commit when using the CM kernel!)

fix call rejecting on SU660 Basebands

automatic time nitz fix for SU660 and v30 Basebands

fix to properly enable zRAM

a couple minor fixes found along the way

https://github.com/p990-dev

As always I'm maintaining a cm-10.1 and a cm-10.1-newbl branch to encourage devs to support and build for both bootloaders.

How to incorporate BlueZ:

Why is this needed?

Unfortunately bluetooth audio is "accellerated" on some headsets. My Nokia BH-504 works perfectly fine, though.

Here's a logcat: http://xdaforums.com/showpost.php?p=38862731&postcount=224.

The only fix I found was to replace the bluedroid stack with bluez.

For that you need to incorporate these changes: http://gitorious.org/android-bluez

Additionally you'll need my commit for the device tree to enable bluez support:

https://github.com/p990-dev/android...mmit/75ddafde5e2a041804f5b2b0036c10c855807089

While you could use the repos I've forked to my own Github profile I wouldn't recommend that (and they aren't complete).

I don't have the time to maintain all of them for public usage, as you need to use 10 different repos - so they're just for my own rom and WILL break stuff in yours!

I've forked a couple repos (bluetooth/hcidump, bluetooth/bluez, bluetooth/glib, device/common) to the p990-dev account.

Get the other ones from gitorious.

Ground rule: I do maintain everything on the p990-dev account for public usage, but not at the tonyp one.

That's the reason I've created a new account - some people were using my device trees which broke different thing at their end.

Big thanks to Andrei E. aka niko! I've contacted him via mail and he asked for company clearance and pushed his bluez work back to gitorious.

Edit: I've been asked about the RIL fixes by pengus77 (call forwarding, call muting).

Those aren't my work - it's totally his choice when and how to release them.
[Galaxy Y GT-S5360 Android Development] aniket.lamba:
Awesome Work...! :thumbup: Any bugs?

Rom: Stock Rom

Kernel: Savie's Kernel

Theme: ----------
[Galaxy Y GT-S5360 Android Development] raj.parekh07:
bug list??

Want To Ask Question? Ask Here

Thanks,

TechnoSavie
[Galaxy Y GT-S5360 Android Development] -CALIBAN666-:
whatta..........this looks very coooool,where is the buglist?
[Galaxy Y GT-S5360 Android Development] Rcain:
Please tell me it has the battery bar, in my opinion it's the most important feature.

________________________________

Many people don't get this but,

Being humble is like the "I win" button in your life.
[Galaxy Y GT-S5360 Android Development] CarlDeanCatabay:
Are you sure this is CM based android 4.2? I see Hyperion settings, dialer and contacts app here mate and the launcher looks like a skinned TT launcher.
[Galaxy Y GT-S5360 Android Development] raj.parekh07:
Even status bar from marinalins theme

Want To Ask Question? Ask Here

Thanks,

TechnoSavie
[Galaxy Y GT-S5360 Android Development] evanlocked:
Seems familiar

Sent from my GT-I8150 using Xparent ICS Blue Tapatalk 2
[Galaxy Y GT-S5360 Android Development] -CALIBAN666-:
i smell a big plagiat!!!!:rolleyes:
[Galaxy Y GT-S5360 Android Development] marinalin85:
:))

He just took some apps from Jelly Blast, Hyperion, Nemesis, Cod and from my theme and he made a Rom, niiiice :-J

Thread was reported, lets see what happens next :)
[Galaxy Y GT-S5360 Android Development] percy_g2:
credits :confused:
[Galaxy Y GT-S5360 Android Development] sohan rawat:
He he ..i thnk dis thread gonna b LoL thread :D : D
[Galaxy Y GT-S5360 Android Development] freakzapster:
Downloading nowil lt u know if there any bugs

Thanks and good luck
[Galaxy Y GT-S5360 Android Development] raj.parekh07:
This is going to be closed soon

Want To Ask Question? Ask Here

Thanks,

TechnoSavie
[Galaxy Y GT-S5360 Android Development] jaison thomas:
This is old wine in new bottle. See "nemises one features.....". Op forgot to change rom name too :D
[Galaxy Y GT-S5360 Android Development] basuraunak:
DAFUQ!!?!

Look at nemesis features page....those words are almost the same.......and that are parts of alins theme.........that is copied ....this thread needs to be closed else the OP needs to give clarifications:mad::mad::mad:
[Galaxy Y GT-S5360 Android Development] _akash:
And i thought nemesis and its derivatives were banned on xda:eek::eek:.

No one will agree to your statement that it is copy of nemesis features without proper links to everyone please instead of posting here use report button or pm any moderator.