Problems with BCM70015: Buffer Underrun?
#16
davilla Wrote:Let me qualify this, h.264 might be ok.

Hi guys,

I have this exact same problem.

I've tried the commands throughout this thread, but i'm not getting any hits on the files mentioned.

when i do the following, i get nothing.

Code:
grep libcrystalhd.0.1 xbmc.bin

ls -lart libcrystalhd.so*

Anything else I can try? I'm running XBMC r33078 and driver 3.6.0 is installed.
Reply
#17
ds129 Wrote:Hi guys,

I have this exact same problem.

I've tried the commands throughout this thread, but i'm not getting any hits on the files mentioned.

when i do the following, i get nothing.

Code:
grep libcrystalhd.0.1 xbmc.bin

ls -lart libcrystalhd.so*

Anything else I can try? I'm running XBMC r33078 and driver 3.6.0 is installed.

r33078 should be using libcrystalhd.so.3.

1) check that dmesg shows the 3.x driver loading
2) check /usr/lib/libcrystalhd.* for libcrystalhd.so.3 lib
3) check the correct firmware is installed
4) check xbmc for libcrystalhd detection and load.
5) check xbmc has crystalhd enabled.
Reply
#18
davilla Wrote:r33078 should be using libcrystalhd.so.3.

1) check that dmesg shows the 3.x driver loading
2) check /usr/lib/libcrystalhd.* for libcrystalhd.so.3 lib
3) check the correct firmware is installed
4) check xbmc for libcrystalhd detection and load.
5) check xbmc has crystalhd enabled.

Hi davilla,

dmesg

Code:
BroadcomCrystalHD::start
crystalhd_hw_open: setting up functions, device = Flea
DDR-2 Detected
Opening HW. hw:0x1ebf004, hw->adp:0x1f92700
BroadcomCrystalHD: Found HW and started driver SW.
netsmb_dev: loaded
Opening new user[0] handle
crystalhd_hw_open: setting up functions, device = Flea
DDR-2 Detected
Opening HW. hw:0x2278004, hw->adp:0x1f92700
BroadcomCrystalHD opened
allocated 18 elem
Initializing Dio pool 10 1024 305c 0x1dfc664
[crystalhd_flea_download_fw]: Sz:864276
[crystalhd_flea_download_fw]: step 1. Enable scrubbing
[crystalhd_flea_download_fw]: step 2. Poll for SCRAM_KEY_DONE_INT
[crystalhd_flea_download_fw]: step 3. Write the BORCH and STARCH addresses. f6004:d2fff, f6008:d2fff
[crystalhd_flea_download_fw]: step 4. Write the firmware to DRAM. Sz:864256 Bytes
[crystalhd_flea_download_fw]: step 5. Write the signature to CMAC register.
[crystalhd_flea_download_fw]: step 6. Write the ARM run bit to 1.
[crystalhd_flea_download_fw]: step 7. Poll for Boot Verification done/failure interrupt.
[crystalhd_flea_download_fw]: step 7. Done  RetVal:400018
[crystalhd_flea_download_fw]: ..... Complete.
crystalhd_flea_do_fw_cmd entered

kextstat

Code:
75    0 0x307d8000 0x18000    0x17000   com.broadcom.crystalhd.driver (3.6.0) <5 4 3 2>

xbmc.log shows crystalhd loaded.

Code:
21:15:42 T:2684407808 M: 11440128  NOTICE: Setup SDL
21:15:42 T:2684407808 M: 10440704  NOTICE: load settings...
21:15:42 T:2684407808 M: 10403840   DEBUG: SECTION:LoadDLL(libcrystalhd.dylib)
21:15:42 T:2684407808 M: 10375168   DEBUG: Loading: libcrystalhd.dylib
21:15:43 T:2684407808 M:  6320128   DEBUG: CrystalHD(new API): device opened
21:15:43 T:2684407808 M:  6299648  NOTICE: special://profile/ is mapped to: spe$
21:15:43 T:2684407808 M:  6295552  NOTICE: loading special://masterprofile/guis$
21:15:43 T:2684407808 M:  5996544  NOTICE: Getting hardware information now...
21:15:43 T:2684407808 M:  5992448    INFO: Using digital output

ls /usr/lib/libcrystalhd.*

Code:
/usr/lib/libcrystalhd.dylib

I don't see the libcrystalhd.so.3 file

But... how do i check the firmware again? A bit fuzzy.


