You are not logged in.

#1 2009-05-20 16:26:03

elegua
Member
Registered: 2008-03-28
Posts: 19

saa7164 Module Compile

I am a complete noob when it comes to compiling kernel modules, but it seems that during compilation it can't find various header files such as dma.h .

I honestly don't know where to start, but I up for a bit of learning. I would at least like to know how to set this up to compile this as new versions come out. Any help would be appreciated.

Here is the stable branch for the module: http://kernellabs.com/hg/saa7164-stable/

Last edited by elegua (2009-05-20 16:26:31)

Offline

#2 2009-05-24 19:43:29

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 202

Re: saa7164 Module Compile

I'm assembling a HTPC with the HVR-2250, so I will be compiling this too, if I can ever get onto kernellabs.com. I'll let you know how it goes.

Offline

#3 2009-05-26 04:42:51

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 202

Re: saa7164 Module Compile

OK, so I am not quite ready to start scanning channels tonight, but here is where I'm at:

wget http://kernellabs.com/hg/saa7164-stable … ip.tar.bz2

This is the entire v4l tree, which has all modules enabled. We don't need or want to build all of these.
Once you have untarred, copy the below to v4l/.config

#
# Automatically generated make config: don't edit
# Linux kernel version: KERNELVERSION
# Tue May 26 04:17:41 2009
#
CONFIG_INPUT=y
CONFIG_USB=m
CONFIG_PARPORT=m
CONFIG_FW_LOADER=y
# CONFIG_SPARC64 is not set
# CONFIG_PLAT_M32700UT is not set
CONFIG_NET=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_SND_FM801=m
# CONFIG_PXA27x is not set
# CONFIG_SGI_IP22 is not set
CONFIG_I2C=m
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_GPIO_PCA953X is not set
CONFIG_HOTPLUG=y
# CONFIG_HAVE_CLK is not set
# CONFIG_FIQ is not set
CONFIG_SND=m
CONFIG_MODULES=y
# CONFIG_MT9M001_PCA9536_SWITCH is not set
CONFIG_HAS_IOMEM=y
# CONFIG_ARCH_OMAP2 is not set
CONFIG_PROC_FS=y
# CONFIG_SPARC32 is not set
CONFIG_I2C_ALGOBIT=m
# CONFIG_DVB_FE_CUSTOMIZE is not set
CONFIG_HAS_DMA=y
CONFIG_INET=y
CONFIG_CRC32=y
CONFIG_FB=y
# CONFIG_ARCH_MX1 is not set
CONFIG_SYSFS=y
CONFIG_ISA=y
CONFIG_PCI=y
CONFIG_SONY_LAPTOP=m
# CONFIG_MX3_IPU is not set
CONFIG_SND_PCM=m
CONFIG_PARPORT_1284=y
CONFIG_EXPERIMENTAL=y
# CONFIG_M32R is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_IEEE1394=m
# CONFIG_MT9V022_PCA9536_SWITCH is not set
CONFIG_VIRT_TO_BUS=y
# CONFIG_VIDEO_KERNEL_VERSION is not set

#
# Multimedia devices
#

#
# Multimedia core support
#
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2_COMMON=m
# CONFIG_VIDEO_ALLOW_V4L1 is not set
# CONFIG_VIDEO_V4L1_COMPAT is not set
CONFIG_DVB_CORE=m
CONFIG_VIDEO_MEDIA=m

#
# Multimedia drivers
#
CONFIG_MEDIA_ATTACH=y
CONFIG_MEDIA_TUNER=m
# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
CONFIG_MEDIA_TUNER_SIMPLE=m
CONFIG_MEDIA_TUNER_TDA8290=m
CONFIG_MEDIA_TUNER_TDA18271=m
CONFIG_MEDIA_TUNER_TDA9887=m
CONFIG_MEDIA_TUNER_TEA5761=m
CONFIG_MEDIA_TUNER_TEA5767=m
CONFIG_MEDIA_TUNER_MT20XX=m
CONFIG_MEDIA_TUNER_XC2028=m
CONFIG_MEDIA_TUNER_XC5000=m
CONFIG_MEDIA_TUNER_MC44S803=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEO_TVEEPROM=m
CONFIG_VIDEO_TUNER=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set

#
# Encoders/decoders and other helper chips
#

#
# Audio decoders
#
# CONFIG_VIDEO_TVAUDIO is not set
# CONFIG_VIDEO_TDA7432 is not set
# CONFIG_VIDEO_TDA9840 is not set
# CONFIG_VIDEO_TDA9875 is not set
# CONFIG_VIDEO_TEA6415C is not set
# CONFIG_VIDEO_TEA6420 is not set
# CONFIG_VIDEO_MSP3400 is not set
# CONFIG_VIDEO_CS5345 is not set
# CONFIG_VIDEO_CS53L32A is not set
# CONFIG_VIDEO_M52790 is not set
# CONFIG_VIDEO_TLV320AIC23B is not set
# CONFIG_VIDEO_WM8775 is not set
# CONFIG_VIDEO_WM8739 is not set
# CONFIG_VIDEO_VP27SMPX is not set

#
# RDS decoders
#
# CONFIG_VIDEO_SAA6588 is not set

