# Kernel choice with MythTV

## SweWiLLiE

Hi.

I just did a Stage2 install, and i'm at the point where I need to choose the kernel.

I've read plenty of guides on howto setup a Gentoobox with mythtv,

but most of them are somewhat outdated.

Any suggestion on what kernel to choose?

Reading here, http://home.comcast.net/~alf_park/mythtv.html, "The gentoo-dev-sources already contains the lirc/lirc-i2c patches which is a blessing in disguise",

is that still the case with newer gentoo-dev-sources kernels?

Now, this box wont be a fullblown htpc, I guess I mostly want to be able to set up my recordings via mythweb and view them later on other machines.

But still it would be nice to be able to use the remote.

This is a P3-600 box with a PVR-250, Voodoo5 + 3 disks. (15gb, 150gb, 200gb)

Any advice would be most helpful.

Thanks.

Edit:

http://gentoo-wiki.com/HARDWARE_Setup_MythTV

"Note: As of December 2004 and Kernel 2.6.9, the LIRC patch is no longer included in either the Gentoo or Love sources. What finally worked for me were the plain-old, unpatched, vanilla 2.6.9 sources (emerge development-sources)"

http://dev.gentoo.org/~cardoe/mythtv/

"Warning: Please select a 2.6 kernel, preferably gentoo-dev-sources."

So what's left is development-sources??

Edit2:

Or can I emerge gentoo-dev-sources and then emerge lirc, and that will work? (that will save me time as I want fbsplash too)

----------

## masonm

gentoo-dev-sources should work fine.

----------

## racoontje

You don't need anything special -- just V4L support and support for your specific TV hardware. All are in the default kernel sources, so I suggest gentoo-dev-sources.

----------

## SweWiLLiE

Thanks.

I emerged gentoo-dev-sources and I think I enabled all the necessary stuff in the kernel.

 *Quote:*   

> You don't need anything special -- just V4L support and support for your specific TV hardware.

 

If you mean:

```

* Multimedia devices --->

         o <M> Video For Linux

         o Video For Linux --->

               + <M> BT848 Video For Linux
```

then yes. (As i wrote, I have a PVR-250)

----------

## JetAce44

I was having trouble getting LIRC and IVTV to work with anything above kernel 2.6.5. I tried all sorts of flavors, including gentoo-dev-sources, so your mileage may vary. Good luck, and let me know if you get it working!

I'm still having a problem where I cant tune to channels above ~60 under linux. Everything tunes fine and is crystal clear under windows.

----------

## racoontje

 *SweWiLLiE wrote:*   

> Thanks.
> 
> I emerged gentoo-dev-sources and I think I enabled all the necessary stuff in the kernel.
> 
>  *Quote:*   You don't need anything special -- just V4L support and support for your specific TV hardware. 
> ...

 

That should be OK, however I am not familliar with the PVR-250 so I don't know if the BT848 driver is the correct driver -- but I assume you've done your research.

----------

## SweWiLLiE

 *Quote:*   

> I was having trouble getting LIRC and IVTV to work with anything above kernel 2.6.5. I tried all sorts of flavors, including gentoo-dev-sources, so your mileage may vary.

 

That doesnt sound very promising. Oh well, we shall see.

 *Quote:*   

> Good luck, and let me know if you get it working!

 

Sure, no problem  :Smile: 

I will continue as soon as it's done compiling. (i emerged "evilwm kdebase mplayer" and it's been at it for 9hours+ now)

 *Quote:*   

> I'm still having a problem where I cant tune to channels above ~60 under linux.

 

Lucky me then.  :Wink:  I'm in Sweden and my channels don't go that high. (Now anyway since I cancelled my ComHem subscription.)

 *Quote:*   

> That should be OK, however I am not familliar with the PVR-250 so I don't know if the BT848 driver is the correct driver -- but I assume you've done your research.

 

Well, to be honest i don't know either. I followed a guide, + I could'nt see anything other related to PVR-250 under "Video For Linux".

----------

## iverson0881

PVR-250 requires the ivtv driver. It is in portage.

----------

## SweWiLLiE

 *Quote:*   

> PVR-250 requires the ivtv driver. It is in portage.

 