The Allow Hardware Acceleration (CrystalHD) is available in xbmc Setting->Videos->Playback.
Reply
#19
ds129 Wrote:Hi davilla,

dmesg

Code:
BroadcomCrystalHD::start
crystalhd_hw_open: setting up functions, device = Flea
DDR-2 Detected
Opening HW. hw:0x1ebf004, hw->adp:0x1f92700
BroadcomCrystalHD: Found HW and started driver SW.
netsmb_dev: loaded
Opening new user[0] handle
crystalhd_hw_open: setting up functions, device = Flea
DDR-2 Detected
Opening HW. hw:0x2278004, hw->adp:0x1f92700
BroadcomCrystalHD opened
allocated 18 elem
Initializing Dio pool 10 1024 305c 0x1dfc664
[crystalhd_flea_download_fw]: Sz:864276
[crystalhd_flea_download_fw]: step 1. Enable scrubbing
[crystalhd_flea_download_fw]: step 2. Poll for SCRAM_KEY_DONE_INT
[crystalhd_flea_download_fw]: step 3. Write the BORCH and STARCH addresses. f6004:d2fff, f6008:d2fff
[crystalhd_flea_download_fw]: step 4. Write the firmware to DRAM. Sz:864256 Bytes
[crystalhd_flea_download_fw]: step 5. Write the signature to CMAC register.
[crystalhd_flea_download_fw]: step 6. Write the ARM run bit to 1.
[crystalhd_flea_download_fw]: step 7. Poll for Boot Verification done/failure interrupt.
[crystalhd_flea_download_fw]: step 7. Done  RetVal:400018
[crystalhd_flea_download_fw]: ..... Complete.
crystalhd_flea_do_fw_cmd entered

kextstat

Code:
75    0 0x307d8000 0x18000    0x17000   com.broadcom.crystalhd.driver (3.6.0) <5 4 3 2>

xbmc.log shows crystalhd loaded.

Code:
21:15:42 T:2684407808 M: 11440128  NOTICE: Setup SDL
21:15:42 T:2684407808 M: 10440704  NOTICE: load settings...
21:15:42 T:2684407808 M: 10403840   DEBUG: SECTION:LoadDLL(libcrystalhd.dylib)
21:15:42 T:2684407808 M: 10375168   DEBUG: Loading: libcrystalhd.dylib
21:15:43 T:2684407808 M:  6320128   DEBUG: CrystalHD(new API): device opened
21:15:43 T:2684407808 M:  6299648  NOTICE: special://profile/ is mapped to: spe$
21:15:43 T:2684407808 M:  6295552  NOTICE: loading special://masterprofile/guis$
21:15:43 T:2684407808 M:  5996544  NOTICE: Getting hardware information now...
21:15:43 T:2684407808 M:  5992448    INFO: Using digital output

ls /usr/lib/libcrystalhd.*

Code:
/usr/lib/libcrystalhd.dylib

I don't see the libcrystalhd.so.3 file

But... how do i check the firmware again? A bit fuzzy.


The Allow Hardware Acceleration (CrystalHD) is available in xbmc Setting->Videos->Playback.

That's because libcrystalhd.so.3 is a ref to crystalhd under Linux and not OSX. Crystalhd in XBMC is supported under both OSX and Linux, the how's and whys are different so it's important to keep this in mind as others don't necessary post which OS they are under.

md5 bcm70012fw.bin
MD5 (bcm70012fw.bin) = 47a30682b1b7355c2238f5d5f1920bcb

md5 bcm70015fw.bin
MD5 (/bcm70015fw.bin) = 71d49df01f360f1581a1cfcf84bd1cfc
Reply
#20
davilla Wrote:That's because libcrystalhd.so.3 is a ref to crystalhd under Linux and not OSX. Crystalhd in XBMC is supported under both OSX and Linux, the how's and whys are different so it's important to keep this in mind as others don't necessary post which OS they are under.

md5 bcm70012fw.bin
MD5 (bcm70012fw.bin) = 47a30682b1b7355c2238f5d5f1920bcb

md5 bcm70015fw.bin
MD5 (/bcm70015fw.bin) = 71d49df01f360f1581a1cfcf84bd1cfc

Oh i see. Pardon my noobness. Smile I'm on ATV.

My md5 of the above .bin files are exactly like yours.

Code:
bash-2.05b# md5 bcm70012fw.bin
MD5 (bcm70012fw.bin) = 47a30682b1b7355c2238f5d5f1920bcb
bash-2.05b# md5 bcm70015fw.bin
MD5 (bcm70015fw.bin) = 71d49df01f360f1581a1cfcf84bd1cfc

