crystalhd, Apple TV, 10fps - What am I doing wrong?
#1
Hello,

I have done the following so far, please let me know what I have done incorrect.

On my Hackintosh 10.5.5, w/Xcode 3.0

Code:
svn checkout http://crystalhd-for-osx.googlecode.com/svn/trunk/ crystalhd-for-osx-read-only

Code:
$ make
OBJFILES = libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o
SRCFILES = libcrystalhd_if.cpp libcrystalhd_int_if.cpp libcrystalhd_fwcmds.cpp libcrystalhd_priv.cpp libcrystalhd_fwdiag_if.cpp
LNM = libcrystalhd.dylib
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -O2 -Wall -fPIC -arch i386 -shared -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4  -c -o libcrystalhd_if.o libcrystalhd_if.cpp
libcrystalhd_if.cpp: In function ‘BC_STATUS DtsProcOutput(void*, uint32_t, BC_DTS_PROC_OUT*)’:
libcrystalhd_if.cpp:1001: warning: comparison is always true due to limited range of data type
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -O2 -Wall -fPIC -arch i386 -shared -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4  -c -o libcrystalhd_int_if.o libcrystalhd_int_if.cpp
libcrystalhd_int_if.cpp: In function ‘BC_STATUS DtsCopyRawDataToOutBuff(DTS_LIB_CONTEXT*, BC_DTS_PROC_OUT*, BC_DTS_PROC_OUT*)’:
libcrystalhd_int_if.cpp:890: warning: ‘srcWidthInPixels’ may be used uninitialized in this function
libcrystalhd_int_if.cpp: In function ‘BC_STATUS DtsCopyNV12(DTS_LIB_CONTEXT*, BC_DTS_PROC_OUT*, BC_DTS_PROC_OUT*)’:
libcrystalhd_int_if.cpp:1057: warning: ‘srcWidthInPixels’ may be used uninitialized in this function
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -O2 -Wall -fPIC -arch i386 -shared -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4  -c -o libcrystalhd_fwcmds.o libcrystalhd_fwcmds.cpp
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -O2 -Wall -fPIC -arch i386 -shared -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4  -c -o libcrystalhd_priv.o libcrystalhd_priv.cpp
g++  -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -O2 -Wall -fPIC -arch i386 -shared -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4  -c -o libcrystalhd_fwdiag_if.o libcrystalhd_fwdiag_if.cpp
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -O2 -Wall -fPIC -arch i386 -shared -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -dynamiclib -flat_namespace -undefined suppress  -o libcrystalhd.dylib libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o

Code:
sudo make install
Password:
# this is messy yes, xbmc needs the headers in /opt/local/include
if [ -d /opt/local/include ] ; then mkdir -p /opt/local/include/libcrystalhd ; fi
if [ -d /opt/local/include ] ; then cp libcrystalhd_if.h /opt/local/include/libcrystalhd/; fi
if [ -d /opt/local/include ] ; then cp ../../include/bc_dts_defs.h /opt/local/include/libcrystalhd/ ; fi
if [ -d /opt/local/include ] ; then cp ../../include/bc_dts_types.h /opt/local/include/libcrystalhd/ ; fi
mkdir -p /usr/include/libcrystalhd
cp libcrystalhd_if.h /usr/include/libcrystalhd/
cp ../../include/bc_dts_defs.h /usr/include/libcrystalhd/
cp ../../include/bc_dts_types.h /usr/include/libcrystalhd/
cp ../../firmware/fwbin/70012/bcmFilePlayFw.bin /usr/lib/
cp libcrystalhd.dylib /usr/lib/
install -m 755 libcrystalhd.dylib /usr/lib

Code:
$ xcodebuild -project BroadcomCrystalHD.xcodeproj -target BroadcomCrystalHD -configuration Deployment build
=== BUILDING NATIVE TARGET BroadcomCrystalHD WITH CONFIGURATION Deployment ===

Checking Dependencies...

<snip>
** BUILD SUCCEEDED **

*Installed Crystal HD Card in Apple TV

Scp'd BroadcomCrystalHD.kext from driver/darwin/build/Deployment/ to frontrow's home on the atv

Scp'd libcrystalhd.dylib, and bcmFilePlayFw.bin from /usr/lib on my hackintosh to frontrow's home on the atv

Code:
sudo cp -r BroadcomCrystalHD.kext /System/Library/Extensions/
sudo -S chmod -R 755 /System/Library/Extensions/BroadcomCrystalHD.kext
sudo -S chown -R root:wheel /System/Library/Extensions/BroadcomCrystalHD.kext

Code:
sudo cp libcrystalhd.dylib /usr/lib/
sudo chmod 755 /usr/lib/libcrystalhd.dylib