Jepp.. Thats on my "todo-list" after the current compiling is done.

From the guide:

 *Quote:*   

> ivtv is masked but available in portage. The better solution, however, is to use the latest stable version which is (as of 2004-11-04) ivtv-0.2.0-rc2l.

 

I'm thinking of going that route instead. If thats unessesary please tell me.  :Smile: 

----------

## SweWiLLiE

For those who wanted an update..

All is now compiled (mysql, mythtv 0.17 etc.)

* I had to download/compile latest xmltv to get it to work with mythtv. (Remember: Sweden here)

* I downloaded "ivtv-0.2.0-rc3i" (latest stable) and compiled it myself.

Current Status:

* The remote works.

* No picture on the pvr-250.

dmesg Yesterday:

```
ivtv: Initialized WinTV PVR 250, card #0
```

dmesg Today:

```
ivtv: i2c client addr:  0x40 not found!
```

/sbin/lspci -v:

```
0000:00.0e.0 Multimedia video controller: Internext Compression Inc: iTVC16 (CX23416) MPEG-2 Encoder (rev 01)

Subsystem: Hauppauge computer works Inc. WinTV PVR 250

Flags: bus master, medium devsel, latency 64, IRQ 11

Memory at e4000000 (32-bit, prefetchable)

Capabilities: [44] Power Management version 2
```

ls -al /dev/video*

```
lr-xr-xr-x 1 root root 10 Mar 22 21:23 /dev/video0 -> v4l/video0

lr-xr-xr-x 1 root root 10 Mar 22 21:23 /dev/video24 -> v4l/video24

lr-xr-xr-x 1 root root 10 Mar 22 21:23 /dev/video32 -> v4l/video32
```

ls -al /dev/v4l/video*

```
crw-------  1 willie video 81,  0 Jan 1 1970 /dev/v4l/video0

crw-------  1 willie video 81, 24 Jan 1 1970 /dev/v4l/video24

crw-------  1 willie video 81, 32 Jan 1 1970 /dev/v4l/video32
```

/etc/modules.d/ivtv

```
alias char-major-81 videodev

alias char-major-81-0 ivtv

alias char-major-61 lirc_i2c

#options ivtv ivtv-debug=0 mpg_buffers=90

#options tuner type=2

#options msp3400 once=1 simple=1 debug=0

#add below ivtv msp3400 saa7115 tuner

add above ivtv lirc_dev lirc_i2c

#From Wilsonet

alias tveeprom tveeprom-ivtv

alias msp3400 msp3400-ivtv

options ivtv tda9887=0

options ivtv ivtv_std=2 tda9887=0
```

Tried different settings.

Did the usual

```
modprobe ivtv

ivtvctl -u 0xff

ivtvctl -p 4

ivtvctl -f width=720,height=576

cat /dev/video0 > test.mpg
```

And the result is a black picture.

Emerged both xawtv & tvtime.

scantv finds nothing.

So there I am now, thinking of what to do next.  :Question: 

----------

## psylence

Check your tuner type...  The company pulled a switch-o without changing the version of the card, and some newer PVR-250's have a totally different tuner chip!

```
alias char-major-81 videodev

alias char-major-81-0 ivtv

options ivtv ivtv-debug=0 mpg_buffers=90

options tuner type=39

options msp3400 once=1 simple=1 debug=0

add below ivtv msp3400 saa7115 tuner

```

That's mine, tuner=39.

I spent a good few days with tuner=2 before switching that and viola it worked.  Could be your case as well.

----------

## SweWiLLiE

Alright, changed tuner type to 29.. I assume thats correct since it reports that in dmesg (ivtv section).

Do xawtv work with pvr-250?

After I changed tunertype I rebooted and ran scantv.. still found nothing.

tvtime refuses to function. Can't even enter the "Change video source" in the "Setup - Input configuration".

But everything looks alright, the dmesg output, I can change the cards setting via ivtvctl and it accepts it. hmmm.