Is there anything else I can do pls?
Reply
#21
ds129 Wrote:Oh i see. Pardon my noobness. Smile I'm on ATV.

My md5 of the above .bin files are exactly like yours.

Code:
bash-2.05b# md5 bcm70012fw.bin
MD5 (bcm70012fw.bin) = 47a30682b1b7355c2238f5d5f1920bcb
bash-2.05b# md5 bcm70015fw.bin
MD5 (bcm70015fw.bin) = 71d49df01f360f1581a1cfcf84bd1cfc

Is there anything else I can do pls?

Describe your problem again with details Smile Just saying "me too" is not enough. There are about 1/2 dozen threads about crystalhd that I'm following with many hours between posts so I don't remember details about specific issues. and since others also post in those threads, I'd have to constantly go back and figure out what the context was, way too busy to be doing that.
Reply
#22
davilla Wrote:Describe your problem again with details Smile There are about 1/2 dozen threads about crystalhd that I'm following with many hours between posts so I don't remember details about specific issues. and since others also post in those threads, I'd have to constantly go back and figure out what the context was, way too busy to be doing that.

Sorry. My problem is exactly the same as vengeance's. "Problems with BCM70015: Buffer Underrun". But I'm on Apple TV.

I can't play 1080p .mov, it's the Iron Man 2 trailer. Out of 10 times, XMBC managed to play the video satisfactorily maybe 2 times. The other times, the video is extremely jerky and audio is out of sync. And most of the times, ATV will just freeze and have to be rebooted.

I always test with the same 1080p .mov file. I currently don't have any other 1080p videos. I also tested a 720p mkv, it played smoothly. Smile

I have set XBMC to use "Audio Sync" in Videos Settings.
Reply
#23
ds129 Wrote:Sorry. My problem is exactly the same as vengeance's. "Problems with BCM70015: Buffer Underrun". But I'm on Apple TV.

I can't play 1080p .mov, it's the Iron Man 2 trailer. Out of 10 times, XBMC managed to play the video satisfactorily maybe 2 times. The other times, the video is extremely jerky and audio is out of sync. And most of the times, ATV will just freeze and have to be rebooted.

I always test with the same 1080p .mov file. I currently don't have any other 1080p videos. I also tested a 720p mkv, it played smoothly. Smile

I have set XBMC to use "Audio Sync" in Videos Settings.

Turn off "sync display", it can increase CPU usage.
ssh in and watch "top" while playing 1080p, if %idle goes to zero, You have run out of CPU.
Reply
#24
davilla Wrote:Turn off "sync display", it can increase CPU usage.
ssh in and watch "top" while playing 1080p, if %idle goes to zero, You have run out of CPU.

Thanks for the tip. Smile

I just play the 1080p file again.

First time it played quite smoothly. "top" as below. Idle stays 0.0% for quite some time. Sometimes, it goes back up to 0.8% or 3.4%. But most of the time, it stays at 0%

Code:
Processes:  36 total, 3 running, 33 sleeping... 130 threads            01:00:24
Load Avg:  2.66, 1.48, 1.19     CPU usage:  57.3% user, 42.7% sys, 0.0% idle
SharedLibs: num =  137, resident = 3.34M code,  472K data,  560K LinkEdit
MemRegions: num =  2614, resident =  138M +  964K private, 28.6M shared
PhysMem:   120M wired, 86.8M active, 45.4M inactive,  252M used, 3.15M free
VM: 2.70G +  122M   51898(1) pageins, 48394(0) pageouts

Second time, the video froze, "top" as below. Idle is quite high, around 50% - 70%.

Code:
Processes:  36 total, 2 running, 34 sleeping... 130 threads            01:05:30
Load Avg:  1.01, 1.27, 1.19     CPU usage:  10.8% user, 20.7% sys, 68.5% idle
SharedLibs: num =  137, resident = 1.94M code,  212K data,    0B LinkEdit
MemRegions: num =  2646, resident =  165M +  672K private, 19.8M shared
PhysMem:   117M wired, 88.6M active, 44.4M inactive,  250M used, 5.43M free
VM: 2.80G +  122M   144641(1373) pageins, 143479(2829) pageouts

dmesg for second time shows error like below:

Code:
IOAudioStream[0x1c52c00]::clipIfNecessary() - Error: attempting to clip to a position more than one buffer ahead of last clip position (2c,30b9)->(2d,32c8).
IOAudioStream[0x1c52c00]::clipIfNecessary() - adjusting clipped position to (2d,30b9)
IOAudioStream[0x1c52c00]::clipIfNecessary() - Error: attempting to clip to a position more than one buffer ahead of last clip position (1,6d)->(2,349).
IOAudioStream[0x1c52c00]::clipIfNecessary() - adjusting clipped position to (2,6d)

So is it a CPU problem? When idle is 0%, it plays, when idle above 50%, video freezes.
Reply
#25
ds129 Wrote:Thanks for the tip. Smile

I just play the 1080p file again.

First time it played quite smoothly. "top" as below. Idle stays 0.0% for quite some time. Sometimes, it goes back up to 0.8% or 3.4%. But most of the time, it stays at 0%

Code:
Processes:  36 total, 3 running, 33 sleeping... 130 threads            01:00:24
Load Avg:  2.66, 1.48, 1.19     CPU usage:  57.3% user, 42.7% sys, 0.0% idle
SharedLibs: num =  137, resident = 3.34M code,  472K data,  560K LinkEdit
MemRegions: num =  2614, resident =  138M +  964K private, 28.6M shared
PhysMem:   120M wired, 86.8M active, 45.4M inactive,  252M used, 3.15M free
VM: 2.70G +  122M   51898(1) pageins, 48394(0) pageouts

Second time, the video froze, "top" as below. Idle is quite high, around 50% - 70%.

Code:
Processes:  36 total, 2 running, 34 sleeping... 130 threads            01:05:30
Load Avg:  1.01, 1.27, 1.19     CPU usage:  10.8% user, 20.7% sys, 68.5% idle
SharedLibs: num =  137, resident = 1.94M code,  212K data,    0B LinkEdit
MemRegions: num =  2646, resident =  165M +  672K private, 19.8M shared
PhysMem:   117M wired, 88.6M active, 44.4M inactive,  250M used, 5.43M free
VM: 2.80G +  122M   144641(1373) pageins, 143479(2829) pageouts

dmesg for second time shows error like below:

Code:
IOAudioStream[0x1c52c00]::clipIfNecessary() - Error: attempting to clip to a position more than one buffer ahead of last clip position (2c,30b9)->(2d,32c8).
IOAudioStream[0x1c52c00]::clipIfNecessary() - adjusting clipped position to (2d,30b9)
IOAudioStream[0x1c52c00]::clipIfNecessary() - Error: attempting to clip to a position more than one buffer ahead of last clip position (1,6d)->(2,349).
IOAudioStream[0x1c52c00]::clipIfNecessary() - adjusting clipped position to (2,6d)

So is it a CPU problem? When idle is 0%, it plays, when idle above 50%, video freezes.

"PhysMem: 120M wired"
this looks similar to http://forum.xbmc.org/showthread.php?tid=79312&page=2 which was fixed in crystalhd-for-osx-2.0.1.zip and the current crystalhd-for-osx-3.6.0.zip
Reply
#26
davilla Wrote:"PhysMem: 120M wired"
this looks similar to http://forum.xbmc.org/showthread.php?tid=79312&page=2 which was fixed in crystalhd-for-osx-2.0.1.zip and the current crystalhd-for-osx-3.6.0.zip

Hi davilla,

Yes, I'm using 3.6.0. I just rolled back to 2.0.1. Still the same video freeze.

Code:
Processes:  36 total, 2 running, 34 sleeping... 132 threads            01:35:25
Load Avg:  0.78, 0.73, 0.35     CPU usage:  6.2% user, 17.9% sys, 75.9% idle
SharedLibs: num =  137, resident = 2.19M code,  236K data,  264K LinkEdit
MemRegions: num =  2542, resident =  177M +  888K private, 15.2M shared
PhysMem:   110M wired, 93.3M active, 46.8M inactive,  250M used, 4.98M free
VM: 2.84G +  122M   179176(1545) pageins, 179037(1135) pageouts

PhysMem is 110M. I find that whenever my idle is very high, the video freezes. Looks like ATV is not using the CPU to process the video, that's why it freezes up?
Reply
#27
ds129 Wrote:Hi davilla,

Yes, I'm using 3.6.0. I just rolled back to 2.0.1. Still the same video freeze.

