yashsingh1/xdaforums huggingface dataset:
[XPERIA X1 Android Development] ultrashot:
wavedev.dll enables/disables not only gpio=0x41, but also 0x39, 0x3A, 0x40.

I wonder if there is any correct way to disable speaker in kernel...
[XPERIA X1 Android Development] Oggy972:
Something strange with the speaker.

In silence mode, right after the boot, the speaker makes noises .

Then, when , still in silence mode, we receive a call , the phone vibrates and after the speaker stops making noise...

It seems that it's disabled !
[XPERIA X1 Android Development] ultrashot:
Oggy972, when you make calls or use headset, sound output redirects there and main speaker becomes disabled
[XPERIA X1 Android Development] Oggy972:
Yeah lol ! I was wrong :p ^^

And, besides, there was too much noises around me ^^
[XPERIA X1 Android Development] Matzemink:
Since phhusson's "insane temperature" fix on 1 Aug the xdandroid kernel is at least working on x1 !!! :)

Now we have Bluetooth support!

After some testing I also found that the speaker doesn't play any sounds + speaker always on, that the button backlight doesn't work and that the battery meter isn't accurate..

So please push your commits to the main repo now. :)
[XPERIA X1 Android Development] X1iser:
@ultrashot: What is the patch for the front LEDs ?

I try to compile your patch for the qwerty LEDs and it work well, thank for that :)
[XPERIA X1 Android Development] ultrashot:
X1iser, posted here: http://xdaforums.com/showpost.php?p=7024523&postcount=210 (microp_klt.c)
[XPERIA X1 Android Development] X1iser:
Thank ultrashot :)
[XPERIA X1 Android Development] vdelf:
Hey ultrashot, great work with that keyboard/keypad-backlight! Using android feels much less "alpha" now, and we can use it in the dark! :D

Like X1iser, i just put your code into my kernel, works like a charm. I also mapped the keyboard ok-button the same way as the keypad-ok-button (someone requested that). patch is included.

Now we have to get this into main repos. Did one of you already contact phhussson or can commit it directly? If not, then i will send this patch to phhusson, giving ultrashot the credit/blame for it ;)
[XPERIA X1 Android Development] Matzemink:
I've already sent him the link of ultrashot's post on August 5 but neither he wrote back nor he pushed something to gitorious..

So you better send him the patch again :D
[XPERIA X1 Android Development] vdelf:
ok, patch send to phhusson. Lets hope for the best :D
[XPERIA X1 Android Development] vdelf:
You are right, did miss that until now. According to some logs i got 80 to 85 from aux1. While charging this value increased to 85, on standby it went down to 80. Makes sense!

A quick look to wikipedia gave me gave me the conversion from fahrenheit to celsius: C = (F - 32) * 5 / 9. That could mean, that my battery-temperature was 85 F = 29,4 C on charge and 80 F = 26,6 C on discharge. Makes sense, too!!

I have to verify that but it feels right :D

Good work with the driver!! Looks very promising!
[XPERIA X1 Android Development] ultrashot:
vdelf, what about using

#define MICROP_KLT_ID_KEYPAD_BRIGHTNESS_KOVS 0x14 // Set brightness of front keypad

in microp-klt.h instead of 0x14 constant in code?

and

buffer[0] = MICROP_KLT_ID_KEYPAD_BRIGHTNESS_KOVS;
if (brightness)
{
buffer[1] = 0x80;
buffer[2] = brightness/4;
}

because fixed brightness isn't good thing.
[XPERIA X1 Android Development] radzix27:
But speaker is always on :/ When I turn my phone to android I hear in Xperia speaker that voice when phone searching GSM signal, also when call/message is comming...I think that speaker makes drain battery very fast, and also proc. max speed 528MHz
[XPERIA X1 Android Development] ultrashot:
radzix27, you can easily compare battery life with speaker and without speaker. Insert headset in 3.5 mm jack, then pull them out. Speaker will be turned off
[XPERIA X1 Android Development] Tremere:
If its in F, its 5C too low, compared with the readings I am getting with batii in WM.

The ds2760 (in mainline) and ds2784 (nexus one) both seem to specify temp in units of 0.125C, but that doesn't line up with our aux1...
[XPERIA X1 Android Development] Tremere:
I've pushed a more complete battery driver to the kovsky-battery-driver branch I mentioned before, if it doesn't cause idle battery life to decrease I'll build a complete kernel package using it.

