• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

Advent Vega kernel source code now available!

2862 posts in this topic

Posted · Report post

Finally, i got some time to fix the mic issues on the JB4.2 on the shuttle. Attached the patch to the audio_hw.c (part of the lunch target for shuttle) that fixes audio input fhrough mic

audio.rar

0

Share this post


Link to post
Share on other sites

Posted · Report post

Strange... unless audio volume is setting the volume of something different, such as voice volume...

It seems it is setting a different volume.

1

Share this post


Link to post
Share on other sites

Posted · Report post

Finally, i got some time to fix the mic issues on the JB4.2 on the shuttle. Attached the patch to the audio_hw.c (part of the lunch target for shuttle) that fixes audio input fhrough mic

Tanks. Will have a look at this soon.

1

Share this post


Link to post
Share on other sites

Posted · Report post

Also, I have fixed some bugs in the USB camera library.. Now, the camera always initializes (previously, sometimes it failed to properly init) and also, now the camera is turned ON only when under use. This will save battery!

libcamera.rar

0

Share this post


Link to post
Share on other sites

Posted · Report post

Also , an small fix on the kernel side. Sometimes uarts were trying to use an incorrect clock when trying to set a high speed connection, such as the bluetooth connection. Also fixed it.

board-shuttle-uart.rar

1

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Finally, i got some time to fix the mic issues on the JB4.2 on the shuttle. Attached the patch to the audio_hw.c (part of the lunch target for shuttle) that fixes audio input fhrough mic

Eduardo,

With this new audio_hw.c, i am not getting any sound out of my tablet. Putting back the original audo_hw.c and i got sound back. Doing a diff between the files, shows that there are many many differences.

This is the audio_hw,c that i am using and is working fine (except for the big crackle when th card gets initialized the first time):

audio_hw.c.zip

But offcourse the microphone is not working.

Edited by Scanno
0

Share this post


Link to post
Share on other sites

Posted · Report post

Also , an small fix on the kernel side. Sometimes uarts were trying to use an incorrect clock when trying to set a high speed connection, such as the bluetooth connection. Also fixed it.

Thanks, this fixed some clock errors we were having!

0

Share this post


Link to post
Share on other sites

Posted · Report post

Eduardo,

With this new audio_hw.c, i am not getting any sound out of my tablet. Putting back the original audo_hw.c and i got sound back. Doing a diff between the files, shows that there are many many differences.

This is the audio_hw,c that i am using and is working fine (except for the big crackle when th card gets initialized the first time):

audio_hw.c.zip

But offcourse the microphone is not working.

The changes you see were required to make the mic work again in jb4.2. The problem was that Google redefined the constants used to select the audio source. Before the redefinition, each audio source had an associated bit in the audio source bitfield, and that bit was unique. But, after the redefinition, each audio source has a unique bit, but also a shared bit that tells that is is an input source. So, expressions such as

(source & MIC_SOURCE), that previously were true only when dealing with the mic, now are always true for all input sources. The result was that Bt audiop was selected as audio input source, instead of mic. What i did was to mask out the offending bit (that tells we are dealing with an input source). That way, the audio driver is able to again properly select the audio source as requested by the framework.

I redid the porting on thedriver you posted. Hope this time it works!

audio.rar

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

The changes you see were required to make the mic work again in jb4.2. The problem was that Google redefined the constants used to select the audio source. Before the redefinition, each audio source had an associated bit in the audio source bitfield, and that bit was unique. But, after the redefinition, each audio source has a unique bit, but also a shared bit that tells that is is an input source. So, exp<b></b>ressions such as

(source & MIC_SOURCE), that previously were true only when dealing with the mic, now are always true for all input sources. The result was that Bt audiop was selected as audio input source, instead of mic. What i did was to mask out the offending bit (that tells we are dealing with an input source). That way, the audio driver is able to again properly select the audio source as requested by the framework.

I redid the porting on thedriver you posted. Hope this time it works!

Thanks i will give it a try

Edit: it seems to be working

Edited by Scanno
1

Share this post


Link to post
Share on other sites

Posted · Report post

Hello,

I have also started porting 4.2 to the Folio 100. You did an amazing job! Thanks :)

For the audio driver I have switched to use the audio lib of the Asus Grouper / Nexus 7:

https://android.googlesource.com/device/asus/grouper/+/android-4.2.1_r1/audio/

It looks very nice and the configuration is done in mixer_paths.xml instead of the source.

It only lacks HDMI output but this should not be a problem to add. Maybe you should use this too?

0

Share this post


Link to post
Share on other sites

Posted · Report post

Hello,

I have also started porting 4.2 to the Folio 100. You did an amazing job! Thanks :)

For the audio driver I have switched to use the audio lib of the Asus Grouper / Nexus 7:

https://android.goog...4.2.1_r1/audio/

It looks very nice and the configuration is done in mixer_paths.xml instead of the source.

It only lacks HDMI output but this should not be a problem to add. Maybe you should use this too?

The problem ,unfortunately, will be the hdmi audio.. ;)... Tegra2 has different ports for codec and HDMI, and hte routing can't be expressed in the .xml file. It would require modifications, Eventually, those modifications would give you the auido_hw.cwe are using, but, instead of having hardcoded routing tables, you would read the audio routing tables from the xml file. It is nearly the same thing.. Modifications are required in all cases :S

0

Share this post


Link to post
Share on other sites

Posted · Report post

Hello,

I have also started porting 4.2 to the Folio 100. You did an amazing job! Thanks :)

For the audio driver I have switched to use the audio lib of the Asus Grouper / Nexus 7:

https://android.goog...4.2.1_r1/audio/

It looks very nice and the configuration is done in mixer_paths.xml instead of the source.

It only lacks HDMI output but this should not be a problem to add. Maybe you should use this too?

I have already done the implementation for us here https://github.com/niadam/android_device_notionink_adam_common/commit/fbb9f8e8bb41801728ee0b42d7007a05248c858c

Actually currently I am using modified version of latest ejtangle, since I like some of the improvements he has ;)

0

Share this post


Link to post
Share on other sites

Posted · Report post

Don't know maybe it'd be helpful. One fellow from 4pda.ru forum (Ganster41) made working bluetooth for 4.2.1 rom on ARM6 ZTE Blade phone. Sources are on his github https://github.com/a...072bfac5f59cc86

The problem we have is that the Atheros bluetooth chip uses the BCSP protocol instead of the H4 protocol to communicate the bt stack thru the Tegra UART to the bluetooth chipset. This protocol is a bluecore proprietary protocol that encapsulates the H4 protocol into packets with header and checksum, and implements a retry if failed mechanism that the H4 protocol does not implement.

Most bluetooth chipsets use the H4 protocol, so they will work with the broadcom stack. But our bluecore based bluetooth chipset only accepts BCSP,that the broadcom stack does not implement. I havent finished the implementation yet, but it should not be an impossible task.... I am still working on it...

0

Share this post


Link to post
Share on other sites

Posted · Report post

The problem we have is that the Atheros bluetooth chip uses the BCSP protocol instead of the H4 protocol to communicate the bt stack thru the Tegra UART to the bluetooth chipset. This protocol is a bluecore proprietary protocol that encapsulates the H4 protocol into packets with header and checksum, and implements a retry if failed mechanism that the H4 protocol does not implement.

Most bluetooth chipsets use the H4 protocol, so they will work with the broadcom stack. But our bluecore based bluetooth chipset only accepts BCSP,that the broadcom stack does not implement. I havent finished the implementation yet, but it should not be an impossible task.... I am still working on it...

Thanks that you are still working on BT

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Well, i found out that the CSR chipset used in the Atheros Bt/Wifi combo can be switched from BCSP to the H4 protocol, thus, making it compatible with bluedroid... At least, that is what can be assumed by reading the following site ... http://www.penguin.c.../psion5mx/blue/

Apparently, sending an initialization command to set the PSKEY_HOST_INTERFACE to 3 would do the trick for us..

Edited by ejtagle
0

Share this post


Link to post
Share on other sites

Posted · Report post

Well, i found out that the CSR chipset used in the Atheros Bt/Wifi combo can be switched from BCSP to the H4 protocol, thus, making it compatible with bluedroid... At least, that is what can be assumed by reading the following site ... http://www.penguin.c.../psion5mx/blue/

Apparently, sending an initialization command to set the PSKEY_HOST_INTERFACE to 3 would do the trick for us..

That would be nice. I had a chat whith shane francis a while back. he is the cm maintainter for the vega and he gave me this link regarding bt.

https://github.com/AndroidRoot/android_kernel_asus_tf201/commit/1429d84dae30b52eb95bb03e638ffb6f596f35c3

perhaps you can do something with this?

0

Share this post


Link to post
Share on other sites

Posted · Report post

That would be nice. I had a chat whith shane francis a while back. he is the cm maintainter for the vega and he gave me this link regarding bt.

https://github.com/A...38ffb6f596f35c3

perhaps you can do something with this?

The link is adding support for the broadcom based chipset of the Asus transformer. Already have that in place for a tablet (DVC10) that has the broadcom chipset ... Unfortunately, this does not apply to our chipset (Atheros/BlueChip combo)... The way the BlueChip handles power management is completely different. It is more automatic, does not require programming as the Broadcom does...

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

In CM10.1 i am getting the following error when compiling the huawei ril:


In file included from device/nvidia/shuttle/huawei-generic/requestdatahandler.c:105:0:

hardware/ril/libril/ril_commands.h:65:59: error: 'responseStringsNetworks' undeclared here (not in a function)

hardware/ril/libril/ril_commands.h:65:5: warning: missing initializer [-Wmissing-field-initializers]

hardware/ril/libril/ril_commands.h:65:5: warning: (near initialization for 's_commandInfo[48].responseFunction') [-Wmissing-field-initializers]

make: *** [/home/x/cm10.1/out/target/product/shuttle/obj/SHARED_LIBRARIES/libhuaweigeneric-ril_intermediates/requestdatahandler.o] Error 1

make: *** Waiting for unfinished jobs....

make[1]: Leaving directory `/home/x/cm10.1/kernel/nvidia/shuttle'

device/nvidia/shuttle/huawei-generic/huaweigeneric-ril.c: In function 'print_simansw':

device/nvidia/shuttle/huawei-generic/huaweigeneric-ril.c:3038:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

device/nvidia/shuttle/huawei-generic/huaweigeneric-ril.c: In function 'decodeUSSD':

device/nvidia/shuttle/huawei-generic/huaweigeneric-ril.c:6116:2: warning: pointer targets in return differ in signedness [-Wpointer-sign]

[/code]

EDIT:

Seem to have resolved the compile error by adding:

#define responseStringsNetworks dummyResponse

to requestdatahandler.c

Edited by Scanno
1

Share this post


Link to post
Share on other sites

Posted · Report post

In CM10.1 i am getting the following error when compiling the huawei ril:


In file included from device/nvidia/shuttle/huawei-generic/requestdatahandler.c:105:0:

hardware/ril/libril/ril_commands.h:65:59: error: 'responseStringsNetworks' undeclared here (not in a function)

hardware/ril/libril/ril_commands.h:65:5: warning: missing initializer [-Wmissing-field-initializers]

hardware/ril/libril/ril_commands.h:65:5: warning: (near initialization for 's_commandInfo[48].responseFunction') [-Wmissing-field-initializers]

make: *** [/home/x/cm10.1/out/target/product/shuttle/obj/SHARED_LIBRARIES/libhuaweigeneric-ril_intermediates/requestdatahandler.o] Error 1

make: *** Waiting for unfinished jobs....

make[1]: Leaving directory `/home/x/cm10.1/kernel/nvidia/shuttle'

device/nvidia/shuttle/huawei-generic/huaweigeneric-ril.c: In function 'print_simansw':

device/nvidia/shuttle/huawei-generic/huaweigeneric-ril.c:3038:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

device/nvidia/shuttle/huawei-generic/huaweigeneric-ril.c: In function 'decodeUSSD':

device/nvidia/shuttle/huawei-generic/huaweigeneric-ril.c:6116:2: warning: pointer targets in return differ in signedness [-Wpointer-sign]

[/code]

EDIT:

Seem to have resolved the compile error by adding:

#define responseStringsNetworks dummyResponse

to requestdatahandler.c

[size=4][font=arial, helvetica, sans-serif]You did the right thing. Seems CM10.1 is not using the latest ril.h header from AOSP, probably, attempting to gain compatibility with older binary-only rils required to make some modems from older cellphones work, Í'd suggest using [/font][/size]

[size=4][font=arial, helvetica, sans-serif]#ifndef [color=#4E565E]responseStringsNetworks[/color][/font][/size]