Code:
Processes:  36 total, 2 running, 34 sleeping... 132 threads            01:35:25
Load Avg:  0.78, 0.73, 0.35     CPU usage:  6.2% user, 17.9% sys, 75.9% idle
SharedLibs: num =  137, resident = 2.19M code,  236K data,  264K LinkEdit
MemRegions: num =  2542, resident =  177M +  888K private, 15.2M shared
PhysMem:   110M wired, 93.3M active, 46.8M inactive,  250M used, 4.98M free
VM: 2.84G +  122M   179176(1545) pageins, 179037(1135) pageouts

PhysMem is 110M. I find that whenever my idle is very high, the video freezes. Looks like ATV is not using the CPU to process the video, that's why it freezes up?

Wrong association, your freeze does not use much CPU Smile

Do a fresh boot, ssh in and look at top an PhysMem: usage. Launch XBMC, look again. Play video, look again. Stop video, look again, quit XBMC (back to frontrow), look again. What happens ?

If you roll back, make double sure that you do BOTH driver and lib.
Reply
#28
davilla Wrote:Wrong association, your freeze does not use much CPU Smile

Do a fresh boot, ssh in and look at top an PhysMem: usage. Launch XBMC, look again. Play video, look again. Stop video, look again, quit XBMC (back to frontrow), look again. What happens ?

If you roll back, make double sure that you do BOTH driver and lib.

Hi Davilla,

Yes. It's very weird. I did the whole process like you said, the idle fluctuates between 50-80%. Even when I play the video, the idle never goes below 30%. But, xbmc is now frozen. I'm still reading idle over 60%.

My PhysMem is 122M wired. This is not good right?

I've removed all the crytalhd .bin, .dylib and .kext files and replaced it with the old one. Still the same.

kextstat http://pastebin.com/S4nTgKZw

snapshot of top as below.

Code:
Processes:  36 total, 3 running, 1 stuck, 32 sleeping... 133 threads   23:23:59
Load Avg:  1.00, 0.81, 0.43     CPU usage:  2.5% user, 11.5% sys, 86.0% idle
SharedLibs: num =  136, resident = 2.47M code,  360K data, 44.0K LinkEdit
MemRegions: num =  2698, resident =  176M +  632K private, 13.0M shared
PhysMem:   122M wired, 86.5M active, 43.3M inactive,  252M used, 3.53M free
VM: 2.98G +  122M   384384(2050) pageins, 474544(2794) pageout
Reply
#29
ds129 Wrote:Hi Davilla,

Yes. It's very weird. I did the whole process like you said, the idle fluctuates between 50-80%. Even when I play the video, the idle never goes below 30%. But, xbmc is now frozen. I'm still reading idle over 60%.

My PhysMem is 122M wired. This is not good right?

I've removed all the crytalhd .bin, .dylib and .kext files and replaced it with the old one. Still the same.

kextstat http://pastebin.com/S4nTgKZw

snapshot of top as below.

Code:
Processes:  36 total, 3 running, 1 stuck, 32 sleeping... 133 threads   23:23:59
Load Avg:  1.00, 0.81, 0.43     CPU usage:  2.5% user, 11.5% sys, 86.0% idle
SharedLibs: num =  136, resident = 2.47M code,  360K data, 44.0K LinkEdit
MemRegions: num =  2698, resident =  176M +  632K private, 13.0M shared
PhysMem:   122M wired, 86.5M active, 43.3M inactive,  252M used, 3.53M free
VM: 2.98G +  122M   384384(2050) pageins, 474544(2794) pageout

Don't use crystalhd-for-osx-2.0.0.zip, it will grab phymem for 16 DMA buffers, that's too many for AppleTV.

Either crystalhd-for-osx-2.0.1.zip (which will show 3.5.0 in kexstat) or crystalhd-for-osx-3.6.0.zip (which will show 3.6.0 in kextstat).

As always, make sure you are using the matching libcrystalhd.dylib.
Reply
#30
davilla Wrote:Don't use crystalhd-for-osx-2.0.0.zip, it will grab phymem for 16 DMA buffers, that's too many for AppleTV.

Either crystalhd-for-osx-2.0.1.zip (which will show 3.5.0 in kexstat) or crystalhd-for-osx-3.6.0.zip (which will show 3.6.0 in kextstat).

As always, make sure you are using the matching libcrystalhd.dylib.

Yep. My kextstat shows
Code:
74    0 0x2b804000 0x18000    0x17000    com.broadcom.crystalhd.driver (3.5.0) <5 4 3 2>

Now, I've just updated to r33149 and driver 3.6.0, and rebooted. Trying to play video again and look at top... get back to you soon.
Reply

Logout Mark Read Team Forum Stats Members Help
Problems with BCM70015: Buffer Underrun?0