BT works on it but doing so kills ADB over USB. I can't test it any further than that.
[XPERIA X1 Android Development] vdelf:
Ok, updated patch with suggested changes.
[XPERIA X1 Android Development] Tremere:
@ultrashot and vdelf: Nice!
[XPERIA X1 Android Development] Tremere:
Has anyone had a look at the TSSC-Manager touchscreen driver from HTC (drivers/input/touchscreen/tssc_manager.c)

Its disabled on Kovsky and Blackstone, I'm curious if there is a technical reason (hardware incompatibility) or just that we need to patch it?

(Last time I had tried it, accidentally, didn't register any touches on the Android interface)

msm_ts, a community developed driver, breaks down under tickless mode, ergo, its stopping us from lowering idle power consumption :(

Also, msm_ts seems a bit messy, i.e it doesn't use the platform driver framework

(Other things like adb break too but that isn't an issue for most users)
[XPERIA X1 Android Development] sp3dev:
MDDI init

Here's a patch that implements the panel driver for kovsky and mddi bridge init. Should save a bit of power when in suspend. Also, will be useful for nand boot. The mddi bridge part is commented out because it doesn't work as of now

http://pastebin.com/XyHxy1Br
[XPERIA X1 Android Development] scholbert:
Awesome.... that's amazing work.

So it seems that from now on we got a true init for the kovsky screen.

I can't believe it...

Thanks a lot!

scholbert
[XPERIA X1 Android Development] zhengyu718:
Great idea to do that!!
[XPERIA X1 Android Development] X1iser:
Here the patch for not have always speaker on

http://gitorious.org/linux-on-qualc...mmit/74aec597ab730531600e06844c3875a0f9af1f42

Change both (audio_out.c)

void disable_speaker_rhod(void);
void enable_speaker_rhod(void);

to

void disable_speaker(void);
void enable_speaker(void);

It work :)
[XPERIA X1 Android Development] Jonny4911:
:O

If that works then this is bloomin' brilliant! xD

can't wait for the next kernel!
[XPERIA X1 Android Development] stefanACM:
When new kernel will be released ??? I CANT WAIT FOR FIRST TIME IN LIFE ;)

-better init for display

-new battery life improvements

-speaker suspend mode :|

I CANT WAIT

Who releasing new kernel ??? and when it will be updated in Android 2.2 thread ???

Thanks guys ;)
[XPERIA X1 Android Development] Tremere:
Too busy myself for the next week and a half, anyone else is very welcome to do it

Here's some info to get you started:

http://mcbridematt.dhs.org/mobile/index.php?title=Kernel_builder_script
[XPERIA X1 Android Development] iPwnJ00:
I've been wanting to build the kernel but I cannot seem to find the ARM Cross Compiler, armv6j-softfloat-linux-gnueabi-

Can you advise me where I should look? Providing a link would be appreciated.

Thanks!
[XPERIA X1 Android Development] Tremere:
I use Gentoo for my Linux development so I used its crossdev tool to build me a toolchain.