```
ivtv: ==================== START INIT IVTV ====================

ivtv: version 0.2.0 (rc3i) loading

ivtv: Linux version: 2.6.11-gentoo-r4 SMP preempt VIAC3-2 4KSTACKS gcc-3.3

ivtv: In case of problems please include the debug info

ivtv: between the START INIT IVTV and END INIT IVTV lines when

ivtv: mailing the ivtv-devel mailinglist.

ivtv: Autodetected WinTV PVR 250 card

ivtv: Found an iTVC16 based chip

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11

ACPI: PCI interrupt 0000:00:0e.0[A] -> GSI 11 (level, low) -> IRQ 11

ivtv: VIA PCI device: 0x0691 vendor: 0x1106

tveeprom: Hauppauge: model = 32054, rev = B148, serial# = 7263459

tveeprom: tuner = LG TP18PSB11D (idx = 48, type = 29)

tveeprom: tuner fmt = PAL(B/G) (eeprom = 0x04, v4l2 = 0x00000007)

tveeprom: audio_processor = CS5331 (type = 9)

ivtv: i2c attach [client=tveeprom[0],ok]

ivtv: Tuner Type 29, Tuner formats 0x00000007, Radio: yes, Model 0x00891518, Revision 0x00000000

ivtv: PAL tuner detected

ivtv: Radio detected

tuner: Ignoring new-style parameters in presence of obsolete ones

tuner: chip found at addr 0xc2 i2c-bus ivtv i2c driver #0

ivtv: i2c attach [client=(tuner unset),ok]

tuner: type set to 29 (LG PAL_BG (TPI8PSB11D)) by insmod option

tuner: The type=<n> insmod option will go away soon.

tuner: Please use the tuner=<n> option provided by

tuner: tv aard core driver (bttv, saa7134, ...) instead.

saa7115: starting probe for adapter ivtv i2c driver #0 (0x10005)

saa7115: detecting saa7115 client on address 0x42

saa7115: writing init values

ivtv: i2c attach [client=saa7115[0],ok]

saa7115: status: (1E) 0x00, (1F) 0xc0

msp34xx: ivtv version

msp34xx: init: chip=MSP3418W-B3, has NICAM support, simple (D) mode, simpler (G) no-thread mode

msp34xx: $Id$ compiled on: Mar 22 2005 01:32:54

ivtv: i2c attach [client=MSP3418W-B3,ok]

ivtv: Encoder revision: 0x02040011

ivtv: Configuring WinTV PVR 250 card with 5 streams

ivtv: Create DMA stream 0 using 256 16384 byte buffers  4194304 kbytes total

ivtv: Registered v4l2 device, streamtype 0 minor 0

ivtv: Create DMA stream 1

ivtv: Registered v4l2 device, streamtype 1 minor 32

ivtv: Create stream 2 using 40 52224 byte buffers  2097152 kbytes total

ivtv: Registered v4l2 device, streamtype 2 minor 224

ivtv: Create DMA stream 3 using 455 4608 byte buffers  2097152 kbytes total

ivtv: Registered v4l2 device, streamtype 3 minor 24

ivtv: Create stream 4

ivtv: Registered v4l2 device, streamtype 4 minor 64

ivtv: Setting Tuner 29

saa7115: decoder set input (4)

saa7115: now setting Composite input

ivtv: Setting audio matrix to input 3, output 1

ivtv: Switching standard to PAL.

ivtv: ivtv_enc_thread: pid = 5393, itv = 0xd5117080

saa7115: decoder set norm PAL

saa7115: set audio: 0x01

ivtv: Initialized WinTV PVR 250, card #0

ivtv: ====================  END INIT IVTV  ====================
```

Edit:

I seem to have missed this before, but right after ivtv is loaded it spits out: *Quote:*   

> modprobe: FATAL: Error inserting bttv (/lib/modules/2.6.11-gentoo-r4/kernel/drivers/media/video/bttv.ko):  Unknown symbol in module, or unknown paramenter (see dmesg)

 

dmesg: *Quote:*   

> bttv: Unknown symbol tveeprom_Read
> 
> bttv: Unknown symbol tveeprom_hauppauge_analog

 

Maybe that is related to my problem?

Edit2:

Nope, that wasn't it.

No errors with these settings in /etc/modules.d/ivtv

