Hi, experts,
We have an i.MX53 SABRE tablet and run Android r10.4 downloaded from freescale. We have noticed that while playing Youtube videos, there is an occasional hiccup in audio.
After testing about that, the occasional hiccup happens when all of these conditions below :
This issue doesn't exist when playing locally or other kinds of encodings.
The result of logcat shows nothing about it.
I think there were some problem when OMXPlayer parses MP4 from HTTP server ?
Maybe the buffer is too small to play smoothly ? But where do we modify the size of buffer ?
Where can we get the source code of OMXPlayer for Android 2.3.7 ?
Please help us about this issue. Thank you so much in advance.
** Update **
I am sorry about my poor English. Please feel free to ask me, if there was anything wrong with my wording or expressing.
And here are the video format we have tried.
File Format | Video Encoding Type | Audio Encoding Type | Vidoes in a HTTP server in LAN | Videos in an USB disk |
---|---|---|---|---|
MP4 | H.264 | AAC | hiccup | no problem |
MP4 | H.264 | MP3 | hiccup | no problem |
MP4 | H.264 | No audio | hiccup | no problem |
MP4 | MPEG-4 | AAC | no problem | no problem |
AVI | H.264 | MP3 | no problem | no problem |
3GP | H.263 | AAC | no problem | no problem |
MKV | H.264 | AAC | no problem | no problem |
** Update **
It is not a Browser issue. We modified ApiDemos (R10.4/development/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.java) and test. The "hiccups" exists.
** Update **
I tried to make VPU buffer size larger, but not sure where to do that.
Modification in mxc_vpu_data may not affect OMXPlayer. New tests are listed below:
1. .iram_enable = true, and set .iram_size from 0x14000 to 0x20000. The iram driver failed while probing. Boot log:
In fsh_shw_smalloc (km): partition_base:d09b0000 partition_base_phys: 07000000 writing UMID and MAP to secure the partition ------------[ cut here ]------------ WARNING: at arch/arm/plat-mxc/iram.c:41 iram_alloc+0x50/0x88() Modules linked in: [<c013258c>] (unwind_backtrace+0x0/0xf0) from [<c0154584>] (warn_slowpath_common+0x4c/0x64) [<c0154584>] (warn_slowpath_common+0x4c/0x64) from [<c01545b4>] (warn_slowpath_null+0x18/0x1c) [<c01545b4>] (warn_slowpath_null+0x18/0x1c) from [<c0140470>] (iram_alloc+0x50/0x88) [<c0140470>] (iram_alloc+0x50/0x88) from [<c03d5880>] (vpu_dev_probe+0x48/0x288) [<c03d5880>] (vpu_dev_probe+0x48/0x288) from [<c030cb7c>] (platform_drv_probe+0x18/0x1c) [<c030cb7c>] (platform_drv_probe+0x18/0x1c) from [<c030bce8>] (driver_probe_device+0xc8/0x184) [<c030bce8>] (driver_probe_device+0xc8/0x184) from [<c030be04>] (__driver_attach+0x60/0x84) [<c030be04>] (__driver_attach+0x60/0x84) from [<c030b4f8>] (bus_for_each_dev+0x48/0x84) android_usb gadget: high speed config #1: android [<c030b4f8>] (bus_for_each_dev+0x48/0x84) from [<c030ae34>] (bus_add_driver+0x98/0x214) [<c030ae34>] (bus_add_driver+0x98/0x214) from [<c030c0f0>] (driver_register+0xa8/0x138) [<c030c0f0>] (driver_register+0xa8/0x138) from [<c001eb88>] (vpu_init+0xc/0x2c) unwind: Unknown symbol address c001eb88 unwind: Index not found c001eb88 ---[ end trace 4ea59c5953f42cbe ]--- usb 2-1.1: new full speed USB device using fsl-ehci and address 3 VPU initialized |
The OMXPlayer still can work, but the issue still exists. Nothing changes.
2. .iram_enable = true, and set .iram_size from 0x14000 to 0xA000. Nothing changes. The OMXPlayer issue still exists, but the frequency of "hiccups" doesn't increase.
3. .iram_enable = false. Nothing change. The OMXPlayer issue still exists, but the frequency of "hiccups" doesn't increase.
** Update **
Alternately I changed the MP4 file from 640x360 to 432x240 pixels and test again. The "hiccups" still happend.
** Update **
I have changed CONFIG_DMA_ZONE_SIZE from 96 to 118 or higher in Linux kernel source code.
Nothing changed.
** Update **
I'd tried to increase VPU DMA memory size to 8M by modifing vm_end in drivers/mxc/vpu/mxc_vpu.c.
git diff drivers/mxc/vpu/mxc_vpu.c diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c index fb6e1cf..aa25d25 100644 --- a/drivers/mxc/vpu/mxc_vpu.c +++ b/drivers/mxc/vpu/mxc_vpu.c @@ -590,10 +595,16 @@ static int vpu_mmap(struct file *fp, struct vm_area_struct *vm) if (vm->vm_pgoff && (vm->vm_pgoff == offset)) return vpu_map_vshare_mem(fp, vm); else if (vm->vm_pgoff) +{ + vm->vm_end = vm->vm_start + SZ_8M; return vpu_map_dma_mem(fp, vm); +} else +{ + vm->vm_end = vm->vm_start + SZ_8M; return vpu_map_hwregs(fp, vm); } +} |
But I still could hear the hiccups.
** Update **
We've tried to modify gpumem/gpu_memory to 128M, 192M, 256M, and 512M in the bootargs, but it still hiccupped.
** Update **
After replace with the pre-cache library and test again, the hiccups still remain.
Might this issue cause by OMXPlayer or its decoding libraries ?
訊息由此人編輯:Yokai Yang
Dear Daiane Angolini and Mau Xu,
I am really sorry for my late, and appreciate your help.
I had test the library you provided but the issue was still.
The time interval between tw hiccup is random.
My test video is too big to upload here, but play video from Youtube may show this problem easily.
Might this issue cause by OMXPlayer or its decode libraries ?
Thanks again.
Would you mind to share one youtube link which causes the problem?
Hi, Daiane,
Here is one of the links:
https://www.youtube.com/watch?v=DwAJ-v6HFmM
And the logcat said the actual link is :
I/OMXPlayer( 2158): Loading content: http://r3---sn-ipoxu-un5s.googlevideo.com/videoplayback?id=o-AGpsiBRu4ih535mitHvEWPO0HbdYPddaxLOCwbv...
So far this issue has appeared when playing all video on Youtube.
Thanks.
hi Yokai:
How long is the time interval between two hiccup? Does it occurs on fix position or random position?
Could you share your H264/MP4 file ?
thanks
Hi yokai
android OMX source code for R10.X/iMX53 is not open,
please submit service request ticket.
One can try to increase VPU memory as suggested below
iMX5 Android Gingerbread Memory Usage and Optimization
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi, Chipexpert,
Thanks for your reply.
Yes, we will submit service request ticket if we need the source code of OMXPlayer, thank you.
I am not sure how to incease VPU memory size. Should I modify in kernel? It seems the size neither in bootargs nor in android HAL.
I tried to modify the mxc_vpu_data in kernel source code but not work. Please see the updates in original post.
Would you please point out where the VPU memory size setting is ?
Thank you very much.
Dear Chipexpert,
Thanks for your reply.
We've tried to modify gpumem/gpu_memory to 128M, 192M, 256M, and 512M in the bootargs, but it still hiccupped.
This issue only happens when playing videos which is H.264 encoding, MP4 file format and replace in a HTTP server. Otherwise it works fine.
Do I really need the source code of OMXPlayer ?
Thanks again.
Best regards.
Jason.
Hi yokai.yang, I´m going to attend this topic from now.
Thanks a lot for keeping the very first post updated with your progress/testing (really, it helps a lot!)
I´m going to look internally for any patch/issue related with your issue. I update you tomorrow for the next steps.
I was not able to find any known issue rellated to your symptoms. So I escalated this as a bug for our internal team.
As soon as I get some update I let you know