Cx88 devices (cx2388x): Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
Line 53: Line 53:
Until someone writes a generic card installation page, please refer to [[Generic SAA7134 Card Installation]]. For details, see the individual cards below -- and please add your own!
Until someone writes a generic card installation page, please refer to [[Generic SAA7134 Card Installation]]. For details, see the individual cards below -- and please add your own!


===[[DViCO FusionHDTV 5 Gold]]===
===[[Generic Installation]]===


This installation method has been tested with a DViCO FusionHDTV 5 Gold but I have been told that it can be used as generic installation instructions for any device that uses the cx88 driver.
I have successfully configured this card using both the x86 and AMD64 arches. I use Gentoo as my distribution but it should be intelligible enough to convert to any other distribution. You'll see that all of the TV tuner related drivers are being compiled as modules. This allows MythTV to detect the TV tuner card and let you send parameters to the modules.

Below you will see that all of the TV tuner related drivers are being compiled as modules. This allows MythTV to detect the TV tuner card and let you send parameters to the modules.


'''Kernel'''
'''Kernel'''


When compiling the kernel, here are the options you need to tick:
When compiling the kernel, here are the options you need to tick:

Loadable module support:

[*] Enable loadable module support
[*] Module unloading
[*] Forced module unloading
[*] Automatic kernel module loading


Device Drivers->Multimedia devices:
Device Drivers->Multimedia devices:
Line 71: Line 80:
<M> Conexant 2388x DMA audio support
<M> Conexant 2388x DMA audio support
<M> DVB/ATSC Support for cx2388x based TV cards
<M> DVB/ATSC Support for cx2388x based TV cards

If your card supports has blackbird mpeg encoder support, you'll need to compile the module for that. The DViCO FusionHDTV 5 Gold card does not have the blackbird mpeg encoder, so it's not necessary tick this option for that card.

<M> Blackbird MPEG encoder support (cx2388x + cx23416)


Digital Video Broadcasting Devices:
Digital Video Broadcasting Devices:
Line 77: Line 90:
<M> DVB Core Support
<M> DVB Core Support


If you are really familiar with the hardware, you can save some system memory by only selecting the DVB Frontends that the card needs. This is accomplished as follows:
Don't tick "Load and attach front-end modules as needed" unless for some reason you don't want the front-end automatically loaded when the cx88 driver is loaded. If you check this, then you will need to load the lgdt330x module in addition to the other modules.


[*] Load and attach frontend modules as needed
'''Modules to Load on Boot'''


Customise DVB Frontends--->
Here are the modules that should be loaded when booting. You will need to add them to this file if you are using Gentoo: /etc/modules.autoload.d/kernel-2.6

[*] Customise the frontend modules to build

Then if you are using a DViCO FusionHDTV 5 Gold card, you would tick these two options:

<M> LG Electronics LGDT3302/LGDT3303 based
<M> LG TDVS-H06xF ATSC tuner

'''Note:''' The current kernel, 2.6.20, does not automatically load the cx88-dvb driver when a program like mplayer requests to use it. This problem will most likely be fixed in kernel 2.6.21, but in the mean time, you will either need to load it using:

modprobe cx88-dvb

or you can specify it in your modprobe.conf file which in gentoo would be /etc/modules.autoload.d/kernel-2.6 so that it will load when the computer boots:


cx88xx
cx8800
tuner
dvb-core
cx88-dvb
cx88-dvb


'''Sound'''
'''Sound'''


When tuning analog channels, you have two ways you can receive the sound. You can get it through the cable that connects to the board or through the cx88-alsa driver.
When tuning digital channels, all you need is a functioning sound card with no further configuration. When tuning analog channels, there are two ways you can receive the sound. You can get it through the internal audio cable that connects tuner board to the sound card or through the cx88-alsa driver.


'''''Physical Cable Connection'''''
'''''Internal Audio Cable'''''


In order to get the sound through the cable, you need to have an auxiliary jack on your motherboard or sound card so you can hook the card up to that auxiliary port. Then you need to plug some kind of device into the analog stereo jack on your motherboard or sound card.
In order to get the sound through the cable, you need to have an audio port on your tuner card and an auxiliary jack on your motherboard or sound card so you can hook the tuner card up to that auxiliary port. Then you need to plug some kind of device like speakers, headphones, etc. into the analog stereo jack on your motherboard or sound card.


'''Note:''' The sound is only output to the analog jack with this method. If you use something other than the analog jack like SPDIF or any other kind of digital audio jack for your speakers, you will need to have some way of switching to the input on your speakers or amp to the analog jack when you want to tune analog channels.
'''Note:''' The sound is only output to the analog jack with this method. If you use something other than the analog jack like SPDIF or any other kind of digital audio jack for your speakers, you will need to have some way of switching input on your speakers or amp to the analog jack when you are tuning analog channels.


