KnoppMyth R5C7
Tevion MD 9717
saa7134
After a bit of trouble my Tevion MD 9717 card now automatically loads the saa7134 module with the correct options. To achieve this I modified the /etc/init.d/KnoppMyth-tv file to detect the pci card and added the options to a new file /etc/mythtv/modules/saa7134
I expect that auto detection of other card types is now broken by these changes but since I have no other multimedia cards this is of no concern to me.
This mod did not need the saa7134 line removing from the file /etc/modules.
If anyone can help me to get the radio working with myth tv then please let me know how to do it.
Best regards, hth, David Richards.
below is an extract from dmesg as the card module is loaded:
saa7130/34: v4l2 driver version 0.2.14 loaded
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt 0000:01:01.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
saa7134[0]: found at 0000:01:01.0, rev: 1, irq: 11, latency: 64, mmio: 0xefdff800
saa7134[0]: subsystem: 1131:0000, board: Tevion MD 9717 [card=6,insmod option]
saa7134[0]: board init: gpio is 80407f
saa7134[0]: Huh, no eeprom present (err=-5)?
tuner 0-0060: All bytes are equal. It is not a TEA5767
tuner 0-0060: chip found @ 0xc0 (saa7134[0])
tuner 0-0060: type set to 5 (Philips PAL_BG (FI1216 and compatibles))
saa7134[0]: registered device video0 [v4l2]
saa7134[0]: registered device vbi0
saa7134[0]: registered device radio0
below are the contents of the files:
1)saa7134:
options saa7134 card=6 tuner=5
2)KnoppMyth-tv
#!/bin/bash
# Check for Multimedia video card(s).
# This gets linked to in /etc/rcS.d as S19KnoppMyth-tv
# and must come before modutiles as S20modutils.
########################################################################
USERNAME='mythtv' # the runing account name,
NewCardFile="/home/$USERNAME/.newcard" # KnoppMyth-run communication.
#======================================================================#
UTL_DIR='/usr/local/bin' # where the ivtv is located,
#DRVR_DIR='/usr/local/lib/ivtv/driver' # where the drivers are located,
DRVR_DIR='/usr/local/share/knoppmyth' # where the drivers are located,
EXTRACT="$UTL_DIR/ivtvfwextract.pl" # program to extract firmware,
PVRDRVR="$DRVR_DIR/pvr48wdm_1.8.22037.exe" # name of the driver,
IVTVCTL="$UTL_DIR/ivttctl" # ivtv control program,
BOOTPAR='set_ivtv_params' # init.d file to set params,
IVTVDIR='/etc/sysconfig/ivtv' # and its config file loc.
#----------------------------------------------------------------------#
MDULES='/etc/modprobe.d' # directory to hold mod lists,
M_FILE="$MDULES/KnoppMyth" # name of created KnoppMyth list,
#----------------------------------------------------------------------#
MYT_DIR='/etc/mythtv' # where to keep info.
MMCARDS="$MYT_DIR/Cards" # detected cards file.
MOD_DIR="$MYT_DIR/modules" # dir in which to keep mod lists
#----------------------------------------------------------------------#
FW_DIR='/lib/modules' # location of extacted firmware,
FW_ENC="$FW_DIR/ivtv-fw-enc.bin" # name of encoder firmware,
FW_DEC="$FW_DIR/ivtv-fw-dec.bin" # name of decoder firmware.
#======================================================================#
BOLD='[1;37m' ; RED='[1;31m' ; NORMAL='[0m'
#BOLD='[1;34m' ; RED='[1;31m' ; NORMAL='[0m' # for DEBUGing
########################################################################
TASK='' ; IVTV=0 ; TEMP_MM='/tmp/MM_Cards'
#----------------------------------------------------------------------#
Perform() { # $* are things to do.
rm -f $M_FILE # start with no file
for i in $* ; do # scan the work
case $i in
(ivtv*)
[ "$IVTV" = 1 ] || echo "include $MOD_DIR/ivtv"
IVTV=1
[ -f "$IVTVDIR/Readme" ] || touch $IVTVDIR/Readme
DEV=${i#ivtv}
[ -n "$DEV" -a ! -f "$IVTVDIR/cfg-$DEV" ] && \
cp $IVTVDIR/Readme $IVTVDIR/cfg-$DEV
;;
esac
[ -f "$MOD_DIR/$i" ] && echo "include $MOD_DIR/$i"
done > $M_FILE
if [ "$IVTV" = 1 ]; then
[ ! -f "$FW_ENC" -o ! -f "$FW_DEC" \
-o "$FW_ENC" -ot "$PVRDRVR" \
-o "$FW_DEC" -ot "$PVRDRVR" \
] && {
echo " Extracting Firmware."
# $EXTRACT $PVRDRVR # extract the firmware.
}
update-rc.d $BOOTPAR defaults >& /dev/null
else
update-rc.d -f $BOOTPAR remove >& /dev/null
fi
echo -n " Updating modutils ..."
update-modules # establish /etc/modules.conf
echo ""
echo -n " Run depmod -a ..."
depmod -a -q
echo ""
mv $TEMP_MM $MMCARDS
su - $USERNAME -c touch $NewCardFile # tell KnoppMyth-run
}
########################################################################
# Main:
#----------------------------------------------------------------------#
echo -e "${BOLD}Checking Multimedia video controller${NORMAL} {"
MM_PATN='* Multimedia controller: '
#MM_PATN='* Multimedia video controller: '
MM_TEMP=$(lspci | grep ' Multimedia controller')
#MM_TEMP=$(lspci | grep ' Multimedia video ')
#MM_TEMP="$(grep -v '^#' cards)" # For DEBUG use this file!
MM_NUMB=$(echo "$MM_TEMP" | wc -l | tr -d ' ')
[ -n "$MM_TEMP" ] || MM_NUMB=0
#----------------------------------------------------------------------#
[ -f "$MMCARDS" ] || touch $MMCARDS
echo "$MM_TEMP" > $TEMP_MM
diff -q $TEMP_MM $MMCARDS >& /dev/null ; WORK=$?
#----------------------------------------------------------------------#
echo -n " ${RED}KnoppMyth${NORMAL} found"
case $MM_NUMB in
(0) # No cards were found:
echo " ${BOLD}no Multimedia video cards${NORMAL}!"
;;
(1) # Only one card found:
CARD="${MM_TEMP##${MM_PATN}}"
echo " ${BOLD}$CARD${NORMAL}"
case "$CARD" in
(*Philips*) TASK='saa7134' ;; # OK, do saa7134.
(*Brooktree*) TASK='bttv' ;; # OK, do bttv.
(*Internext*) TASK='ivtv0' ;; # OK, do ivtv.
(*) TASK='bttv' ;; # HUH?, do bttv.
esac
;;
(*) C=0
echo ":"
while read card ; do
CARD="${card##${MM_PATN}}"
echo -e " $[$C+1]) ${BOLD}$CARD${NORMAL}"
case "$CARD" in
(*Philips*) TASK="$TASK saa7134$C" ;; # OK, add saa7134.
(*Brooktree*) TASK="$TASK bttv$C" ;; # OK, add bttv.
(*Internext*) TASK="$TASK ivtv$C" ;; # OK, add ivtv.
(*) TASK="$TASK bttv$C" ;; # HUH?, add bttv.
esac
C=$[$C+1]
done < $TEMP_MM
;;
esac
#----------------------------------------------------------------------#
[ "$WORK" = 0 ] || Perform $TASK
rm -f $TEMP_MM
#----------------------------------------------------------------------#
echo "} Done"
########################################################################
# End
|