4 reasons why I’m moving back to Fedora from Freebsd

I had FreeBSD as a home server working well. One day I decided to merge my 2 computers, as I’m concerned about global warming and climate change. I had a workstation with Fedora and my home server with FreeBSD. I decided to leave FreeBSD as single OS (big mistake!).

After 1 month of being used FreeBSD as a desktop, today I decided to move all my data back from ZFS/UFS to ext4, and install Fedora on it.

These are the problems that I had:

  • Kozumi ktv-01c TV synthesizer not working. These was obvious I didn’t expect it to work, I tried the driver that freebsd has called bktr, tried all possible configurations without success.
  • Sound card working partially!!. My sound card HDA Analog Devices AD1986A is working partially. The spearkers works ok. The front input and output for headsets are not. The mic in just have white noise. The line in was not working also. After posting in the FreeBSD forum and sending emails to the mailing list, they help me to change some kernel parameters to be able to record from line. But anyway, sound was not being routed to speakers, so I could not use my mixer and listen what I was mixing.
  • Sometimes I got a kernel panic or something like that. I had to hard reboot my PC. After the reboot I could have 2 ugly behaviors. 1. I have a RAID1 mirror with all my data, after the crash a resynchronization started. While it was resynchronizing I could not use my keyboard. Furthermore, I could not use my computer. 2. UFS is a girl, it remembered as ext2, for anything it’s requires an fsck, and I didn’t enjoy to fsck a filesystem will all my data on it.
  • A ugly bug with my network nvidia card. Sometimes when I rebooted my PC I got a message and my network card was useless. I had to turn off my PC, unplug the power core so all the buffers were clean and boot it again.

Conclusion:

I wouldn’t use FreeBSD as a desktop any more. I will miss features like jails that make me feel secure, it was great to run applications that I don’t trust like tranmission or aMule inside a jail, but it’s no big deal comparing that with all the cons I found.

How to setup kozumi KTV-01C (chip bt878 rev11)

I have setup this card with gentoo 2008. In some others distributions like Ubuntu or Fedora, I’m sure it should be easier.

The card that I’m writing about is:

04:09.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
04:09.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)

It works with module bt878

Device Drivers ---]
[M] Video For Linux
[*] Enable Video For Linux API 1 compatible Layer
[*] Video capture adapters ---]
[M] BT848 Video For Linux
[*] DVB/ATSC Support for bt878 based TV cards

make && make modules_install

after that we edit /etc/modprobe.conf or /etc/modprobe.d/bttv and we add the following lines:

alias char-major-81 videodev
alias char-major-81-0 bttv
options bttv pll=1 card=120 radio=1 tuner=38 remote=1 bttv_verbose=1 gbuffers=4
options ir_common debug=1

Now we can try the card with:

modprobe bttv
modprobe tuner

We can check if they loaded successfully:

# dmesg | grep bttv
bttv: driver version 0.9.17 loaded
bttv: using 4 buffers with 2080k (520 pages) each for capture
bttv: Bt8xx card found (0).
bttv0: Bt878 (rev 17) at 0000:04:09.0, irq: 17, latency: 32, mmio: 0xfdaff000
bttv0: using: Conceptronic CONTVFMi [card=120,insmod option]
bttv0: gpio: en=00000000, out=00000000 in=007fc0ff [init]
bttv0: tuner type=38
bttv0: i2c: checking for MSP34xx @ 0x80... not found
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: registered device radio0
bttv0: PLL: 28636363 =] 35468950 .. ok
input: bttv IR (card=120) as /class/input/input4
bttv0: PLL can sleep, using XTAL (28636363).

# dmesg | grep tuner
bttv0: tuner type=38
tuner’ 0-0060: chip found @ 0xc0 (bt878 #0 [sw])
tuner-simple 0-0060: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3))

Install tvtime:

emerge tvtime

You should set it to the norm of you country, I set it to PAL-Nc:

$ tvtime-configure -n PAL-Nc
$ tvtime-scanner

And if everything went well, we should see something like this:

Scanning using TV standard PAL-NC.
Scanning from 44.00 MHz to 958.00 MHz.
Found a channel at 54.50 MHz (52.50 - 56.25 MHz), adding to channel list.
Found a channel at 66.50 MHz (64.25 - 68.50 MHz), adding to channel list.
Checking 79.00 MHz: - No signal