There is a compiled toolchain from codesourcery, this, which will work too. See the xdadev wiki article
[XPERIA X1 Android Development] Reversedhex:
id like to advise you to set up a vm with ubuntu and follow this quide.
[XPERIA X1 Android Development] tchatzi:
Of all the ready-made cross compilers, this (http://www.kandroid.org/board/board.php?board=toolchain&command=body&no=4) has served me best.

I've built a kernel with X1iser's speaker fix and can confirm that it's working It seems to be mostly working, but yesterday evening I heard familiar GPRS sounds coming from the speaker.

Don't know if it'd be interesting to have ``bleeding edge'' ready-made kernels for people unable to compile themselves.
[XPERIA X1 Android Development] iPwnJ00:
I have already set up a Ubuntu VM since I'm running Mac OS X. I have everything ready except for the compiler. I am trying to build the toolchain now :)
[XPERIA X1 Android Development] scholbert:
Nice.... but would save much time and hair, if you use a readymade.

Another positive effect is, you know that these prebuilt ones are properly working.

E.g.:http://htc-linux.org/wiki/index.php?title=Toolchain

Anyway, good luck if you do it yourself :p

Regards,

scholbert
[XPERIA X1 Android Development] sjkoon:
kovsky's camera

in android kernel

drivers/i2c/chips/mt9t013.c is kovskys camera driver.. it isn't?

but why don't you using that driver?
[XPERIA X1 Android Development] drlucky:
Various Kernel repositories

Hi all!

I just tried to include the latest changes from linux-msm (the xdandroid git repo) into our xdadev clone for kovsky. Seems pretty hard, especially since some of our changes have been reworked in the main repo.

Additionally, Tremere has done a great job of including a new battery driver, but he too is based on the main linux-msm repo.

So - since it seems that the x1 is working out-of-the-box with the linux-msn kernel, so we still need any of the changes from out repository? If so, what would that be? Sound? Graphics?

I would then prefer to (a) drop our repository or (b) copy everything from linux-msn to our repositiory and manually include some bits and pieces afterwards. Would help sending patches to the main repo, too.
[XPERIA X1 Android Development] sp3dev:
no, just clean up the battery driver and add the charger detection and send it to phh. then drop all our forks. everything else is working fine in the main tree
[XPERIA X1 Android Development] Tremere:
To my knowledge the battery was the only part left out when phh did all the merging. So there isn't any reason to keep -xdadev around anymore.
[XPERIA X1 Android Development] drlucky:
OK - just got the sources from Tremere, merged with the latest changes from linux-msm and compiled a kernel. Boots ok, but doesn't show a battery level (instead got a question mark in the battery icon)

Also shutting down hangs my device.

Both was running ok using the kernel from the latest Androis2.2 package from Tremere ... something is going wrong on my machine again ?!?
[XPERIA X1 Android Development] Tremere:
Is it possible you don't have the ds2746 driver (under device drivers->power) marked for inclusion?
[XPERIA X1 Android Development] drlucky:
OK - haven't seen that, thanks. I modified the htc-config in arch/arm/configs to enable 2746. Anything else I need to change?

Will try to compile, but need to leave now - maybe tomorrow ... :)
[XPERIA X1 Android Development] Reversedhex:
may i ask which ide you are using?
[XPERIA X1 Android Development] drlucky:
I'm using an Ubuntu Desktop inside of a VMWare Player (my desktop PC is running windows).

Inside this vm I'm using no IDE at all, but a terminal with vi and a build script to compile kernel / wifi / wlan.

Currently I'm using Tremeres git repository to compile the kernel.
[XPERIA X1 Android Development] ultrashot:
I am using VirtualBox with ubuntu. Sources are located in local SVN repository, and I edit them without any IDE (in Windows). Then simply merge svn folder with ubuntu's shared folder and build them using *.sh script in ubuntu.
[XPERIA X1 Android Development] Tremere:
I've added the external power changed hook to ds2746, all it does is make it do a reading as soon as a change in external power is signaled (theoretically). The charger icon still only appears when current is being supplied to the battery.

Its still not stable. A kernel panic is happening somewhere. Can anyone spot if I have done anything wrong programming wise?

BTW I tested a tickless kernel yesterday as well, it should be good enough for most people to use (as long as they don't use adb/net over usb), but since we have suspend hooks I haven't been able to confirm the idle power improvements I've seen before, yet.
[XPERIA X1 Android Development] drlucky:
Any output from the kernel panic? I'm not a good linux kernel guy, but I think we need to get some information from the panic to find the cause of this? Anyone from the linux front, please ...?

How do I compile a tickless kernel? Do I need to change something on the config or the startup.txt? Would be nice to try that as well.
[XPERIA X1 Android Development] Tremere:
All I know so far is that a panic is probably happening judging by the unresponsiveness then reboot. I will have to induce a crash without the Android GUI running to see the details.

(Anyone ever got kernel log working over usbnet? That could work..)

This is off the top of my head, you might have to grep around a bit.

If you edit arch/arm/Kconfig and add the GENERIC_TIME option for the MSM processor, then run make ARCH=arm oldconfig the tickless (CONFIG_NO_HZ) should be available
[XPERIA X1 Android Development] drlucky:
Wrong time in android

Hi,

One thing I have mentioned is that the time in android is wrong. In Germany we currently have GMT+2 and the time in android is exactly two hours ahead the time displayed in winmo (which is the correct one).

I think android believes that the hardware clock is UTC (which it is not) - is there any way to change this? Otherwise I need to adjust the clock every time i switch from windows to android.
[XPERIA X1 Android Development] syahmixp:
Hi...

in drivers\power\ds2746_battery.c

line 113:

static void ds2746_ext_power_charged(struct power_supply *bat_ps);

should be

static void ds2746_ext_power_changed(struct power_supply *bat_ps);

line 331:

static void ds2746_ext_power_charged(struct power_supply *bat_ps)

should be

static void ds2746_ext_power_changed(struct power_supply *bat_ps)
[XPERIA X1 Android Development] X1iser:
Use GMT +0 in Android :)
[XPERIA X1 Android Development] drlucky:
Done that, but I thought there might be a better solution ... on linux machines you can specify that the hardware clock is not UTC-based, but based on local time.