'''''Alsa'''''
'''''Alsa'''''


Using DMA audio with the cx88-alsa driver is probably the best choice for capturing the analog sound. It doesn't use internal ports on your motherboard or sound card and for some people it might be the only choice since they might only have one internal audio port that is already in use. It is also beneficial if you have multiple tuner cards while still having a finite or small number of internal audio ports.
The cx88-alsa module is loaded differently than the other modules. If it was loaded with the other modules, it could possibly become the default sound device which would cause problems on your system when applications expect that the first sound device is the one that can output sound.


Since many programs generally look for the output sound device as the first device, you will need to configure your sound card or onboard sound to be the first device. This requires knowledge of all the sound hardware connected to your computer. You can start by finding out what audio devices you have like this:
So you will need to add a few lines the file that configures the sound card for cx88-alsa. This will ensure that it is configured as the second sound device like this. In Gentoo, you need to add them to this file: /etc/modules.d/alsa.


lspci -v | grep -i audio
#Dvico Card Sound Capture Device
alias snd-card-1 cx88-alsa
alias sound-slot-1 cx88-alsa


which will produce something like this:
Here's an example of how your alsa file would look if you had via82xx as your default sound device and cx88-alsa as the second sound device:

00:0d.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)
00:0d.1 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 05)
00:0d.2 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)

This shows that I have the Conexant CX23880 chip and the VIA VT8233 chip. Now that you have a listing of devices, you need to determine which device is your default output device. In this case, it would be the VIA VT8233 chip which is an onboard motherboard audio device.

'''Note:''' You cannot use alsaconf if you have more than one sound device because it is only capable of configuring one device. I suggest you get familiar with the alsa configuration of sound devices so that you can configure more than one sound device.

On gentoo, you configure the sound with /etc/modules.d/alsa and after you make changes to that file, you need to run modules-update. For other versions of linux, you will need to configure /etc/modprobe.conf. Here's an example of how an onboard VIA sound device should be configured with the DViCO FusionHDTV 5 Gold card:


#via82xx Sound Device
alias char-major-116 snd
alias char-major-116 snd
alias char-major-14 soundcore
alias char-major-14 soundcore
#Force Sound Device Sequence
options snd-via82xx index=0
options cx88-alsa index=1
#via82xx Sound Device
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-1 snd-seq-oss
Line 119: Line 155:
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias sound-service-0-12 snd-pcm-oss
alias /dev/dsp snd-pcm-oss
alias snd-card-0 snd-via82xx
alias snd-card-0 snd-via82xx
alias sound-slot-0 snd-via82xx
alias sound-slot-0 snd-via82xx
#Dvico Card Sound Capture Device
#Dvico Card Sound Capture Device
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
alias /dev/dsp1 snd-pcm-oss
alias snd-card-1 cx88-alsa
alias snd-card-1 cx88-alsa
alias sound-slot-1 cx88-alsa
alias sound-slot-1 cx88-alsa


Once you restart alsa (/etc/init.d/alsasound restart on gentoo) or reboot your computer, you should be able see all your sound devices. Make sure your onboard sound device or sound card is the first device listed:
If you are using gentoo, you will need to run modules-update after you edit the alsa file, so it gets added to the modprobe.conf file.


cat /proc/asound/cards
Now everytime you tune analog channels, you can get the sound without having to switch to the analog output. The only drawback is you have to have this command running when you're watching/capturing analog channels:


should output following the above example:
arecord -D hw:0,1 -f dat | aplay


0 [V8237 ]: VIA8237 - VIA 8237
Also, for reference, here's the command to get mplayer to tune analog channels:
VIA 8237 with AD1985 at 0xc800, irq 22
1 [CX8811 ]: CX88x - Conexant CX8811
Conexant CX8811 at 0xfb000000


This shows that everything is configured properly because the onboard sound device is the first device and the audio decoder (CX8811 on the DViCO FusionHDTV 5 Gold card) is the second device. This second device is only a capture device so the output of this device will need to be piped to the onboard sound device (VIA8237 in this case) in order to hear the audio. This can be accomplished in a few different manners depending on the program you are using.
mplayer -tv driver=v4l2:amode=1:chanlist=us-cable tv://


If you have mplayer or mythtv installed, I would recommend you use one of these programs because they have the capacity to output DMA audio. This is important because programs that don't have this ability will not be able to keep the audio and video in sync with each other.
Use "H" or "K" keys to change the channels.

With mplayer, this can be accomplished with this command:

mplayer tv:// -tv driver=v4l2:chanlist=us-cable:alsa:adevice=hw.0,1:amode=1:audiorate=48000:forceaudio:volume=100:immediatemode=0:norm=NTSC