[size=4][font=arial, helvetica, sans-serif][color=#4E565E]#define responseStringsNetworks dummyResponse[/color][/font][/size]

[size=4][font=arial, helvetica, sans-serif][color=#4E565E]#endif[/color][/font][/size]

[color=#4E565E][font=arial, helvetica, sans-serif]so you could unify the jb4.2 and Cm10.1 sources, at least on the RIL sources ;)[/font][/color]

0

Share this post


Link to post
Share on other sites

Posted · Report post

Hey guys,

We're in the process of getting CM10.1 running on the g-tablet but we're having some issues with crashing of the bootanimation. The boot animation will play 1 loop then it will crash. Here is the pastebin of the crash.

http://pastebin.com/jCQpGCs4

It seems the prop libs are causing the issue here and I was wondering if you guys had any issues using your libs on 4.2. The libs are designed for 4.0 so we're really pushing that limit. I'm also seeing a few of these errors in logcat

21:57:29.674 Error gralloc 111  Failed to create overlay for display 2

21:57:29.907 Error gralloc 111  NvGrPost: Failed, TEGRA_DC_EXT_FLIP 6 No such device or address

Any help would be greatly appreciated!

0

Share this post


Link to post
Share on other sites

Posted · Report post

Hey guys,

We're in the process of getting CM10.1 running on the g-tablet but we're having some issues with crashing of the bootanimation. The boot animation will play 1 loop then it will crash. Here is the pastebin of the crash.

http://pastebin.com/jCQpGCs4

It seems the prop libs are causing the issue here and I was wondering if you guys had any issues using your libs on 4.2. The libs are designed for 4.0 so we're really pushing that limit. I'm also seeing a few of these errors in logcat

21:57:29.674 Error gralloc 111 Failed to create overlay for display 2

21:57:29.907 Error gralloc 111 NvGrPost: Failed, TEGRA_DC_EXT_FLIP 6 No such device or address

Any help would be greatly appreciated!

No, i have no problems ... i am using the already posted libs with a JB4.2 image. I also have sometimes the "cannot create display overlay error (display 2 does not exist.. and also the TEGRA_DC_EXT_FLIP error. They are not related to using the 4.0 libs in the 4.2 android image. I think they could be related to having compiled support for other framebuffer devices in kernel)

4.0 libs should work with 4.2 android (provided you used the patches i posted!). Remember android uses OpenGL, and requirements have not changed. I assume the bootanim crash could be caused by an out of memory condition, need dmesg to be sure... Or a compilation without the proper flags. I see libskia.so mapped into the crashing process...

Take a look at either scanno's github or at the N10 lunch target i posted for the advent2 on this same forum...

REgrds, Eduardo

0

Share this post


Link to post
Share on other sites

Posted · Report post

No, i have no problems ... i am using the already posted libs with a JB4.2 image. I also have sometimes the "cannot create display overlay error (display 2 does not exist.. and also the TEGRA_DC_EXT_FLIP error. They are not related to using the 4.0 libs in the 4.2 android image. I think they could be related to having compiled support for other framebuffer devices in kernel)

4.0 libs should work with 4.2 android (provided you used the patches i posted!). Remember android uses OpenGL, and requirements have not changed. I assume the bootanim crash could be caused by an out of memory condition, need dmesg to be sure... Or a compilation without the proper flags. I see libskia.so mapped into the crashing process...

Take a look at either scanno's github or at the N10 lunch target i posted for the advent2 on this same forum...

REgrds, Eduardo

Eduardo,

I appreciate the reply. For reference here is what I'm seeing in my serial dump (dmesg).

http://pastebin.com/L5ZEVVrU

The error occurs on lines 994-1248. Above you mentioned that there were some flags that needed to be properly set. I looked through scanno's git but didn't see anything sticking out too much to me. Can you point me in the right direction there? Thank you for your help.

-fosser2

0

Share this post


Link to post
Share on other sites

Posted · Report post

Eduardo,

I appreciate the reply. For reference here is what I'm seeing in my serial dump (dmesg).

http://pastebin.com/L5ZEVVrU

The error occurs on lines 994-1248. Above you mentioned that there were some flags that needed to be properly set. I looked through scanno's git but didn't see anything sticking out too much to me. Can you point me in the right direction there? Thank you for your help.

-fosser2

Those errors means you ran out of video memory... The problem is that, while bootanimation was allocating video surfaces (probably OpenGL ES textures), there was no more video memory available to allocate the required ones. Usually, that results in the app trying to allocate textures crashing (specially is it does not check for NULL pointers to textures, as that is the way opengl informs it failed to allocate the surface). When you see

>Full compaction triggered

followed by

>Relocated 0 chunks,

that means you ran out of video memory. The kernel tries desperately to garbage collect unused video memory fragments to try to fullfill the user request, but, as all textures are being used, it fails (Relocated 0 chunks) ...

You need to allocate more video memory. That is the only way to fix this problem...



1

Share this post


Link to post
Share on other sites

Posted · Report post

Regarding misc work i am doing in the kernel side for vega:

Posting 3 things, not tested yet. I have to build a full rom for the vega to try some of them:

1) Simple IO scheduler (SIO). Tries to improve latency and throughput from access to the mmc card. Untested, but it should work. Just select it in the block layer kernel config.. It is said to be the best IO scheduler for android when using it for common tasks

2) Lulzactiveq: And improved cpufreq that tries to get the most interactive performance by using the less possible power. It is said to be the best , but could require some parameter tunings. Should be safe to try

3) Tegra2 overclocking to 1.7Ghz and GPU overclocking to 400Mhz. This is completely untested, and it could be dangerous. I ported it from the NotionInk Adam kernel, and the 1.7Ghz setting was taken from the CM7 kernel. I haven't tried this yet. I would appreciate if someone could take a look at the code and tell me if something seems suspicious or wrong. As soon as i build a ROM for the Vega, i will try it myself. (i need to be able to build from AOSP in order to start debugging the modifications i did to the bluedroid stack in order to test and fix it)

Regards,

Eduardo

simple io scheduler.rar

lulzactiveq cpufreq.rar

oc to 1.7Ghz.rar

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.