#
# Video decoders
#
# CONFIG_VIDEO_BT819 is not set
# CONFIG_VIDEO_BT856 is not set
# CONFIG_VIDEO_BT866 is not set
# CONFIG_VIDEO_KS0127 is not set
# CONFIG_VIDEO_OV7670 is not set
# CONFIG_VIDEO_TCM825X is not set
# CONFIG_VIDEO_SAA7110 is not set
# CONFIG_VIDEO_SAA711X is not set
# CONFIG_VIDEO_SAA717X is not set
# CONFIG_VIDEO_TVP514X is not set
# CONFIG_VIDEO_TVP5150 is not set
# CONFIG_VIDEO_VPX3220 is not set

#
# Video and audio decoders
#
# CONFIG_VIDEO_CX25840 is not set

#
# MPEG video encoders
#
# CONFIG_VIDEO_CX2341X is not set

#
# Video encoders
#
# CONFIG_VIDEO_SAA7127 is not set
# CONFIG_VIDEO_SAA7185 is not set
# CONFIG_VIDEO_ADV7170 is not set
# CONFIG_VIDEO_ADV7175 is not set

#
# Video improvement chips
#
# CONFIG_VIDEO_UPD64031A is not set
# CONFIG_VIDEO_UPD64083 is not set
# CONFIG_VIDEO_VIVI is not set
# CONFIG_VIDEO_BT848 is not set
# CONFIG_VIDEO_SAA5246A is not set
# CONFIG_VIDEO_SAA5249 is not set
# CONFIG_VIDEO_ZORAN is not set
# CONFIG_VIDEO_SAA7134 is not set
# CONFIG_VIDEO_HEXIUM_ORION is not set
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
# CONFIG_VIDEO_CX88 is not set
# CONFIG_VIDEO_CX23885 is not set
# CONFIG_VIDEO_AU0828 is not set
# CONFIG_VIDEO_IVTV is not set
# CONFIG_VIDEO_CX18 is not set
CONFIG_VIDEO_SAA7164=m
# CONFIG_VIDEO_CAFE_CCIC is not set
# CONFIG_SOC_CAMERA is not set
# CONFIG_V4L_USB_DRIVERS is not set
# CONFIG_RADIO_ADAPTERS is not set
# CONFIG_DVB_DYNAMIC_MINORS is not set
# CONFIG_DVB_CAPTURE_DRIVERS is not set
CONFIG_DVB_TDA10048=m
CONFIG_DVB_S5H1411=m
# CONFIG_DAB is not set

#
# Audio devices for multimedia
#

#
# ALSA sound
#
# CONFIG_SND_BT87X is not set

This is a minimal config. All I did was make menuconfig, deselect all the drivers except for SAA7164, and save it. (In menuconfig, you can hit "/" to search for the CONFIG_ you're looking for and it will tell you where in the hierarchy it is and what it depends/selects.)

make && make install (very little should be built, no errors, and the warnings can be ignored)

modprobe saa7164

Check dmesg to see which firmware it is looking for (mine was 1.0.3).

wget http://www.steventoth.net/linux/hvr22xx … _27086.zip
wget http://www.steventoth.net/linux/hvr22xx … 1_WHQL.zip
wget http://www.steventoth.net/linux/hvr22xx/extract.sh

sh extract.sh
copy needed firmware to /lib/firmware

You can now rmmod/modprobe saa7164 or reboot. dmesg should show it loading the firmware (takes about 10s). Now you should have /dev/dvb/adapter*

That's where I'm at.

Offline

#4 2009-05-29 20:02:24

elegua
Member
Registered: 2008-03-28
Posts: 19

Re: saa7164 Module Compile

This is good information for me. I will beat my head against it this weekend.

Offline

#5 2009-05-30 20:55:08

elegua
Member
Registered: 2008-03-28
Posts: 19

Re: saa7164 Module Compile

Success!

I did have to load the firmware files into /lib/firmware/ before the compile:

http://linuxtv.org/wiki/index.php/Haupp … V-HVR-2200

wget http://www.steventoth.net/linux/hvr22xx/22xxdrv_27086.zip
wget http://www.steventoth.net/linux/hvr22xx/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip
wget http://www.steventoth.net/linux/hvr22xx/extract.sh

sh extract.sh
sudo cp *fw /lib/firmware

I also had to manually load the dvb_core module before the saa7164 module or for some reason it wouldn't full load.

Thanks for the help!

Offline

#6 2009-05-31 01:06:49

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 202

Re: saa7164 Module Compile

Copying the firmware doesn't actually do anything because it won't be used until the driver is loaded, that's just the way they wrote it.

Is this going to be a mythtv box? If so and it crashes, you can run mysqlcheck -Ap --auto-repair to fix your mysql tables.

I have had some freezes, not sure if it's the new driver or what. Glad you got it going.

Offline

#7 2010-04-03 16:31:47

wreck
Member
Registered: 2008-03-22
Posts: 18

Re: saa7164 Module Compile

An update for configuring the HVR-2250 under the 2.6.32 kernel: very easy!

Follow elegua's commands in post #5 for downloading and copying the Hauppauge firmware from Steven Toth's site.  You may wish to grab updated links from http://www.steventoth.net/linux/hvr22xx/.  For testing purposes,  "modprobe saa7164" which should complete without error.  Be sure to include the saa7164 module in your /etc/rc.conf modlules array, then reboot. As fphillips mentioned in post #3, you should see /dev/dvb/adapter0 and /dev/dvb/adapter1 if you have one card, incremented appropriately for additional cards.  The "Processing UDev events" portion of the Arch boot phase will be extended by approximately 10-15 seconds.

Enjoy!

Last edited by wreck (2010-04-03 16:34:51)

Offline

Board footer

Powered by FluxBB