You can then use "H" or "K" to change the channels.

If you don't care that the audio and video can go out of sync, you can use tvtime and arecord to tune analog channels. Run this command in the console and then start tvtime:

arecord -D hw:0,1 -f dat | aplay


===[[Leadtek PVR 2000]]===
===[[Leadtek PVR 2000]]===

Revision as of 03:16, 10 February 2007

Introduction

The cx2388x chip is the successor to the bt87x chips; cf. PCI interface chipsets used for v4l cards.

There is also support in the kernel for a cx23416 mpeg encoder via the cx2388x host port though the blackbird driver, cx88-blackbird.c, which includes parts from the ivtv driver.

The pcHDTV3000 card supports both analog and digital capture; see also Peter Knaggs excellent configuration guide with further references.

Supported cards

For an up-to-date list of v4l supported cx88 devices, see the Hg version of the kernel documentation. Devices supported by your current kernel are listed in your local kernel source Documentation/video4linux/CARDLIST.cx88.

If your card is not listed, see How to add support for a new card.

Current status

Video

  • Basically works.
  • Some minor image quality glitches
  • See Color problem patch
  • For now only capture; overlay support isn't completed yet.

Audio

  • The chip specs for the on-chip TV sound decoder are next to useless :-/
  • Nevertheless, the built-in TV sound decoder starts working now, at least for PAL-BG. Other TV norms need other code ...
FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE USING.
  • Most tuner chips do provide mono sound, which may or may not be useable depending on the board design. With the Hauppauge cards it works, so there is mono sound available as fallback.
  • audio data dma (i.e. recording without loopback cable to the sound card) is supported since 2.6.16 (CONFIG_VIDEO_CX88_ALSA). It only works with boards with function 01 enabled. To check if your board supports it, issue lspci -n. If supported, you should see a 1471:8801 or 1471:8811 PCI device.

vbi (cf. text capture)

  • Undocumented, but likely works in recent kernels (at least 2.6.19 and likely earlier).

TV audio types

For an up-to-date list of TV audio types, see the latest Hg version of the kernel sources. The list currently looks like this:

WW_NONE         1
WW_BTSC         2
WW_BG           3
WW_DK           4
WW_I            5
WW_L            6
WW_EIAJ         7
WW_I2SPT        8
WW_FM           9

Hue_Saturation_Brightness

There was a problem in the cx88 code that resulted in the need to set hue to either 0% or 100% in order to avoid seeing green and blue men on the screen. This problem has been corrected as of the CVS commit on Wed Jun 29 16:28:17 2005 UTC. We have collected information regarding this on Hue_Saturation_Brightness page.

Installation notes

Until someone writes a generic card installation page, please refer to Generic SAA7134 Card Installation. For details, see the individual cards below -- and please add your own!

Generic Installation

This installation method has been tested with a DViCO FusionHDTV 5 Gold but I have been told that it can be used as generic installation instructions for any device that uses the cx88 driver.

Below you will see that all of the TV tuner related drivers are being compiled as modules. This allows MythTV to detect the TV tuner card and let you send parameters to the modules.

Kernel

When compiling the kernel, here are the options you need to tick:

Loadable module support:

[*] Enable loadable module support [*] Module unloading [*] Forced module unloading [*] Automatic kernel module loading

Device Drivers->Multimedia devices:

[*] Video For Linux

Video Capture Adapters:

[*] Autoselect pertinent encoders/decoders and other helper chips 
<M> Conexant 2388x (bt878 successor) support
<M>   Conexant 2388x DMA audio support
<M>   DVB/ATSC Support for cx2388x based TV cards

If your card supports has blackbird mpeg encoder support, you'll need to compile the module for that. The DViCO FusionHDTV 5 Gold card does not have the blackbird mpeg encoder, so it's not necessary tick this option for that card.

<M>   Blackbird MPEG encoder support (cx2388x + cx23416)  

Digital Video Broadcasting Devices:

[*] DVB for Linux 
<M> DVB Core Support

If you are really familiar with the hardware, you can save some system memory by only selecting the DVB Frontends that the card needs. This is accomplished as follows:

[*]     Load and attach frontend modules as needed

Customise DVB Frontends--->

[*] Customise the frontend modules to build

Then if you are using a DViCO FusionHDTV 5 Gold card, you would tick these two options:

<M> LG Electronics LGDT3302/LGDT3303 based
<M> LG TDVS-H06xF ATSC tuner

Note: The current kernel, 2.6.20, does not automatically load the cx88-dvb driver when a program like mplayer requests to use it. This problem will most likely be fixed in kernel 2.6.21, but in the mean time, you will either need to load it using:

modprobe cx88-dvb

or you can specify it in your modprobe.conf file which in gentoo would be /etc/modules.autoload.d/kernel-2.6 so that it will load when the computer boots:

cx88-dvb

Sound

When tuning digital channels, all you need is a functioning sound card with no further configuration. When tuning analog channels, there are two ways you can receive the sound. You can get it through the internal audio cable that connects tuner board to the sound card or through the cx88-alsa driver.

Internal Audio Cable

In order to get the sound through the cable, you need to have an audio port on your tuner card and an auxiliary jack on your motherboard or sound card so you can hook the tuner card up to that auxiliary port. Then you need to plug some kind of device like speakers, headphones, etc. into the analog stereo jack on your motherboard or sound card.

Note: The sound is only output to the analog jack with this method. If you use something other than the analog jack like SPDIF or any other kind of digital audio jack for your speakers, you will need to have some way of switching input on your speakers or amp to the analog jack when you are tuning analog channels.

Alsa

Using DMA audio with the cx88-alsa driver is probably the best choice for capturing the analog sound. It doesn't use internal ports on your motherboard or sound card and for some people it might be the only choice since they might only have one internal audio port that is already in use. It is also beneficial if you have multiple tuner cards while still having a finite or small number of internal audio ports.

Since many programs generally look for the output sound device as the first device, you will need to configure your sound card or onboard sound to be the first device. This requires knowledge of all the sound hardware connected to your computer. You can start by finding out what audio devices you have like this:

lspci -v | grep -i audio

which will produce something like this:

00:0d.0 Multimedia video controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)
00:0d.1 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 05)
00:0d.2 Multimedia controller: Conexant CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)

This shows that I have the Conexant CX23880 chip and the VIA VT8233 chip. Now that you have a listing of devices, you need to determine which device is your default output device. In this case, it would be the VIA VT8233 chip which is an onboard motherboard audio device.

Note: You cannot use alsaconf if you have more than one sound device because it is only capable of configuring one device. I suggest you get familiar with the alsa configuration of sound devices so that you can configure more than one sound device.

On gentoo, you configure the sound with /etc/modules.d/alsa and after you make changes to that file, you need to run modules-update. For other versions of linux, you will need to configure /etc/modprobe.conf. Here's an example of how an onboard VIA sound device should be configured with the DViCO FusionHDTV 5 Gold card:

alias char-major-116 snd
alias char-major-14 soundcore

#Force Sound Device Sequence
options snd-via82xx index=0
options cx88-alsa index=1

#via82xx Sound Device
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias /dev/dsp snd-pcm-oss
alias snd-card-0 snd-via82xx
alias sound-slot-0 snd-via82xx

#Dvico Card Sound Capture Device
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
alias /dev/dsp1 snd-pcm-oss
alias snd-card-1 cx88-alsa
alias sound-slot-1 cx88-alsa

Once you restart alsa (/etc/init.d/alsasound restart on gentoo) or reboot your computer, you should be able see all your sound devices. Make sure your onboard sound device or sound card is the first device listed:

cat /proc/asound/cards

should output following the above example:

0 [V8237          ]: VIA8237 - VIA 8237
                     VIA 8237 with AD1985 at 0xc800, irq 22
1 [CX8811         ]: CX88x - Conexant CX8811
                     Conexant CX8811 at 0xfb000000

This shows that everything is configured properly because the onboard sound device is the first device and the audio decoder (CX8811 on the DViCO FusionHDTV 5 Gold card) is the second device. This second device is only a capture device so the output of this device will need to be piped to the onboard sound device (VIA8237 in this case) in order to hear the audio. This can be accomplished in a few different manners depending on the program you are using.

If you have mplayer or mythtv installed, I would recommend you use one of these programs because they have the capacity to output DMA audio. This is important because programs that don't have this ability will not be able to keep the audio and video in sync with each other.

With mplayer, this can be accomplished with this command:

mplayer tv:// -tv driver=v4l2:chanlist=us-cable:alsa:adevice=hw.0,1:amode=1:audiorate=48000:forceaudio:volume=100:immediatemode=0:norm=NTSC

You can then use "H" or "K" to change the channels.

If you don't care that the audio and video can go out of sync, you can use tvtime and arecord to tune analog channels. Run this command in the console and then start tvtime:

arecord -D hw:0,1 -f dat | aplay

Leadtek PVR 2000

MSI TV-@nywhere Master

This card is not able to do the default QuasiSplitSound demulation, so force the IF to Intercarrier when inserting the driver module:

options tda9887 qss=0

In addition, set hue full up or down and then adjust the rest. There is a bug nobody has found so far.

Pinnacle/310c

WinTV Go

Pixelview_PlayTV_Pro_Ultra