Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250609 - [2.6.26 regression] Hauppauge WinTV card (driver: cx8800) cannot change channels
Summary: [2.6.26 regression] Hauppauge WinTV card (driver: cx8800) cannot change channels
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: linux-2.6.26-regression linux-2.6.28
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-11 11:14 UTC by Atanas Kamburov
Modified: 2009-01-07 20:17 UTC (History)
1 user (show)

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


Attachments
config file for 2.6.25-gentoo-r9 kernel (config_2.6.25-gentoo-r9,46.71 KB, text/plain)
2008-12-11 11:15 UTC, Atanas Kamburov
Details
config file for 2.6.26-gentoo-r4 kernel with cx8800 compiled as module (config_2.6.26-gentoo-r4_driverAsModule,48.22 KB, text/plain)
2008-12-11 11:15 UTC, Atanas Kamburov
Details
dmesg (dmesg,23.51 KB, text/plain)
2008-12-11 22:41 UTC, Atanas Kamburov
Details
lspci -v (lspci,7.16 KB, text/plain)
2008-12-11 22:41 UTC, Atanas Kamburov
Details
dmesg for kernel 2.6.26-gentoo-r4 with built-in tuner driver (dmesg_2.6.26-r4,23.09 KB, text/plain)
2008-12-12 13:38 UTC, Atanas Kamburov
Details
dmesg for kernel 2.6.26-r4 with cx8800 compiled as a module, module loaded automatically (dmesg_2.6.26-r4_driverAsModule,23.10 KB, text/plain)
2008-12-12 15:23 UTC, Atanas Kamburov
Details
config file for 2.6.26-gentoo-r4 kernel with cx8800 built-in (config_2.6.26-gentoo-r4_builtinDriver,48.22 KB, text/plain)
2008-12-12 17:43 UTC, Atanas Kamburov
Details
dmesg with everything built-in and with additional kernel parameters (see below) (dmesg_2.6.26-r4_builtIn_kernelParameters,28.37 KB, text/plain)
2008-12-12 23:05 UTC, Atanas Kamburov
Details
dmesg with everything built-in and with additional kernel parameters (see below) (dmesg_2.6.25-r9_builtIn_kernelParameters,29.88 KB, text/plain)
2008-12-12 23:16 UTC, Atanas Kamburov
Details
A patch that removes the tuner-setup changes for cx88 driver on 2.6.26 (revert-cx88-tuner-setup-changes.patch,5.20 KB, patch)
2008-12-13 15:25 UTC, Axel Dyks
Details | Diff
dmesg after applying the patch. Built-in drivers (dmesg_2.6.26_withPatch,45.73 KB, text/plain)
2008-12-13 17:13 UTC, Atanas Kamburov
Details
dmesg with vanilla kernel 2.6.28-rc8 (dmesg_2.6.28-rc8,29.53 KB, text/plain)
2008-12-17 20:32 UTC, Atanas Kamburov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Atanas Kamburov 2008-12-11 11:14:25 UTC
Hi! As asked by Axel Dyks, here is a new bug report concerning my TV card problem (with similar effects like in bug 245106).

I have a Hauppauge WinTV card (driver: cx8800). I use
tvtime to watch TV and didn't have problems with any kernel older than 2.6.26.
With 2.6.26 (and 2.6.27 too) (I always use make oldconfig by the way) I have the problem that the tv sticks to a certain channel which cannot be changed using tvtime. However, this is true for 2.6.26
if the driver is built-in the kernel - if I choose M to compile the driver as a
module, I can change channels and everything works fine with tvtime, but NOT
with mencoder (which, like tvtime, worked fine with kernels older than 2.6.26) which doesn't regard the channel parameters and always sticks to the same frequency.
 Attached is my emerge --info, as well as my .config files for 2.6.25 and
2.6.26 kernels. I am ready to test different options and software if this would
help smash the bug. However, I don't have any more TV cards to test.

Reproducible: Always

Steps to Reproduce:
1.install a kernel > 2.5.25 with make oldconfig, leave TV card drivers built-in
2.start tvtime, try to change the channel
3.

Actual Results:  
cannot change channels.

