Why is Crystal HD not helping?
#1
I'm turning and old(er) laptop into a secondary media machine, so I bought a Crystal HD card for it. Here are the specs:

Dell Inspiron 1501
AMD Turion 64 2ghz
2 gb RAM
ATI Radeon Xpress 200m IGP

I bought the AzureWave AW-VD920H, which has the Broadcom BCM970015 chipset.

I have a fresh install of Linux Mint 12 (amd64), and I build the crystalhd driver version 3.10.0 and library from git. I'm running XBMC Eden pre3 from the unstable PPA. I am able to enable the Crystal HD option in the video settings. I left everything else as the default.

I am testing with the "killasampla" file. I notice that when I play it fullscreen without crystalhd enabled, it plays but is choppy. The audio studders as well. CPU use is at 100%

Debug Log Without Crystal HD

But when I enable crystalhd, it doesn't quite studder, but it does appear to lag and then catch up at regular, frequent intervals. In addition, there are many blocky artifacts on the screen, particularly at the beginning, making the scene fairly unrecognizable (these do not appear when crystalhd is disabled). On the upside, at least the sound plays smoothly. CPU use is at 60%

Debug Log With Crystal HD

So far, I'm disappointed. This behavior of uneven playback occurs with any h264 or mpeg2 file I play, even ones that play back flawlessly with crystalhd disabled.

In case it helps:
Code:
05:00.0 Multimedia controller: Broadcom Corporation BCM70015 Video Decoder [Crystal HD]
    Subsystem: Broadcom Corporation BCM70015 Video Decoder [Crystal HD]
    Flags: bus master, fast devsel, latency 0, IRQ 18
    Memory at c0200000 (64-bit, non-prefetchable) [size=64K]
    Memory at c0800000 (64-bit, non-prefetchable) [size=8M]
    Capabilities: [48] Power Management version 3
    Capabilities: [60] Vendor Specific Information: Len=6c <?>
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [cc] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [13c] Virtual Channel
    Kernel driver in use: crystalhd
    Kernel modules: crystalhd

and...

Code:
theophile@graven ~ $ dmesg | grep rystal
[ 1303.973756] Loading crystalhd v3.10.0
[ 1303.974055] crystalhd 0000:05:00.0: Starting Device:0x1615
[ 1303.974097] crystalhd 0000:05:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 1303.985476] crystalhd 0000:05:00.0: MSI request failed..
[ 1304.056053] crystalhd 0000:05:00.0: setting latency timer to 64
[ 9052.631910] crystalhd 0000:05:00.0: Opening new user[0] handle
[ 9053.354351] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[12035.851764] crystalhd 0000:05:00.0: Opening new user[0] handle
[12036.562265] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[12068.064598] crystalhd 0000:05:00.0: Opening new user[0] handle
[12096.748350] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[12099.818724] crystalhd 0000:05:00.0: Opening new user[0] handle
[12128.574411] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[12200.638783] crystalhd 0000:05:00.0: Opening new user[0] handle
[12226.844706] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[12375.133133] crystalhd 0000:05:00.0: Opening new user[0] handle
[12375.204098] crystalhd 0000:05:00.0: Closing user[0] handle with mode ffffffff
[12378.952172] crystalhd 0000:05:00.0: Opening new user[0] handle
[12379.028071] crystalhd 0000:05:00.0: Closing user[0] handle with mode ffffffff
[12379.066309] crystalhd 0000:05:00.0: Opening new user[0] handle
[12379.136044] crystalhd 0000:05:00.0: Closing user[0] handle with mode ffffffff
[12379.172672] crystalhd 0000:05:00.0: Opening new user[0] handle
[12446.485664] crystalhd 0000:05:00.0: Closing user[0] handle with mode 1c200
[12449.844937] crystalhd 0000:05:00.0: Opening new user[0] handle
[12449.916146] crystalhd 0000:05:00.0: Closing user[0] handle with mode ffffffff
[12449.952628] crystalhd 0000:05:00.0: Opening new user[0] handle
[12450.024094] crystalhd 0000:05:00.0: Closing user[0] handle with mode ffffffff
[12450.060563] crystalhd 0000:05:00.0: Opening new user[0] handle
[12467.016111] crystalhd 0000:05:00.0: Closing user[0] handle with mode 1c200
[12467.039000] crystalhd 0000:05:00.0: crystalhd_dioq_find_and_fetch: Invalid arg
[12467.039009] crystalhd 0000:05:00.0: Act-Q: PostIx:1 L0Sts:0 L1Sts:0 current L:0 tag:70029070 comp:0
[12467.039014] crystalhd 0000:05:00.0: crystalhd_dioq_fetch: Invalid arg
[12467.039018] crystalhd 0000:05:00.0: ioq not initialized
[12467.039278] crystalhd 0000:05:00.0: crystalhd_dioq_fetch: Invalid arg
[12467.039281] crystalhd 0000:05:00.0: ioq not initialized
[12469.458043] crystalhd 0000:05:00.0: Opening new user[0] handle
[12469.528117] crystalhd 0000:05:00.0: Closing user[0] handle with mode ffffffff
[12469.564751] crystalhd 0000:05:00.0: Opening new user[0] handle
[12469.636068] crystalhd 0000:05:00.0: Closing user[0] handle with mode ffffffff
[12469.672934] crystalhd 0000:05:00.0: Opening new user[0] handle
[12500.161668] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 1c200
[12626.444542] crystalhd 0000:05:00.0: Opening new user[0] handle
[12627.145242] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[12672.978167] crystalhd 0000:05:00.0: Opening new user[0] handle
[12741.051618] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[12751.760446] crystalhd 0000:05:00.0: Opening new user[0] handle
[12776.232150] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[12808.069829] crystalhd 0000:05:00.0: Opening new user[0] handle
[12890.712427] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[13211.437802] crystalhd 0000:05:00.0: Opening new user[0] handle
[13212.137231] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[13362.277402] crystalhd 0000:05:00.0: Opening new user[0] handle
[13362.984482] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[13377.837166] crystalhd 0000:05:00.0: Opening new user[0] handle
[13406.704699] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[13621.322669] crystalhd 0000:05:00.0: Opening new user[0] handle
[13622.028204] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[13639.338578] crystalhd 0000:05:00.0: Opening new user[0] handle
[13668.265358] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00
[13733.991178] crystalhd 0000:05:00.0: Opening new user[0] handle
[13734.694862] crystalhd 0000:05:00.0: Closing user[0] handle via ioctl with mode 417a00