```
alias char-major-81 videodev

alias char-major-81-0 ivtv

alias char-major-61 lirc_i2c

#From Wilsonet

alias tveeprom tveeprom-ivtv

alias msp3400 msp3400-ivtv

#options ivtv ivtv-debug=0 mpg_buffers=90

#options msp3400 once=1 simple=1 debug=0

options tuner type=29

#From Wilsonet

options ivtv tda9887=0

#options ivtv ivtv_std=2 tda9887=0

#add below ivtv msp3400 saa7115 tuner

add above ivtv lirc_dev lirc_i2c
```

----------

## SweWiLLiE

It's working  :Razz: 

Final check is to see if i got sound in my scheduled recording. (I'ts flagging commercials right now, and then of to transcoding)

I was totally blown away by MythWeb. Truly beautiful.  :Shocked: 

Edit: ok, more job to be done.

* No sound (*** Solved)

* transcoding failed (log states: 2005-03-23 08:41:04.161 Unknown video codec:) (*** Solved)

Any pointers?

Edit: All good. Everything is working now.  :Smile: 

----------

## Cubano

Hi - Glad to hear its working for you. 

Any chance you could post your kernel config.

----------

## SweWiLLiE

Sure.

Don't know how to attach the file, so I put it on my server instead.

http://willie.pointclark.net/kernel_config (linux-2.6.11-gentoo-r4)

----------

## Deathwing00

Moved from Installing Gentoo.

----------

## Cubano

Thanks for posting the config.

You said you wrre getting an error - which you solved:

```

modprobe: FATAL: Error inserting bttv (/lib/modules/2.6.11-gentoo-r4/kernel/drivers/media/video/bttv.ko): Unknown symbol in module, or unknown paramenter (see dmesg)

```

I get a similar error but not for bttv but ivtv.

How did you solve?

```

#

# Digital Video Broadcasting Devices

#

# CONFIG_DVB is not set

CONFIG_VIDEO_TUNER=m

CONFIG_VIDEO_BUF=m

CONFIG_VIDEO_BTCX=m

CONFIG_VIDEO_IR=m

CONFIG_VIDEO_TVEEPROM=m

```

[/code]

Also, the above? Can;t seem to find it. 

Is it crucial - where is it configured in the kernel I couldn't seem to find the options.

IS it under the Video for Linux kernel options?

----------

## SweWiLLiE

 *Quote:*   

> How did you solve? 

 

Well, I played around with the settings in /etc/modules.d/ivtv until it worked.

```
alias char-major-81 videodev

alias char-major-81-0 ivtv

alias char-major-61 lirc_i2c

#From Wilsonet

#alias tveeprom tveeprom-ivtv

#alias msp3400 msp3400-ivtv

#options ivtv ivtv-debug=0 mpg_buffers=90

#options msp3400 once=1 simple=1 debug=0

options tuner type=29

#From Wilsonet

#options ivtv tda9887=0

#options ivtv ivtv_std=2 tda9887=0

#add below ivtv msp3400 saa7115 tuner

add above ivtv lirc_dev lirc_i2c
```

Thats what I use now. The box has been up for 24 days and not one problem.

Your modprobe error could perhaps be order related? (and check dmesg)

About that DVB problem:

Last time I saw them were under Device drivers ---> Multimedia devices --> Digital Video Broadcasting Devices.

Though, I'm looking there now, and they're gone.

Perhaps I've updated my kernel since the first installed version and just copied over the .config. I honestly can't remember.

If you're using a pvr-250/350 you don't need DVB.

A few days ago I even upgraded to the latest mythtv 0.18.

Not a single problem so far.  :Smile: 

----------

## Cubano

irtv and lirc are working nicely now.

Seems as though I needed to set allow module unloading. Not sure though - never mind.

BTW did you upgrade to Mythtv 0.18 using portage? There's  no ebuild in my portage tree - maybe I'll sync...

----------

## SweWiLLiE

I just checked and I have "module unloading" activated.

```
---->Loadable module support

[*] Enable loadable module support

[*] Module unloading

[*] Automatic kernel module unloading
```

Strange.

Anyhow, to get Mythtv 0.18 i found some ebuilds and added them myself.

But I see that 0.18 is hardmasked now, so just unmask them and see if that works.

----------