Expected Results:  
watch TV :-)

Portage 2.1.4.5 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r9 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r9 x86_64 AMD Athlon(tm) X2 Dual Core Processor BE-2400
Timestamp of tree: Tue, 09 Dec 2008 20:39:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7-r1, 2.1.6
dev-lang/python:     2.4.4-r14
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /
etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo "
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=
/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bluetooth bzip2 cdr cli compositor cracklib crypt dbus dri dvd fortran fpu gdbm gpm gtk gtk2 hal iconv ipv6 isdnlog java jpeg lm_sensors midi mmx 
mudflap multilib ncurses nls nptl nptlonly nvidia openmp pam pcre perl png pppd python readline reflection session spl sse sse2 ssl sysfs tcpd truetype unicode v4l v4l2 xcomposite 
xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi 
null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile 
authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cach
e mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES
="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Atanas Kamburov 2008-12-11 11:15:05 UTC
Created attachment 174945 [details]
config file for 2.6.25-gentoo-r9 kernel
Comment 2 Atanas Kamburov 2008-12-11 11:15:22 UTC
Created attachment 174947 [details]
config file for 2.6.26-gentoo-r4 kernel with cx8800 compiled as module
Comment 3 Axel Dyks 2008-12-11 13:13:24 UTC
Thanks,

can you also attach output of "dmesg" and ouput of "lspci -v".
Comment 4 Atanas Kamburov 2008-12-11 22:41:11 UTC
Created attachment 175007 [details]
dmesg
Comment 5 Atanas Kamburov 2008-12-11 22:41:32 UTC
Created attachment 175009 [details]
lspci -v
Comment 6 Axel Dyks 2008-12-12 09:50:43 UTC
Ok, thanks. Now we know your hardware (see below) ...
Can you also post dmesg output of a not running config on 2.6.26?

BTW: What you could try to do is set CONFIG_MEDIA_ATTACH=y and
compile the tuners as modules.

----------------------------------------------------------
01:06.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 03)
	Subsystem: Hauppauge computer works Inc. Hauppauge WinTV 34xxx models
	Flags: bus master, medium devsel, latency 32, IRQ 16
	Memory at f3000000 (32-bit, non-prefetchable) [size=16M]
	Capabilities: [44] Vital Product Data <?>
	Capabilities: [4c] Power Management version 2
	Kernel driver in use: cx8800

01:06.1 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 03)
	Subsystem: Hauppauge computer works Inc. Hauppauge WinTV 34xxx models
	Flags: bus master, medium devsel, latency 32, IRQ 11
	Memory at f4000000 (32-bit, non-prefetchable) [size=16M]
	Capabilities: [44] Vital Product Data <?>
	Capabilities: [4c] Power Management version 2
----------------------------------------------------------