sudo cp bcmFilePlayFw.bin /usr/lib/

On the Apple TV...

Code:
-bash-2.05b$ cat /etc/rc.local
/sbin/turbo_kext_enabler.bin
/sbin/kextload -v /System/Library/Extensions/IOUSBFamily.kext/sbin/kextload -v /System/Library/Extensions/IOCDStorageFamily.kext
/sbin/kextload -v /System/Library/Extensions/IODVDStorageFamily.kext
/sbin/kextload -v /System/Library/Extensions/msdosfs.kext
/sbin/kextload -v /System/Library/Extensions/IOUSBMassStorageClass.kext
/sbin/kextload -v /System/Library/Extensions/AppleSMBIOS.kext
/sbin/kextload -v /System/Library/Extensions/IOSCSIArchitectureModelFamily.kext
/sbin/kextload -v /System/Library/Extensions/IOStorageFamily.kext
/sbin/kextload -v /System/Library/Extensions/cddafs.kext
/sbin/kextload -v /System/Library/Extensions/smbfs.kext
/sbin/kextload -v /System/Library/Extensions/udf.kext
/sbin/kextload -v /System/Library/Extensions/IOBluetoothFamily.kext
/sbin/kextload -v /System/Library/Extensions/IOBluetoothHIDDriver.kext
/sbin/kextload -v /System/Library/Extensions/IOHDIXController.kext
/sbin/kextload -v /System/Library/Extensions/ntfs.kext
/sbin/kextload -v /System/Library/Filesystems/fusefs.fs/Support/fusefs.kext
/sbin/kextload -v /System/Library/Extensions/BroadcomCrystalHD.kext
mount -t nfs 176.76.67.250:/groups /Users/frontrow/boxee/
-bash-2.05b$

Code:
-bash-2.05b$ ls -al /usr/lib/libcrystalhd.dylib
-rwxr-xr-x   1 root  wheel  69776 Jan  6 13:13 /usr/lib/libcrystalhd.dylib
-bash-2.05b$ ls -al /usr/lib/bcmFilePlayFw.bin
-rwxr-xr-x   1 root  wheel  2786404 Jan  6 13:14 /usr/lib/bcmFilePlayFw.bin
-bash-2.05b$ ls -al /System/Library/Extensions/ |grep Bro
drwxr-xr-x    3 root  wheel   102 Jan  5 23:31 BroadcomCrystalHD.kext
-bash-2.05b$

Restarted.

Code:
-bash-2.05b$ sudo kextload crystal/BroadcomCrystalHD.kext
Password:
kextload: extension crystal/BroadcomCrystalHD.kext is already loaded
-bash-2.05b$

Downloaded Compiled XBMC Here

(Copied from 'history')
Code:
450  wget wget http://atv-xbmc-launcher.googlecode.com/svn/tags/xbmc-info/scripts/xbmc-9.04_update.sh
451  chmod +x xbmc-9.04_update.sh
452  ./xbmc-9.04_update.sh XBMC_OSX_CrystalHD_r26455-Cybernation.dmg

Start XBMC -> System > Video > Playback > Render Method > *selected* "Broadcom Crystal HD"

6-11 fps, 70-90% CPU

Code:
-bash-2.05b$ cat xbmc.log
12:52:55 T:2684407808 M: 41394176  NOTICE: -----------------------------------------------------------------------
12:52:55 T:2684407808 M: 41390080  NOTICE: Starting XBMC, Platform: Mac OS X.  Built on Jan  6 2010 (SVN:26455M)

<snip>

12:52:56 T:2684407808 M: 39772160  NOTICE: Loaded advancedsettings.xml from special://profile/advancedsettings.xml
12:52:56 T:2684407808 M: 39772160  NOTICE: Contents of special://profile/advancedsettings.xml are...
                                            <advancedsettings>
                                              <skiploopfilter>8</skiploopfilter>
                                              <osx_gl_fullscreen>true</osx_gl_fullscreen>
                                            </advancedsettings>
12:52:56 T:2684407808 M: 39768064  NOTICE: Getting hardware information now...

<snip>

12:52:59 T:2684407808 M:  3051520   ERROR: CrystalHD: device open failed
12:52:59 T:2684407808 M:  3051520    INFO: CrystalHD: broadcom crystal hd not found
12:52:59 T:2684407808 M:  3047424  NOTICE: initialize done
12:52:59 T:2684407808 M:  3043328  NOTICE: Running the application...

<snip>

Entire xbmc.log here --> http://pastebin.com/m684e7c4e

Movie that was played was a 1080p, x264 MKV

TIA
Reply

Logout Mark Read Team Forum Stats Members Help
crystalhd, Apple TV, 10fps - What am I doing wrong?0