Last, but not least, we have to add to /etc/modules.autoload.d/kernel-2.6 tuner:

echo "tuner" ]] /etc/modules.autoload.d/kernel-2.6

Remote Control

In order to setup the remote control you have to edit a few lines in the kernel module. We are going to edit $source/drivers/media/common/ir-keymaps.c:

Anf where it says IR_KEYTAB_TYPE we remove all the keys and we leave it like this:

IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE] = {
[ 0x00 ] = KEY_0,
[ 0x01 ] = KEY_1,
[ 0x02 ] = KEY_2,
[ 0x03 ] = KEY_3,
[ 0x04 ] = KEY_4,
[ 0x05 ] = KEY_5,
[ 0x06 ] = KEY_6,
[ 0x07 ] = KEY_7,
[ 0x08 ] = KEY_8,
[ 0x09 ] = KEY_9,
[ 0x1c ] = KEY_RADIO, /* FM Radio */
[ 0x0a ] = KEY_BACKSPACE, /* Recall */
[ 0x12 ] = KEY_ESC, /* POWER */
[ 0x18 ] = KEY_LEFT, /* VOL- */
[ 0x0c ] = KEY_RIGHT, /* VOL+ */
[ 0x16 ] = KEY_ENTER, /* OK */
[ 0x17 ] = KEY_D, /* Plus */
[ 0x10 ] = KEY_F, /* Mode */
[ 0x0b ] = KEY_UP, /* CH+ */
[ 0x0b ] = KEY_UP, /* CH+ */
[ 0x15 ] = KEY_DOWN, /* CH- */
[ 0x14 ] = KEY_H, /* OSD */
[ 0x13 ] = KEY_MUTE, /* Mute */
[ 0x0f ] = KEY_BACKSPACE, /* Prev */
[ 0x0e ] = KEY_STOP, /* Stop */
[ 0x1f ] = KEY_PLAY, /* Play */
[ 0x1e ] = KEY_PAUSE, /* Pause */
[ 0x1d ] = KEY_RECORD, /* Record */
[ 0x1a ] = KEY_F7, /* Next */
[ 0x0f ] = KEY_A, /* */
[ 0x1b ] = KEY_F5, /* Time Shift */
[ 0x19 ] = KEY_S, /* Snapshot */
[ 0x0f ] = KEY_F6, /* Prev */
[ 0x0d ] = KEY_E, /* Stereo */
[ 0x11 ] = KEY_I /* Source */
};

EXPORT_SYMBOL_GPL(ir_codes_pixelview);

Then, in the kernel source directory, we run:

make && make modules_install y listo.

I got some hints from:

http://www.linuxforums.org/forum/peripherals-hardware/91984-remote-controller-bt878-kozumi-ktv-01c.html

Como configurar placa capturadora kozumi KTV-01C (con chip bt878 rev11)

Me llevo un par de días asi que lo comparto con ustedes, ya que le puede beneficiar a alguien mas

En este caso yo lo configure con gentoo 2008, quizás haya distribuciones, en las que les sea aun mas fácil configurar este dispositivo.

La placa en cuestión es:

04:09.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
04:09.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)

Que funciona con el modulo bt878

Device Drivers ---]
[M] Video For Linux
[*] Enable Video For Linux API 1 compatible Layer
[*] Video capture adapters ---]
[M] BT848 Video For Linux
[*] DVB/ATSC Support for bt878 based TV cards

make && make modules_install

Editamos /etc/modprobe.conf o /etc/modprobe.d/bttv y agregamos los datos del modulo:

alias char-major-81 videodev
alias char-major-81-0 bttv
options bttv pll=1 card=120 radio=1 tuner=38 remote=1 bttv_verbose=1 gbuffers=4
options ir_common debug=1

Ahora podemos probar con:

modprobe bttv
modprobe tuner

Podemos verificar que los modulos esten arriba:

# dmesg | grep bttv
bttv: driver version 0.9.17 loaded
bttv: using 4 buffers with 2080k (520 pages) each for capture
bttv: Bt8xx card found (0).
bttv0: Bt878 (rev 17) at 0000:04:09.0, irq: 17, latency: 32, mmio: 0xfdaff000
bttv0: using: Conceptronic CONTVFMi [card=120,insmod option]
bttv0: gpio: en=00000000, out=00000000 in=007fc0ff [init]
bttv0: tuner type=38
bttv0: i2c: checking for MSP34xx @ 0x80... not found
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: registered device radio0
bttv0: PLL: 28636363 =] 35468950 .. ok
input: bttv IR (card=120) as /class/input/input4
bttv0: PLL can sleep, using XTAL (28636363).

# dmesg | grep tuner
bttv0: tuner type=38
tuner' 0-0060: chip found @ 0xc0 (bt878 #0 [sw])
tuner-simple 0-0060: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3))


Instalamos tvtime:

emerge tvtime

configuramos la norma PAl-Nc para nuestro usuario:

$ tvtime-configure -n PAL-Nc
$ tvtime-scanner

Y si todo salio bien, deberíamos ver una salida como esta:

Scanning using TV standard PAL-NC.
Scanning from 44.00 MHz to 958.00 MHz.
Found a channel at 54.50 MHz (52.50 - 56.25 MHz), adding to channel list.
Found a channel at 66.50 MHz (64.25 - 68.50 MHz), adding to channel list.
Checking 79.00 MHz: - No signal

Por ultimo agregamos a /etc/modules.autoload.d/kernel-2.6 tuner:

echo "tuner" ]] /etc/modules.autoload.d/kernel-2.6

Y ya esta, para configurar el control remoto, hay que editar el mapeo de las teclas dentro del modulo del kernel compilado (haga una copia de seguridad de este antes de editar el modulo):

editamos
$source/drivers/media/common/ir-keymaps.c:

Y donde esta definido IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]:

borramos todas las keys y lo dejamos asi:

IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE] = {
[ 0x00 ] = KEY_0,
[ 0x01 ] = KEY_1,
[ 0x02 ] = KEY_2,
[ 0x03 ] = KEY_3,
[ 0x04 ] = KEY_4,
[ 0x05 ] = KEY_5,
[ 0x06 ] = KEY_6,
[ 0x07 ] = KEY_7,
[ 0x08 ] = KEY_8,
[ 0x09 ] = KEY_9,
[ 0x1c ] = KEY_RADIO, /* FM Radio */
[ 0x0a ] = KEY_BACKSPACE, /* Recall */
[ 0x12 ] = KEY_ESC, /* POWER */
[ 0x18 ] = KEY_LEFT, /* VOL- */
[ 0x0c ] = KEY_RIGHT, /* VOL+ */
[ 0x16 ] = KEY_ENTER, /* OK */
[ 0x17 ] = KEY_D, /* Plus */
[ 0x10 ] = KEY_F, /* Mode */
[ 0x0b ] = KEY_UP, /* CH+ */
[ 0x0b ] = KEY_UP, /* CH+ */
[ 0x15 ] = KEY_DOWN, /* CH- */
[ 0x14 ] = KEY_H, /* OSD */
[ 0x13 ] = KEY_MUTE, /* Mute */
[ 0x0f ] = KEY_BACKSPACE, /* Prev */
[ 0x0e ] = KEY_STOP, /* Stop */
[ 0x1f ] = KEY_PLAY, /* Play */
[ 0x1e ] = KEY_PAUSE, /* Pause */
[ 0x1d ] = KEY_RECORD, /* Record */
[ 0x1a ] = KEY_F7, /* Next */
[ 0x0f ] = KEY_A, /* */
[ 0x1b ] = KEY_F5, /* Time Shift */
[ 0x19 ] = KEY_S, /* Snapshot */
[ 0x0f ] = KEY_F6, /* Prev */
[ 0x0d ] = KEY_E, /* Stereo */
[ 0x11 ] = KEY_I /* Source */
};

EXPORT_SYMBOL_GPL(ir_codes_pixelview);

luego en la raiz del kernel ejecutamos nuevamente:

make && make modules_install y listo.

Eso fue todo.

Ya pueden usar su placa con cualquier programa de captura de video, pueden usar Tvtime, ya que sabemos que detecto los canales.

D.

Un poco de ayuda de:

http://www.linuxforums.org/forum/peripherals-hardware/91984-remote-controller-bt878-kozumi-ktv-01c.html