But hey, can live with GMT+0, too :)
[XPERIA X1 Android Development] Tremere:
I guess Android doesn't need to care about the behaviors of Windows though..

Apparently the RIL and its time sync function may be responsible. Perhaps turn off 'use network time'?
[XPERIA X1 Android Development] Isich:
Hello devs,

The power off issue - hanging after last vibration still remains.

It is annoying to open each time the back and reset X1.

Don't know about You, but I offen switch back to WM to preserve battery, because I don't carry charger with me all the time.

So, I've made a research in source tree at gitorious and found what causes it.

For now it should be good to revert it to previous state - automatic reset.

Here is the commited change that causes it.

Try to do a real poweroff, with vreg msmp

Now it is:

static int __init msm_pm_init(void)
{
pm_power_off = msm_pm_power_off;
...
...
...
}

It should be good to be

static int __init msm_pm_init(void)
{
pm_power_off = msm_pm_restart;
...
...
...
}

Thanks
[XPERIA X1 Android Development] sp3dev:
Hey fellows. Here is a set of patches that will hopefully be integrated into htc-linux-2.6.27 as soon as possible (phh has the patches, don't ask him about it)

The list of changes

1. Working USB/ULPI initialisation (now usb works even when not plugged during haret boot)

1.1 Generic USB driver for wince phones (nothing special, just code cleanup)

2. USB Gadget framework from 2.6.32. It allows us to use ADB, RNDIS with android (can be switched via sysfs), RNDIS with linux native driver (without android composite). USB Audio doesn't seem to work, the rest is untested.

3. Workaround for pm.c (now it doesn't hang, but for 5225 devices the reboot takes place instead of shutdown)

4. Experimental new clocks control. Probably won't make any difference until we boot off nand. But still, i'd like everyone to test, especially the owners of diamond/raphael
[XPERIA X1 Android Development] nemasu:
ds2746?

Greetings, I'm slightly confused about the choice of battery driver and would be pleased if someone can clear some things up.

The tear down[1] of the X1 shows a PM7540 for power management, where did the ds2746 come from?

I looked at the kernel source of another device (dell streak) using the same chip (pm7540) and how it handles the battery and it's totally different. The dell uses i2c functions to read and the current X1 implementation (in the new repo) uses the smem battery driver (which from what i gathered from a quick glance just reads values from memory starting from a base address).

I figured maybe because the dell has a different CPU it might be wired differently...but then I think I remember someone in this thread reading battery info using i2ctools.

Perhaps (most likely) I have the wrong impression, can anyone explain?

[1]: http://www.phonewreck.com/wiki/index.php?title=Sony_Ericsson_XPERIA_X1
[XPERIA X1 Android Development] scholbert:
Hi nemasu!

You can not compare the dell streak and the X1, as it is completely different hardware. The X1 uses the PM7540 for Power generation and management and i guess the Streak also does.

The DS2746 is soldered on the X1 mainboard and measures the battery voltage. This chip is not included in the battery package as it might be on other platforms (e.g. Dell Streak), and uses I2C protocol as well.

So apples and oranges....;)

Please trust the genius hackers and follow their way :p

Have a nice day,

scholbert
[XPERIA X1 Android Development] ziomiki:
how can i use this patches with 20100523 kernel? can i put them in my card root? i need recompile the kernel with this patches?

Thanks!
[XPERIA X1 Android Development] sp3dev:
You need to recompile the kernel. But 05/23 sounds wayyy tooo oooold
[XPERIA X1 Android Development] Tremere:
Thanks for picking up that typo! :)

I'm looking at it now, htc_battery_smem is not signaling an event when the usb charger is connected/disconnected.

edit: by nerfing htc_battery_smem's update it no longer checks for charger. Separating it will be ugly.
[XPERIA X1 Android Development] Tremere:
Ok. The ds2746 driver is not at fault. Built a kernel without it and the X1 still died stone cold during sleep.

The kernel didn't have htc_battery_smem so I can rule that out.
[XPERIA X1 Android Development] sp3dev:
Hey guys. The kovsky is currently broken in the htc-linux kernel, so take this zImage and modules until it is fixed. Beware - it has LED indication of suspend. Red means entering suspend, green - exiting it. Notice that it wakes up at about two times a second. That's because of the stupid battery driver which needs to be rewritten for kovsky.

