Android 4.4 Video

Discuss Android on the Wandboard, as well as app development for or on the Wandboard.

Android 4.4 Video

Postby Fil » Wed Oct 01, 2014 1:12 pm

Hi all,
I have one WBquad rev B1.
I've downloaded both the image file and the source for Android 4.4 Kit Kat, and the results are the same.
The Android 4.3 plays movies really well, and the cpu load is small ( top exibhits some 3 to 4% ).
Android 4.4 instead plays movies bad, the cpu load is higher than the 4.3 ( some 15% ) and also the power consumption .
This indicates to me the acceleration is not enabled in some way, and sometimes I get the message "VPU : timeout" on a couple of movies.
I tried to use different vpu firmwares, but the only result is that the VPU does'nt print out the timeout message, videos still remain crappy and audio is out of sync.
Any idea ?
Thank you very much in advance.
Filippo
Fil
 
Posts: 7
Joined: Wed Oct 01, 2014 12:47 pm

Re: Android 4.4 Video

Postby Richard » Thu Oct 02, 2014 5:23 am

Hello, Fil:

The following is the test I did.
When playing video, there is no big difference in CPU usage between android 4.3 and android 4.4.
It explains that video acceleration works in android 4.4.

But for video format support, it indeed has difference between android 4.3 and android 4.4.
(For example, android 4.4 doesn't support ".mov" format)

What I guess is that freescale codec in android 4.4 has poor support for the video you play.
So, it falls back to software decoding.

Do you have the link of the video you play for downloading?
And what player you use to play video?

=====================================================================================================
Test video:
http://videos.hd-trailers.net/star-trek ... p-HDTN.mp4

The test movie file is in usb storage.
The uEnv.txt is set as 1080P mode.

For wandboard DL:
android 4.3 -
PID PR CPU% S #THR VSS RSS PCY UID Name
1390 0 14% S 15 255144K 15940K fg media /system/bin/mediaserver
1387 1 3% S 10 268040K 10344K fg system /system/bin/surfaceflinger

/system/bin/mediaserver runs between 11%~14%

android 4.4 -
PID PR CPU% S #THR VSS RSS PCY UID Name
1471 1 13% S 14 220908K 9836K fg media /system/bin/mediaserver
1468 0 3% S 13 220252K 5968K fg system /system/bin/surfaceflinger

/system/bin/mediaserver runs between 10%~14%

For wandboard QUAL:
android 4.3 -
PID PR CPU% S #THR VSS RSS PCY UID Name
1434 3 6% S 20 284096K 16032K fg media /system/bin/mediaserver
1431 0 1% S 10 294880K 10232K fg system /system/bin/surfaceflinger

/system/bin/mediaserver runs between 5%~6%

android 4.4 -
PID PR CPU% S #THR VSS RSS PCY UID Name
1472 0 7% S 15 221944K 10120K fg media /system/bin/mediaserver
1469 0 1% S 12 279708K 6076K fg system /system/bin/surfaceflinger

/system/bin/mediaserver runs between 6%~7%
Richard
Site Admin
 
Posts: 138
Joined: Tue Dec 17, 2013 6:57 am

Re: Android 4.4 Video

Postby Fil » Fri Oct 03, 2014 8:49 am

Hi Richard,
thank you so much for your fast reply.
I did exactly what you told me, I've downloaded the movie you used in your tests and my results are the same as yours.
The video is good both on 4.3 and 4.4, power consumption is almost the same and the cpu load too.

The movie that exhibits the behaviour I described you ( video freezes often, some "VPU blocking: timeout" messages, audio out of sync and high power consumption ) is http://mb.novasis.it:7777 where you will find a single file called "ottaviani".
On the 4.3 this file plays well, no bump or vpu timeout, the audio is in sync and the power consumption is only slightly higher than android only.
As you told me, I believe the point should be on the Freescale side, maybe I will try to use the fsl-proprietary from the 4.3 to understand better.
Be patient please as our connection is quite slow and the movie is some 380MB long.

Another point, but maybe I need to open a new post, is the audio on the Wand, on both 4.3 and 4.4
It seems to me the SGTL500 driver is not loaded, even if I have the driver enabled in the kernel config, and I can't see in /sys/devices/platform/soc-audio.1 the SGTL5000 device name
If I look at soc-audio.3 I can see the IMX SPDIF directory and in the soc-audio.4 I see the IMX HDMI TX directory for the HDMI, but there is nothing similar in the soc-audio.1 that should be related to the SGTL5000 device.
Btw, in linux only it runs fine.

Thank you again and best regards
Fil
 
Posts: 7
Joined: Wed Oct 01, 2014 12:47 pm

Re: Android 4.4 Video

Postby Richard » Thu Oct 09, 2014 3:52 am

Hello, Fil:

When I play 'ottaviani.mp4' in android 4.4, I didn't see the "VPU blocking: timeout" messages.
But it indeed freezes often.
'logcat' shows:
I/MediaPlayer( 2548): Info (700,325)
I/MediaPlayer( 2548): Info (700,379)
I/MediaPlayer( 2548): Info (700,410)
I/MediaPlayer( 2548): Info (700,464)
I/MediaPlayer( 2548): Info (700,495)
I/MediaPlayer( 2548): Info (700,549)
I/MediaPlayer( 2548): Info (700,579)
I/AwesomePlayer( 1481): we're much too late (0.50 secs), video skipping ahead

I already feedback this issue to FAE.


For SGTL5000 device name, you can see 'HiFi' under /sys/devices/platform/soc-audio.1/
root@wandboard:/ # ls /sys/devices/platform/soc-audio.1/
HiFi
driver
modalias
power
sound
subsystem
uevent


'HiFi' is the name for SGTL5000, and it's defined in ASOC driver(imx-sgtl5000.c).
static struct snd_soc_dai_link imx_sgtl5000_dai[] = {
{
.name = "HiFi",
.stream_name = "HiFi",
.codec_dai_name = "sgtl5000",
.codec_name = "sgtl5000.1-000a",
.cpu_dai_name = "imx-ssi.1",
.platform_name = "imx-pcm-audio.1",
.init = imx_3stack_sgtl5000_init,
.ops = &imx_sgtl5000_hifi_ops,
},
};


Best Regards,

Richard
Richard
Site Admin
 
Posts: 138
Joined: Tue Dec 17, 2013 6:57 am

Re: Android 4.4 Video

Postby Fil » Tue Oct 14, 2014 11:09 am

Hi Richard,
Video : yes it is, I've seen the "VPU blocking timeout" message only three times, but the result is the same, movie freezes really often. I will look better using logcat. On the 4.3 it runs fine. Thank you for your feedback and for your further help.
Audio : I can't see any SGTL5000 related message typing dmesg ( so : kernel trouble ? ) , and I can't see the HiFi in the /sys/devices/platform/soc-audio.1. So strange. But any help will be appreciated, thank you.
Regards
Fil
 
Posts: 7
Joined: Wed Oct 01, 2014 12:47 pm

Re: Android 4.4 Video

Postby Fil » Fri Oct 17, 2014 8:08 am

Hello Richard,
I went back to 4.3, using your wandboard_android-4.3_fullsource_20140625.tar.xz.
I've found that the sound/soc/imx/imx-sgtl5000.c in the kernel_imx for android is different from the one in your wandboard-sdk-20140519.
In the android imx-sgtl5000.c I don't have the call to the imx_sgtl5000_edm_init function, so the sgtl5000 is not initialized.
Adding the function and the call, and changing the audio_policy.conf the 4.3 runs fine.
If you think this can be useful I can send you the details of my mods.

Now I'm fighting with the audio switch, I would like to select the audio output from an I/O bit that senses if the headphone is connected.
Again, any help will be appreciated as I'm quite new in android.
Thank you and best regards
Fil
 
Posts: 7
Joined: Wed Oct 01, 2014 12:47 pm

Re: Android 4.4 Video

Postby Richard » Mon Oct 20, 2014 6:08 am

Hello Fil,

It's great to find sgtl5K detail.
Would you please send me your mods ?
I think it's good to have this fix in the next android release.

For wandboard schematic, there is no GPIO connected for headphone.
So, you may need to add a sky-wire.

I have never done this before.
I just come up with my idea. :ugeek:
In this article, it describe two mechanism for headphone detection in android.
http://www.programering.com/a/MDM2YjMwATk.html

For the first mechanism, apply this patch for sgtl5k driver:
https://gitorious.org/u-mobo/linux-imx/ ... 1ea1db33f8
Then add code to report input event for android headphone detection.

For the second mechanism, I think maybe it's easier than first one.
Implement a switch driver to create sysfs interface(/sys/devices/virtual/switch/h2w).


Thank you~!

Richard
Richard
Site Admin
 
Posts: 138
Joined: Tue Dec 17, 2013 6:57 am

Re: Android 4.4 Video

Postby Fil » Wed Oct 22, 2014 7:25 am

Hello Richard,
I've compressed the imx-sgtl5000.c file and is in attach.

The headphone : I can get one gpio, no problems.
But to be absolutely honest I've not really understood what you are telling me about android integration of the switch detect, but leave me a couple of hours and I fed back you what I have understood. Well,at least I hope.
Regards
Attachments
imx-sgtl5000.c.zip
imx-sgtl5000.c in kernel_imx/sound/soc/imx
(3.37 KiB) Downloaded 90 times
Fil
 
Posts: 7
Joined: Wed Oct 01, 2014 12:47 pm

Re: Android 4.4 Video

Postby Fil » Thu Oct 30, 2014 7:36 pm

Richard.
I was busy on other things, can you kindly explain me better how to implement a simple audio switch using a gpio ?
Is the sgtl5000.c file useful?
Regards
Fil
 
Posts: 7
Joined: Wed Oct 01, 2014 12:47 pm

Re: Android 4.4 Video

Postby Melissa836 » Fri Jun 16, 2017 6:13 am

under the "Form aspect" and also pick "Test" under right edge. showbox for pc an endless online streaming party of home entertainment.
Melissa836
 
Posts: 1
Joined: Fri Jun 16, 2017 6:12 am


Return to Software - Android

Who is online

Users browsing this forum: No registered users and 8 guests

cron