Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77046 - saa7134 driver screwed up in gentoo-dev-sources-2.6.10-r2
Summary: saa7134 driver screwed up in gentoo-dev-sources-2.6.10-r2
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-07 10:13 UTC by spiritus
Modified: 2005-01-13 10:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spiritus 2005-01-07 10:13:22 UTC
I have AverMedia AverTV 305 TV tuner card. Yesterday I've successfully upgraded my kernel from gentoo-dev-sources-2.6.9-r11 to gentoo-dev-sources-2.6.10-r1. All were ok until I decided to upgrade to the most recent gentoo-dev-sources-2.6.10-r2. After upgrading to it I am unable to watch TV with it. Note that kernel configuration and build performed correctly.
Then I've tryed to apply the saa7134-update from bytesex.org but got errors while kernel rebuilds.

  CC [M]  drivers/media/video/saa7134/saa7134-vbi.o
  CC [M]  drivers/media/video/saa7134/saa7134-video.o
  CC [M]  drivers/media/video/saa7134/saa7134-input.o
  CC [M]  drivers/media/video/saa7134/saa7134-empress.o
drivers/media/video/saa7134/saa7134-empress.c: In function `ts_init_encoder':
drivers/media/video/saa7134/saa7134-empress.c:66: error: `VIDIOC_S_MPEGCOMP' undeclared (first use in this function)
drivers/media/video/saa7134/saa7134-empress.c:66: error: (Each undeclared identifier is reported only once
drivers/media/video/saa7134/saa7134-empress.c:66: error: for each function it appears in.)
drivers/media/video/saa7134/saa7134-empress.c: In function `ts_do_ioctl':
drivers/media/video/saa7134/saa7134-empress.c:291: error: `VIDIOC_S_MPEGCOMP' undeclared (first use in this function)
drivers/media/video/saa7134/saa7134-empress.c:293: error: `VIDIOC_G_MPEGCOMP' undeclared (first use in this function)
make[4]: *** [drivers/media/video/saa7134/saa7134-empress.o] Error 1
make[3]: *** [drivers/media/video/saa7134] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
* Gentoo Linux Genkernel; Version 3.1.0c

* ERROR: Failed to compile the "modules" target...


Reproducible: Always
Steps to Reproduce:
1. cp ~/.config
2. genkernel --oldconfig --menuconfig all
3. # cat /etc/modules.d/tuner
options tda9887 secam=d
#options saa7134 card=35 tuner=24
options saa7134 card=35
alias /dev/v4l saa7134
below saa7134 tda9887
4. modules-update
5. reboot
Actual Results:  
Tvtime, xawtb, MotVT and aatv don't show anything

Expected Results:  
I expect no troubles with the TV watching

Portage 2.0.51-r8 (default-linux/x86/2004.2, gcc-3.3.4, glibc-2.3.4.20041102-r0, 
2.6.10-gentoo-r2 i686)
=================================================================
System uname: 2.6.10-gentoo-r2 i686 Intel(R) Celeron(TM) CPU                
1100MHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.3-r1 [2.3.3 (#1, Jul 11 2004, 19:39:29)
]
dev-lang/python:     2.3.3-r1
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.14.90.0.8-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium3 -pipe -mmmx -msse -mfpmath=sse,387 -fstack-
protector-all"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.
2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown 
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/
bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -pipe -mmmx -msse -mfpmath=sse,387 -fstack-
protector-all"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://ftp.du.se/pub/os/gentoo 
http://trumpetti.atm.tut.fi/gentoo/ ftp://mirrors1.netvisao.pt/gentoo/ http://
www.gigaload.org/gentoo.org/"
LDFLAGS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 GAPING_SECURITY_HOLE X aalib acl activefilter alsa apache2 apm arts 
artswrappersuid audiofile avi berkdb bitmap-fonts bluetooth caps cdparanoia 
crypt cups curl dhcp directfb divx4linux divxforlinux doc encode esd fam fbcon 
flac foomaticdb fortran gdbm gif gnokii gnome gphoto2 gpm gstreamer gtk gtk2 
guile hardened imagemagick imlib ipv6 irda jack java jpeg jpeg2k junit kde 
kerberos ldap libclamav libwww lirc mad mbox mikmod milter mmap mmx mmx2 motif 
mozilla mpeg mppe-mppc multicall mysql ncurses nls nptl ntlm oggvorbis opengl 
oss pam pda pdflib perl pic png portaudio povray python qt quicktime quotas 
readline reiserfs ruby samba sasl scanner sdl sftplogging slang slp sms socks5 
speex spell sse ssl svga tcltk tcpd threads tiff truetype usb v4l v4l2 wifi 
winbind wmf xine xinerama xml2 xmms xscreensaver xv zlib"
Comment 1 Daniel Drake (RETIRED) gentoo-dev 2005-01-07 10:15:57 UTC
There are so few changes between -r1 and -r2 that I can't see where this is coming from. Are you *sure* it definately works fine on -r1?
Comment 2 spiritus 2005-01-07 16:08:26 UTC
The trouble resolved after applying following patch:

http://dl.bytesex.org/patches/2.6.10-1/All-2.6.10.diff.gz

I'll recheck the -r1 if tvtuner works well. May be I was wrong about -r1 because haven't noted that applyed v4l patch from bytesex to the gentoo-dev-sources-2.6.10-r1 :) 
Comment 3 spiritus 2005-01-07 19:50:34 UTC
I was wrong. TV card doesn't work with the following options:

# cat /etc/modules.d/tuner
options tda9887 secam=d
#options saa7134 card=35 tuner=24
options saa7134 card=35
alias /dev/v4l saa7134
below saa7134 tda9887a9887

it works only with the:
# cat /etc/modules.d/tuner
options tda9887 secam=d
options saa7134 card=35 tuner=24
alias /dev/v4l saa7134
below saa7134 tda9887

I've checked if all is ok with the tuner type autodetection, but it seems not.

I have AverMedia AverTV/Studio 305 TV card with the following PCI ID:

0000:02:04.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
        Subsystem: Avermedia Technologies Inc: Unknown device 2108
        Flags: bus master, medium devsel, latency 32, IRQ 18
        Memory at e7001000 (32-bit, non-prefetchable)
        Capabilities: [40] Power Management version 1

Although saa7134 knows about this card:

saa7130[0]: subsystem: 1461:2108, board: AverMedia 305 [card=35,insmod option]

But the system is unable to autodetect its type:

saa7130[0]: subsystem: 1461:2108, board: UNKNOWN/GENERIC [card=0,autode
tected]

Even when card=35 specified saa7134 doesn't detect tuner type correctly, because there are no any video output:

tuner: chip found at addr 0xc2 i2c-bus saa7130[0]
tuner: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3)) by saa7130[0]

Only if I specify card=35 tuner=24(or tuner=3) and secam=d option for tda9887 I get video output from the TV card:

saa7130[0]: found at 0000:02:04.0, rev: 1, irq: 18, latency: 32, mmio: 0xe7001000
saa7130[0]: subsystem: 1461:2108, board: AverMedia 305 [card=35,insmod option]
saa7130[0]: board init: gpio is 107a8
saa7130[0]: i2c eeprom 00: 61 14 08 21 ff ff ff ff ff ff ff ff ff ff ff ff
saa7130[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7130[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7130[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
tuner: chip found at addr 0xc2 i2c-bus saa7130[0]
tuner: type set to 24 (Philips PAL/SECAM multi (FQ1216ME)) by saa7130[0]
saa7130[0]: registered device video0 [v4l2]
saa7130[0]: registered device vbi0
saa7130[0]: registered device radio0

So I'd like saa7134 driver to autodetect this AverMedia AverTV 305 TV card in future releases of gentoo-dev-sources :)

subsystem: 1461:2108
board name: AverMedia AverTV 305 
chip type: SAA7130
saa7134 options: card=35 tuner=24
tda9887 option: secam=d (SECAM/DK)
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2005-01-08 15:42:53 UTC
Please bug the patch maintainer to send the fixes to Linus. Then, if you can track down the patch that fixes autodetection, I will consider adding it.
Thanks.
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2005-01-12 09:26:57 UTC
reopening to track issue
Comment 6 Daniel Drake (RETIRED) gentoo-dev 2005-01-12 14:19:44 UTC
I'm not keen on applying the whole lot unless it goes upstream first..and unfortunately as you noticed, the saa7134 fix requires another patch to be applied, which would then require the other drivers to be updated too. Sorry, not going to apply this at this time.
Comment 7 spiritus 2005-01-12 16:24:00 UTC
After all there seems no much issues except kernel doesn't autodetect TV tuner card, the same thing with the latest video4linux kernel patch from bytesex.org and there is issue with the saa7134 fix that doesn't compile, but full patch applies and compiles ok. 
TV Tuner works fine with the manually specified experimentally found insmod options with the gentoo-dev-sources and with the latest v4l patch.
I would contact patch mantainer and ask him to implement AvermeDia TV Studio 305 correct autodetection.
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2005-01-13 10:16:18 UTC
Yep, that sounds like the best idea. Thanks for reporting.