---- 2.6.29-gentoo-r9 ------------------------------------
cx88/0: cx2388x v4l2 driver version 0.0.6 loaded
ACPI: PCI Interrupt Link [APC1] enabled at IRQ 16
ACPI: PCI Interrupt 0000:01:06.0[A] -> Link [APC1] -> GSI 16 (level, low) -> IRQ 16
cx88[0]: subsystem: 0070:3401, board: Hauppauge WinTV 34xxx models [card=1,autodetected]
cx88[0]: TV tuner type -1, Radio tuner type -1
tveeprom 0-0050: Hauppauge model 34504, rev E148, serial# 7041745
tveeprom 0-0050: tuner model is LG TP18PSB11D (idx 48, type 29)
tveeprom 0-0050: TV standards PAL(B/G) (eeprom 0x04)
tveeprom 0-0050: audio processor is CX881 (idx 31)
tveeprom 0-0050: has radio
cx88[0]: warning: unknown hauppauge model #34504
cx88[0]: hauppauge eeprom: model=34504
input: cx88 IR (Hauppauge WinTV 34xxx  as /class/input/input2
cx88[0]/0: found at 0000:01:06.0, rev: 3, irq: 16, latency: 32, mmio: 0xf3000000
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded
tuner' 0-0061: chip found @ 0xc2 (cx88[0])
tuner-simple 0-0061: type set to 29 (LG PAL_BG (TPI8PSB11D))
----------------------------------------------------------
Comment 7 Atanas Kamburov 2008-12-12 13:38:02 UTC
Created attachment 175084 [details]
dmesg for kernel 2.6.26-gentoo-r4 with built-in tuner driver

this is the dmesg when I start my computer with 2.6.26, however, I haven't tried to change channels cause I'm not at home at the moment. Let me know if you want to see a dmesg after I try to change channels in tvtime.
Comment 8 Axel Dyks 2008-12-12 14:38:03 UTC
-- dmesg 2.6.25-gentoo-r9 --------------
tuner' 0-0061: chip found @ 0xc2 (cx88[0])
tuner-simple 0-0061: type set to 29 (LG PAL_BG (TPI8PSB11D))
----------------------------------------

-- dmesg 2.6.26-gentoo-r4 --------------
tuner' 0-0061: chip found @ 0xc2 (cx88[0])
[...]
tuner' 0-0061: tuner type not set
[...]
----------------------------------------

We're getting closer ...
Comment 9 Atanas Kamburov 2008-12-12 14:46:34 UTC
right, this is one difference. But in dmesg_2.6.26-r4 above you also have
tuner' 0-0061: chip found @ 0xc2 (cx88[0]) like in the dmesg(2.5.25)
Comment 10 Atanas Kamburov 2008-12-12 14:53:59 UTC
sorry, should buy googles. ignore my last message.
Comment 11 Axel Dyks 2008-12-12 14:58:46 UTC
Something very similar has been posted on the V4L mailing list
as a problem when upgrading from 2.6.24 to 2.6.25
http://lists-archives.org/video4linux/22351-hauppauge-wintv-regreession-from-2-6-24-to-2-6-25.html

The workaround has been been to force a specific tuner (number) when loading
the cx88 module. Do you have such an option in /etc/modprobe.conf?

Can you try to reload the cx88 module and pass a tuner=NN parameter or
in case you have and entry in modprobe.conf, comment out that entry
and reload the module.

Type has been 29 on 2.6.25, but I don't know, if the those numbers
stay the same accross kernel releases.
Comment 12 Axel Dyks 2008-12-12 15:11:52 UTC
(In reply to comment #11)
> Do you have such an option in /etc/modprobe.conf?
Obviously you don't have such an entry.
  
  cx88[0]: TV tuner type -1, Radio tuner type -1

> Type has been 29 on 2.6.25, but I don't know, if the those numbers
> stay the same accross kernel releases.
It's still 29. Can you try

  # modprobe -r cx88
  # modporbe cx88 tuner=29
Comment 13 Atanas Kamburov 2008-12-12 15:13:41 UTC
My TV card driver is built-in the kernel (and not compiled as a module) in both cases: with 2.6.25 and with 2.6.26. With this setting, I can change channels in 2.5.25 and cannot change channels in 2.5.26.
------------
If I compile the driver as a module using 2.6.26, I am able to change channels in tvtime. However, now mencoder does not consider the channel setting passed (mencoder -tv driver=v4l2:channel=1 ....). With 2.5.25, I haven't used that channel setting, since I just turned on tvtime, changed to the desired channel, turned off tvtime and then started mencoder. If I do that with 2.5.26 when the driver is a loaded module, the channel setting from tvtime is lost.
------------
I will play around with 2.6.26 and tuner driver as module with the setting that you proposed (tuner=NN), see if mencoder's behavior changes. However, give me a couple of hours since I must do taht at home and I'm at work now...

Thanks for your involvement!!!
Comment 14 Atanas Kamburov 2008-12-12 15:23:12 UTC
Created attachment 175108 [details]
dmesg for kernel 2.6.26-r4 with cx8800 compiled as a module, module loaded automatically

Now this dmesg looks closer to the 2.5.25 dmesg, but this was expected, since, as I said in my previous post, I am able to change channels in tvtime...
Comment 15 Axel Dyks 2008-12-12 15:43:34 UTC
Anyway, it seems that you've found a bug.

  tuner type (29) not autodetected by tuner-simple, when both cx88
  and tuner-simple are build into kernel >= 2.6.26

   cx88     tuner-simple
1  builtin  builtin     --> autodection of tuner fails
2  module   builtin     --> tuner=29 autodetected (but mencoder does not tune)
3  module   module      --> ??
4  builtin  module      --> ??

Would be interesting to know the result of the last two configs.
Comment 16 Axel Dyks 2008-12-12 17:31:49 UTC
Just noticed that your "config_2.6.26-gentoo-r4" should better be named
"config_2.6.26-gentoo-r4_driverAsModule".
Can you attach "config_2.6.26-gentoo-r4", the config file using builtin modules only
Comment 17 Atanas Kamburov 2008-12-12 17:43:33 UTC
Created attachment 175120 [details]
config file for 2.6.26-gentoo-r4 kernel with cx8800 built-in

btw, there is a typo in the description of "config_2.6.26-gentoo-r4_driverAsModule" (-> cx8800)
Comment 18 Axel Dyks 2008-12-12 17:45:57 UTC
Comment on attachment 174947 [details]
config file for 2.6.26-gentoo-r4 kernel with cx8800 compiled as module

Fixed typo: cx800 -> cx800
Comment 19 Axel Dyks 2008-12-12 18:46:44 UTC
(In reply to comment #17)
> Created an attachment (id=175120) [edit]
> config file for 2.6.26-gentoo-r4 kernel with cx8800 built-in
Another idea that I have is to add the following kernel-parameters to the commandline that boots the 2.6.26 kernel with builtin driver(s)

  cx8800.debug=1 tuner.debug=1

BTW, using

  cx8800.tuner=29

would force a specific tuner to be "detected".
Comment 20 Atanas Kamburov 2008-12-12 20:27:14 UTC
(In reply to comment #15)
> Anyway, it seems that you've found a bug.
> 
>   tuner type (29) not autodetected by tuner-simple, when both cx88
>   and tuner-simple are build into kernel >= 2.6.26
> 
>    cx88     tuner-simple
> 1  builtin  builtin     --> autodection of tuner fails
> 2  module   builtin     --> tuner=29 autodetected (but mencoder does not tune)
> 3  module   module      --> ??
> 4  builtin  module      --> ??
> 
> Would be interesting to know the result of the last two configs.
> 

there is no change in the results when varying tuner-simple between built-in and module. The problem seems to depend completely on cx8800. However, please notice that the upper-level option (MEDIA_TUNER_CUSTOMIZE) is not set in any of the configs I had attached before, so I think that MEDIA_TUNER_SIMPLE was not considered by "make" anyway. Of course, for the above tests I have enabled MEDIA_TUNER_CUSTOMIZE (and varied MEDIA_TUNER_SIMPLE between "y" and "m").

I have a question:  do I have to compile cx8800 as module in order to pass the kernel parameters "cx8800.debug=1 tuner.debug=1" , or can it be built-in too.
Comment 21 Axel Dyks 2008-12-12 21:06:53 UTC
(In reply to comment #20) 
> there is no change in the results when varying tuner-simple between built-in
> and module. The problem seems to depend completely on cx8800.
Ok let's focus on the everything-is-builtin case. This seems to be the most
interesting and the one that propably should be reported upstream.

> However, please notice that the upper-level option (MEDIA_TUNER_CUSTOMIZE) is > not set in any of the configs I had attached before, so I think that 
> MEDIA_TUNER_SIMPLE was not considered by "make" anyway. Of course, for the
> above tests I have enabled MEDIA_TUNER_CUSTOMIZE (and varied
> MEDIA_TUNER_SIMPLE between "y" and "m").
Yeah, MEDIA_TUNER_SIMPLE is build in both cases.
You only need to enable MEDIA_TUNER_CUSTOMIZE, if you want to disable/enable
modules that are (not) build by default.
 
> I have a question:  do I have to compile cx8800 as module in order to pass the
> kernel parameters "cx8800.debug=1 tuner.debug=1" , or can it be built-in too.
No, let them build into the kernel.
Kernel parameters effect builtin modules. For loadable modules, parameters
go into /etc/modprobe.conf or rather into files within /etc/modules.d which
are merged into /etc/modprobe.conf when running update-modules.

But, I've just re-checked the names of the kernel-parameters ...
It actually is

  cx88xx.core_debug    and not cx8800.debug
  cx88xx.tuner         and not cx8800.tuner

One way to figure out which parameters are supported by a particular
module is to compile it as a module and run modprobe -p <path-to-module>

In your driver-as-module configuration you should have cx8800.ko and
cx88xx.ko. What I did, to figure it out, was to compile the cx88 driver
as builtin and then run

  $ strings drivers/media/video/cx88/built-in.o | grep -E '^\w+\.\w+'

Summary:

  - Stay with the builtin config
  - Add the following kernel parameters

      cx88xx.core_debug=1 tuner.debug=1 tuner_simple.debug=1

  - Try to force a tuner with

      cx88xx.tuner=29
Comment 22 Atanas Kamburov 2008-12-12 23:05:55 UTC
Created attachment 175146 [details]
dmesg with everything built-in and with additional kernel parameters (see below)

Thanks very much for the explanations, I learned a couple of new things ;)

So, I have compiled the 2.6.26-r4 kernel with everything built-in, enabled the according parameters in the following way (grub.conf) : "kernel /boot/kernel-2.6.26-gentoo-r4 root=/dev/sda2 quiet cx88xx.core_debug=1 tuner.debug=1 tuner_simple.debug=1 cx88xx.tuner=29", rebooted, started tvtime, tried to change the channel (unsuccessful as expected) and stopped tvtime. Results are in the attached dmesg_2.6.26-r4_builtIn_kernelParameters.
Comment 23 Atanas Kamburov 2008-12-12 23:16:22 UTC
Created attachment 175153 [details]
dmesg with everything built-in and with additional kernel parameters (see below)

for comparison, here is the analogous dmesg for running kernel 2.5.25 with built-in modules and same kernel parameters at startup. Again, I start tvtime, change the channel (successfully) and stop tvtime. This can be seen at the end of the attached dmesg. Apparently the tuner type isn't "not set" here...
Comment 24 Axel Dyks 2008-12-13 15:25:27 UTC
Created attachment 175207 [details, diff]
A patch that removes the tuner-setup changes for cx88 driver on 2.6.26

I might have spotted the patch that changed the tuner-setup behavior on 2.6.26.
The attached patch, if applied to 2.6.26, REVERTS those changes.
Can you try this patch on your 2.6.26 everything-builtin kernel and check,
if it solves your problem?
Comment 26 Atanas Kamburov 2008-12-13 15:49:37 UTC
sorry for the stupid question, but how do I apply the patch? my kernel is in /usr/src/linux-2.6.26-gentoo-r4
Comment 27 Andreas Aronsson 2008-12-13 16:14:44 UTC
You could do:
save patchname.patch to /usr/src/linux-2.6.26-gentoo-r4
patch -p1 --dry-run < patchname.patch
if it does not give any FAILED, do 
patch -p1 < patchname.patch
Comment 28 Axel Dyks 2008-12-13 16:32:35 UTC
(In reply to comment #27)
Or you can use "quilt" to apply the patch ...

# emerge quilt
# cd /usr/src/linux-2.6.26-gentoo-r4
# quilt import <path_to_revert-cx88-tuner-setup-changes.patch>
# quilt push

This allows to revert the patch (revert my revert) by simply running

# quilt pop

...in case it does no good. :-)

BTW, I've successfully applied the patch against 2.6.26.8 which basically
is 2.6.26-gentoo-r4 and was able to compile the kernel.
Comment 29 Atanas Kamburov 2008-12-13 17:13:06 UTC
Created attachment 175219 [details]
dmesg after applying the patch. Built-in drivers

With the patch and built-in modules in kernel 2.6.26, I am able to change channels  in tvtime (which is an advance) but no success with mencoder...
Comment 30 Axel Dyks 2008-12-13 18:22:41 UTC
(In reply to comment #29)
> With the patch and built-in modules in kernel 2.6.26, I am able to change
> channels  in tvtime (which is an advance) but no success with mencoder...
Seems we are getting closer, though I still feel that we are dealing with two (separate) problems here ...

So I would suggest to open a separate bug for the mencoder problem which
should include the exact commandline and the mplayer/mencoder config files
you are using. BTW, does mplayer work?

If you are willing to take your tuner-setup issue upstream, you'll need
to reproduce it on "vanilla sources", i. e. 2.6.25.20 <--> 2.6.26.8 and
check against 2.6.28-rc8, because you'll probably be asked, if the
problem persists on latest 2.6.28-rcX.

BTW, for 2.6.28-rcX isn't "keyworded" for "amd64" in portage (probably
because of nvidia-drivers not working) you'll need to use "ketchup" to
download the sources.

# emerge ketchup
# mkdir /usr/src/linux-2.6.28-rc8
# cd /usr/src/linux-2.6.28-rc8
# ketchup --archive /usr/portage/distfiles --no-gpg 2.6.28-rc8
# cp ../linux-2.6.26-gentoo-r4/.config .
# make oldconfig
# make menuconfig
# ...
Comment 31 Atanas Kamburov 2008-12-13 21:01:26 UTC
(In reply to comment #30)
> (In reply to comment #29)
> > With the patch and built-in modules in kernel 2.6.26, I am able to change
> > channels  in tvtime (which is an advance) but no success with mencoder...
> Seems we are getting closer, though I still feel that we are dealing with two
> (separate) problems here ...
> 
> So I would suggest to open a separate bug for the mencoder problem which
> should include the exact commandline and the mplayer/mencoder config files
> you are using. BTW, does mplayer work?

Aaah, now I saw that mencoder (and also mplayer) do tune after applying your patch, the problem is that the channels are not exactly tuned and you can hardly see which channel is the current one. However, the behavior of mplayer (and mencoder) is still different than with kernel 2.5.25 - in 2.5.25 tuning with mplayer/mencoder was not problematic, showing clear picture for the channels.

I will open a separate bug about mencoder (soon). Just let me play around a bit more.

> If you are willing to take your tuner-setup issue upstream, you'll need
> to reproduce it on "vanilla sources", i. e. 2.6.25.20 <--> 2.6.26.8 and
> check against 2.6.28-rc8, because you'll probably be asked, if the
> problem persists on latest 2.6.28-rcX.

So do I have to reproduce the results on EVERY kernel between 2.6.25.20 and 2.6.26.8, or just on those two (2.6.25.20 and 2.6.26.8)??
Correct me if I'm wrong, but what I think to do is:
 - download according kernel from kernel.org
 - take the .config from the working 2.5.25-gentoo-r9 and apply it to the vanilla kernel with make oldconfig
 - make, make install, etc.
 - restart with the new kernel(s), record what dmesg says
 - post the dmesg outputs somewhere (where? at bugs.gentoo.org or should I create a new bug report at bugs.kernel.org or so?)

Sorry for the noobish questions, I've never encountered a real bug before...

> 
> BTW, for 2.6.28-rcX isn't "keyworded" for "amd64" in portage (probably
> because of nvidia-drivers not working) you'll need to use "ketchup" to
> download the sources.

hm, I'm using the nvidia drivers. Will look at that kernel separately if I'm asked to, since it requires a little bit more work (the ketchup thing, switching to vesa, etc.).

> 
> # emerge ketchup
> # mkdir /usr/src/linux-2.6.28-rc8
> # cd /usr/src/linux-2.6.28-rc8
> # ketchup --archive /usr/portage/distfiles --no-gpg 2.6.28-rc8
> # cp ../linux-2.6.26-gentoo-r4/.config .
> # make oldconfig
> # make menuconfig
> # ...
> 

Comment 32 Axel Dyks 2008-12-14 00:16:43 UTC
(In reply to comment #31)
> I will open a separate bug about mencoder (soon). Just let me play around a
> bit more.
OK, thanks! :-)

> So do I have to reproduce the results on EVERY kernel between 2.6.25.20 and
> 2.6.26.8, or just on those two (2.6.25.20 and 2.6.26.8)??
No, just on 2.6.25.20 and 2.6.26.8 which are the latest stable releases for
2.6.25 and 2.6.26 on kernel.org. Taking it upstream does mean taking it up
to (bugzilla.)kernel.org and -- although gentoo-sources are VERY close to
vanilla-sources (original kernel.org releases) -- anybody outside of gentoo
will probably refuse to test / reproduce on non-vanilla sources. :-)  

> Correct me if I'm wrong, but what I think to do is:
>  - download according kernel from kernel.org
>  - take the .config from the working 2.5.25-gentoo-r9 and apply it to the
> vanilla kernel with make oldconfig
>  - make, make install, etc.
>  - restart with the new kernel(s), record what dmesg says
>  - post the dmesg outputs somewhere (where? at bugs.gentoo.org or should I
> create a new bug report at bugs.kernel.org or so?)
You can download the sources either by doing

  # ACCEPT_KEYWORDS="~*" emerge =vanilla-sources-2.6.25.20
  # ACCEPT_KEYWORDS="~*" emerge =vanilla-sources-2.6.26.8

or use "ketchup" exactly the same way as I've described for 2.6.28-rc8.
Then you copy your config files from linux-2.6.25-gentoo-r9 and
linux-2.6.26-gentoo-r4 to linux.2.6.25.20 and linux-2.6.26.8 respectively,
run make oldconfig, ....

For now I would suggest, that you attach both the config files for 2.6.25.20
and for 2.6.26.8 (both with drivers builtin) as well as the corresponding
dmesg output. Then apply the (revert....) patch to 2.6.26.8 and again attach
dmesg.

If we're encountering the same behavior on vanilla as we've got on
gentoo-sources, we are almost (see below) ready to take it upstream.
  
> hm, I'm using the nvidia drivers. Will look at that kernel separately if I'm
> asked to, since it requires a little bit more work (the ketchup thing,
> switching to vesa, etc.).
Hmm, the "ketchup stuff" is actually quite simple.
Just create a "linux-2.6.28-rc8" kernel, add it as a separate (not default)
entry to your grub.conf and disable automatic start of your X Window system
(rc-update delete xdm default).

Boot once into this kernel (hope it boots), save dmesg, re-enable X (xdm),
reboot into your working environment.

I actually don't think that the issue has been fixed meanwhile, but
you'll never know, and it's quite embarrassing, if you file a bug
report against something that's already fixed. :-)
Comment 33 Axel Dyks 2008-12-17 13:01:51 UTC
(In reply to comment #32)
> Hmm, the "ketchup stuff" is actually quite simple.
> Just create a "linux-2.6.28-rc8" kernel, add it as a separate (not default)
> entry to your grub.conf and disable automatic start of your X Window system
> (rc-update delete xdm default).
> 
> Boot once into this kernel (hope it boots), save dmesg, re-enable X (xdm),
> reboot into your working environment.

Any news on this?

For it seems that you've found a regression, I would gladly assist
you in taking this upstream. But this requires to test 2.6.28-rcX.

And because upstream will refuse to work on anything that happens
on a "tainted kernel" (NVIDIA driver), you'll have to remove/disable
the NVIDIA module anway :-)
Comment 34 Atanas Kamburov 2008-12-17 13:06:43 UTC
Nope, sorry, nothing new yet. I was experiencing another problem with my PC after upgrading it with a couple of gigabytes of RAM. It was something about IOMMU but I think it is fixed now.

So I'm getting back to the TV problem. I hope to be ready with it today, since I'll be away from home till the Beginning of 2009. Await posts from me in the next hour or so...
Comment 35 Atanas Kamburov 2008-12-17 20:32:27 UTC
Created attachment 175640 [details]
dmesg with vanilla kernel 2.6.28-rc8

I successfully installed the new kernel with ketchup exactly the way you proposed. Following module parameters are in my grub.conf:

title=Linux_28
root (hd0,1)
kernel /boot/kernel-2.6.28-rc8 root=/dev/sda2 quiet cx88xx.core_debug=1 tuner.debug=1 tuner_simple.debug=1 cx88xx.tuner=29

See the attached dmesg...

Unfortunately, there is an error when applying the patch:


# patch -p1 --dry-run < ../revert-cx88-tuner-setup-changes.patch 
patching file drivers/media/video/cx88/cx88-cards.c
Hunk #2 succeeded at 2750 (offset 297 lines).
Hunk #3 succeeded at 2780 with fuzz 2 (offset 299 lines).
Hunk #4 FAILED at 2861.
Hunk #5 succeeded at 2889 (offset 310 lines).
Hunk #6 succeeded at 3031 (offset 314 lines).
1 out of 6 hunks FAILED -- saving rejects to file drivers/media/video/cx88/cx88-cards.c.rej
patching file drivers/media/video/cx88/cx88-i2c.c
Hunk #1 FAILED at 99.
1 out of 1 hunk FAILED -- saving rejects to file drivers/media/video/cx88/cx88-i2c.c.rej

I may be able try out any further suggestions this evening (no promise), but after that I'll be away until the beginning of next year...
Comment 36 Axel Dyks 2008-12-17 23:44:51 UTC
(In reply to comment #35)
> I successfully installed the new kernel with ketchup exactly the way you
> proposed. Following module parameters are in my grub.conf:
> 
> title=Linux_28
> root (hd0,1)
> kernel /boot/kernel-2.6.28-rc8 root=/dev/sda2 quiet cx88xx.core_debug=1
> tuner.debug=1 tuner_simple.debug=1 cx88xx.tuner=29

You should try without cx88xx.tuner=29, because teh tuner is supposed
to be automatically detected.

  
> Unfortunately, there is an error when applying the patch:
Yeah, I know. The patched can't be applie to 2.6.28 sources.

Anyway, the problem seems to be GONE on 2.6.28-rcX, isn't it?
Comment 37 Atanas Kamburov 2008-12-18 19:27:58 UTC
yes, from the first look at dmesg I think so too. didn't have much time to look in details though... I think I'll just wait until the nvidia drivers can be compiled against kernel 2.6.28 and then test the behavior of mplayer, tvtime, etc...

Anyways, thanks very much for the support, I appreciate that! 
Comment 38 Axel Dyks 2008-12-18 20:22:43 UTC
Ok, I've tagged this bug with "linux-2.6.28" so that we know, it will probably
be solved as soon as 2.6.28 gets released and we have it in gentoo-sources.

Meanwhile I would suggest to use lastest 2.6.26 or 2.6.27 kernel from
gentoo-sources and compile your cx88 driver as a module.

In case you would like to further investigate your "mencoder" problem
on a kernel that detects your tuner (see above), you should open
a separate bug.

Thanks for your all the work you've done (so far) to help track down the bug. 
Comment 39 Axel Dyks 2008-12-18 20:39:52 UTC
Hmm, just found this

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3e01084519a678b410df247581a51eeb1bbf11d5

on linus tree which is not (yet) in 2.6.27, but in 2.6.28-rc.

Looks like it's heavily related to your "loosing channel after quitting tvtime"
problem.
Comment 40 Atanas Kamburov 2008-12-18 21:42:19 UTC
(In reply to comment #39)
> Hmm, just found this
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3e01084519a678b410df247581a51eeb1bbf11d5
> 
> on linus tree which is not (yet) in 2.6.27, but in 2.6.28-rc.
> 
> Looks like it's heavily related to your "loosing channel after quitting tvtime"
> problem.
> 

Right, this looks very close. I am curious about the results when 2.6.28 hits gentoo portage. 

Meanwhile, I will follow your advice and use the driver as module; for recording (which does not happen very often) I will switch to the 2.6.25 kernel. However I will continue to follow the behavior of my TV card and report again if there are problems later on.

Cheers!
Comment 41 Atanas Kamburov 2009-01-05 17:45:34 UTC
Happy New Year!

Today I installed the 2.6.28-gentoo sources, and compiled the TV card driver as built-in. Changing channels in tvtime works! That's the good news.
The bad news is that when I exit tvtime, the channel is lost and I cannot record with mencoder (like before), but as we discussed earlier, I will open a new bug report on this one soon.
Comment 42 Daniel Drake (RETIRED) gentoo-dev 2009-01-07 20:17:35 UTC
OK, let's resolve this one as fixed in 2.6.28.