http://www.mediafire.com/?itx4yk7zfph11pz
[XPERIA X1 Android Development] Devaster:
touchscreen is not functioning ....
[XPERIA X1 Android Development] sp3dev:
No, it is working. At least, on XDANDROID 2.2 it is.
[XPERIA X1 Android Development] Matzemink:
Great! :)

The indication is very nice and useful!

What I noticed:

In idle (screen on, do nothing, flightmode) I get 137mA.

In standby the usage is between 150mA and 180mA.

I also thought this but the touchscreen is working! It's just messed up.. top is left, down is right and so on

Edit: You need a new calibration file!

Here's mine
[XPERIA X1 Android Development] stefanACM:
What is in this new KERNEL ???
[XPERIA X1 Android Development] Devaster:
thanx now functioning , all ok for now ....
[XPERIA X1 Android Development] calvinfoo:
I dont have any clue to obtain the modules and zimage from the file. Could any provide it?
[XPERIA X1 Android Development] matejdro:
?

Just open it with Winrar or something simmilar.
[XPERIA X1 Android Development] raja'i:
im not expert in these stuff

but can this benefit us "x1 user's"??

http://www.xda-developers.com/android/desire-hd-rom-devs-rejoice-kernel-sources-released-by-htc/
[XPERIA X1 Android Development] sp3dev:
sort of. they have released the ds2746 driver. traditionally for htc and google, it features very bad code style duplicating existing functionality (and even copying windows-like defines to linux kernel). nevertheless, this will help us to implement the correct battery measurement and charge drop (though ATM this is not the priority)
[XPERIA X1 Android Development] phoenixbvu:
how to use Kovsky Kernel

Hi all!

I don't know how different between this file and the file include in file Andoid 2.2 Foryo, is it better?:D, and how to use it!Could you direct me?:p
[XPERIA X1 Android Development] mudenza:
sp3dev, I've noticed a small problem in the latest xdandroid kernel (23rd); the front facing backlights do not work, whilst the keyboard backlights work. Possibly due to new auto-bl? Also, does the auto-bl actually work on kovsky (since its the same as raph)?
[XPERIA X1 Android Development] sp3dev:
Kovsky auto-bl is in no way same as raph (and therefore it does not work). Yes, they've broken something in latest kernel and xdandroid. I'm using my custom branch now, so have not tested the new auto-bl commit to see if it breaks anything, but will probably update kovsky support in the main branch as soon as i fix some battery and headphone issues
[XPERIA X1 Android Development] mudenza:
Regarding the headphones, I've noticed that when I am playing music, then stick out the headphones, and then play music again, music comes out from...the earpeice! (this was with camro's build, I think it happens with the xdandroid as well)
[XPERIA X1 Android Development] sp3dev:
ok, a new testing zImage. use with the modules from the previous archives i've uploaded

http://www.mediafire.com/?urtxxewkiopuvxr

now the suspend issues are fixed and the battery driver is almost correct. i will be uploading the patches to git and merging with xdandroid, but i don't currently have much time for that
[XPERIA X1 Android Development] pirlano:
i'm gonna try it now :)
[XPERIA X1 Android Development] n00b3r:
Works great. I appreciate your time and effort for bringing us kernel updates :)

Edit: one little problem; the earpiece speaker doesn't work with zImage during a call, but the speakers work.

Also, once the phone goes into "deep sleep". The only way you can wake up the phone is by pressing the top power button, while none of the other hardware keys including the keyboard will work until a reboot.
[XPERIA X1 Android Development] sp3dev:
well, the button behavior is planned - previously, the phone could be waken up by any button due to the fact it never entered deep sleep. For me, all the hardware buttons work after the phone exits the suspend. You may wish to try the new FXR02 xdandroid image.
[XPERIA X1 Android Development] drlucky:
I'm leaving

Hi all,

Sorry for not posting or contributing for such a long time, but I was busy doing my normal job stuff.

Just wanted to let you know that I switched to a X10 and therefore are no longer able to do anything for X1 development.

I really hope the kernel/android is getting to a production like stability ...

Have fun!
[XPERIA X1 Android Development] H117:
Headphones connect status seems to be reversed. When I connect headphones, sound during call comes from earpiece. When I disconnect, there's no sound from earpiece. Same problem is there when playing music, when I connect headphones sound comes from speakers.