I'm hoping that there's some tweaking or configuration I can do to iron out these problems but I haven't found anything. Can anyone suggest something I might try here? Thanks.
Reply
#2
I dont think you will get KillaSampl working correctly
I believe that is a test video (worst case situation)
Skip this test video - what else are you testing with? Do they have problems?
Reply
#3
That sample you are referring to will not give you any useful information. CrystalHD supports H.264 [email protected] maximum, and that pesky sample is probably a lot heavier than the [email protected] spec. It will make your CrystalHD cringe, it will make XvBA cringe. It will only work on VDPAU and maybe nVidia/ATi on Windows.

Try some normal stuff:
Sintel 1080p
Big Buck Bunny 1080p
Elephant's Dream 1080p
The last one is the heaviest one, with peaks over 30 Mbps. All [email protected] video.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#4
I'll try those samples as soon as I get a chance. But I also noticed the same behavior on MPEG2 files (both 720p and 1080i) recorded from live TV by an HDHomerun device. I get that Crystal HD might not be able to handle something as intense as killasampla, but isn't it supposed to handle MPEG2?
Reply
#5
It should, according to the Broadcom product page. Don't know how it handles interlacing though. The only way to find out what's wrong is a) to pull up the diagnostic overlay during playback and b) read your Xbmc log (and turn debug on if necessary).
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#6
I was able to test Sintel this morning and noticed the same behavior. With CHD enabled, it played back but the video would lag or "pulse" at a fairly regular frequency. With CHD disabled, the video played back more smoothly, though with occasional dropped frames and CPU usage at 100%.

I'm going to try to set up a camera to record the behavior with the XBMC debug console showing.
Reply
#7
You don't need a camera. Simply take screenshots in Xbmc during playback.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#8
when you did the fresh install of mint did you check for un assigned drivers specifically for video?
Proper Usage of a debug log
If I managed to help you in any way, please add to my reputation
Reply
#9
(2012-03-14, 20:42).:B:. Wrote: You don't need a camera. Simply take screenshots in Xbmc during playback.

Well, the camera idea mainly was to demonstrate what the rendered output actually looks like.

(2012-03-14, 20:51)Hudson_Hawk04 Wrote: when you did the fresh install of mint did you check for un assigned drivers specifically for video?

Do you mean the existence of available binary drivers, such as what happens when you do a fresh install with an nVidia card? If so, no, that icon did not appear, and in any event, I think ATI dropped support for the Radeon Xpress 200m from fglrx years ago. :-(
Reply
#10
I did some looking in the log with crystal hd enabled and found a few errors the first being :

Failed to connect to LIRC. Retry in 40s

Following that error your CHD card seems to enter an endless loop (as far as I can tell) until the process is killed.

I dont think it ever connected could have missed it though. I did some searching on the error and found the following thread:
http://forum.xbmc.org/showthread.php?tid=73561 while its not your exact setup it might be a place to start granted its an older thread.

in post six you said it would "lag or pulse" would you also consider the playback to be jerky or skip? I had an issue with this on my atv1 with crystalbuntu and some of my media would exhibit that behavior..I was finally able to fix the problem by tweaking my audio settings. Hope this helps
Proper Usage of a debug log
If I managed to help you in any way, please add to my reputation
Reply
#11
Thanks for the ideas. I'm not using LIRC and I don't see an easy way to disable it, but I'm not sure it would cause video playback problems like this. And as for the audio, while anything is possible, I currently have it set to the default stereo settings.

Okay, here's some more debug info, all based on Sintel 1080p.

First, without Crystal HD. Here's the debug log. And here are two screenshots of playback with the debug info, and the second one with the console open:

Image

Image

And then with Crystal HD enabled, here's the debug log. And screenshots:

Image

Image
Reply
#12
Anyone have any ideas? Would it help if I posted a video showing what the output looks like?
Reply
#13
Your last pictures clearly show ff-h264 being used as a decoder, and that's Xbmc's internal ffmpeg decoder - which does everything in software. THere is a problem with either the userspace library or the crystalhd kernel driver on your setup.

It would be easier if you could remove those three lines (LOG/MEM/CPU) that show the whole time, the diagnostic overlay actually shows all that info as well, that's enough to try to fix your issue.

It looks like Xbmc loads then unloads the CrystalHD library.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#14
I just noticed that I actually posted the screenshots backwards. The first two are with chd enabled, the second two without. I'll try to post a couple more without the debug overlay.
Reply
#15
Ok. I have the AppleTV at my place for a few days and I just tested Sintel from a local HD. 40% CPU usage, CrystalHD decoder active. Works fine, of course, loading the info or codec overlay will make playback stutter, something only a rewind of fast forward fixes for me (that is, jumping 30s back or forth). If I don't do that, it will spend like a minute (or more) catching up and filling the buffer again. I can post a screenshot if you think that will help you.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply

Logout Mark Read Team Forum Stats Members Help
Why is Crystal HD not helping?0