What follows are my experiences only. I do not claim to be an expert but in the hopes that someone else may not have to have the troubles I did I post the following;

I added a fourth tuner to my system. I had a PVR-150 and a PVR-500 (Dual-Tuner). My new tuner is an ATI TV-Wonder PCI. The ATI TV-Wonder PCI has been a challenge for me to get working.

The video and audio streams from the tuner are two separate PCI devices in the ATI TV-Wonder PCI (and most other bt878 cards) we will need to configure the devices separately for MythTV to access them. We shall discuss the video first and then the audio second.

VIDEO
The video configuration is fairly simple compared to the audio. The bttv driver is native and installed with the KnoppMyth kernel. The only thing we must do is setup the options file. We must do this due to the tuner parameters often are guessed wrong on boot. In my case the OS thinks I am running a PAL tuner when I have an NTSC.
All commands must be run as root!

In my case it was 63… Write this down we will need it later. If you want to make sure it is correct you can check http://www.linuxtv.org/v4lwiki/index.php/Cardlist.BTTV and see. In my case it was. From what I have read the card detection usually works…. The tuner detection often is wrong.

We have to edit the bttv config file. I must have spent hours scouring the board where everyone said just modify the bttv file. If you looked you know what I mean… I finally came across a post by Xsecrets in the thread at http://mysettopbox.tv/phpBB2/viewtopic.php?t=8158 that made a big light bulb go on in my head. Thanks!!!

You should only have one of these files listed. In my case it was bttv1. If you edit any of the other files they will not process.

Now here we edit the config file;

Code:

nano /etc/mythtv/modules/bttv1

(Be sure to edit the correct file as discussed above)

Add the following;options bttv card=63 tuner=2

You need to use the correct numbers for your card as we determined above. This is the correct line for an ATI TV-Wonder PCI with an NTSC tuner.Exit nano (<Ctrl – X>, Yes to save changes and overwrite /etc/mythtv/modules/bttv1)

It worked… Note the device video0 and vbi0. Your numbers may be different. Once you get the audio working you will need to setup the video for linux V4L sotware card in the backend setup. You will need these two numbers then.

If you have the chipset you should see something like;bttv0: i2c: checking for MSP34xx @ 0x80... found

There are two options for audio output on the ATI TV-Wonder PCI. You can use the bt878 ALSA driver or the btaudio OSS driver. In KnoppMyth R5C7 btaudio is no longer part of the default compiled kernel but the source code is provided. It may have been this way in previous KnoppMyth kernel revisions but this is my first run-in with it. The default KnoppMyth driver for the bt878 audio chipset is to use the bt878 ALSA driver (Driver is at: /lib/modules/2.6.15-chw-2/kernel/drivers/media/dvb/bt8xx/bt878.ko Source is at: /usr/src/kernel-source-2.6.15-chw-2/drivers/media/dvb/bt8xx/bt878.c in R5C7). This works great if you are using the line out on the tuner card to the line in on a sound card but for my MythTV usage btaudio is a better driver choice for two reasons, first btaudio’s ability to place data on the PCI bus using DMA creating a dsp device allows for one less digital to analogue and back to digital audio conversion (using an external cable), second I do not need an audio cable or sound card input available for each tuner card in my chassis. This may seem trivial for one card but when you have multiple tuners the sound cards add up quick.

So how do we disable bt878, compile btaudio, install bt878 and verify it all worked?

Just so people don’t think I am reinventing the wheel I have tried the following with no success;

In the MythTV wiki (as of 2006/08/01 - http://www.mythtv.org/wiki/index.php/Btaudio) it talk about using btaudio by initializing it on boot. There is an assumption that btaudio is part of the kernel. For MythTV this is no longer the case.

In the KnoppMyth wiki (as of 2006/08/01 - http://wiki.knoppmyth.net/index.php?page=BTTV+BTAudio) it talks about downloading the source and make file. For me I got as far as the make command when it dumped a verification error and would go no further…. I am not sure if the kernel version causes an issue or what the root cause is. It may be possible to play with the make file and get it to work but my level of expertise in caused me to look elsewhere. All commands should be run as root.

A text based gui will pop upScroll down to “Device Drivers” <Enter>Scroll down to “Sound” <Enter>Scroll down to “Open Sound System” <Enter>Scroll down to “Open Sound System (DEPRECATED)” <Space Bar>Scroll down to “Obsolete OSS drivers (NEW)” <Space Bar>Scroll down to “BT878 audio dma (NEW)” <Space Bar>You should see it go-from: < > BT878 audio dma (NEW)-to: <M> BT878 audio dmaPress <Esc> four times.It now asks “Do you wish to save your new kernel configuration?”Select “Yes”

You should be back at a bash shell prompt.Now we compile…

Code:

make modules

One of the last few lines you should see should be;LD [M] sound/oss/btaudio.ko

Step Three: Install btaudioThere are two ways to do this….The quick way is to use the make modules_install command. The downside is it will reload a lot of other thing but it will verify dependencies…. I prefer to make things easy as possible but I will provide directions for both methods…

As a sidenote btaudio does depend on soundcore.ko but for now it is already there in R5C7… should this change in the future it would need to be added.

Now we have to add it to the list of modules to load at bootOpen the modules instantiation file

Code:

nano /etc/modules

Below where we commented out the bt878 line add btaudio. It should look like…#bt878btaudioExit nano (<Ctrl – X>, Yes to save changes and overwrite /etc/modules)I know some will say “But we could just have done this earlier”, but for the process and to understand the flow I structured it this way…

Now we have to load the “Options” for the driver. We could stick it in another file (Say the video configuration file) or we could make an audio specific one… I am going to describe how to make an audio specific one… you can see what is going on and modify to your liking.

You should see a blank file.Add the following;options btaudio dsp1=1 digital=1 analog=0 rate=32000Exit nano (<Ctrl – X>, Yes to save changes and overwrite /etc/mythtv/modules/btaudio)Note: dsp=X Where X is will determine the dsp device number assigned…. Modify if needed.

If you want to play around there are more parameters (as shown below) you can play with but the above options line works for me.parm: latency:pci latency timer (int)parm: rate:intparm: analog:intparm: digital:intparm: irq_debug:intparm: debug:intparm: mixer:intparm: dsp2:intparm: dsp1:int

Now you can configure the video for linux V4L Software setting for audio in the backend setup. Use the dsp device you set in the options file. In my case it is dsp1.

It is important to note that you should not have any output device attached to the tuner line-out but rather your soundcard line-out/speakers. The card will be initialized with the backend and audio will immediately start from the tuner line-out. If you are using your sound card you will never even know it is there.

-Steve

Last edited by sgunther on Thu Aug 10, 2006 10:09 pm, edited 2 times in total.

dude thanks for the simple explanation of btaudio and tutorial.
you seem to have played with that a bit.. so could you really please take a look at my case here:
http://mysettopbox.tv/phpBB2/viewtopic. ... 4612#64612i have bt878 based pinnacle pctv card with no MSP34xx and the audio from the tuner audio jack is messed up. video is ok. somebody mentioned a pal/ntsc issue any chance that this could be a reason for broken audio?

Thats a great tutorial on getting btaudio working. It seemed to get everything working for me except that when I disable bt878, and its dependancies my sound card quits working. So playing dvd's, or watching tv, or anything involving sound quits working also. Any hints as to keep my sound card working while using btaudio for my tv card as well?

A text based gui will pop upScroll down to “Device Drivers” <Enter>Scroll down to “Sound” <Enter>Scroll down to “Open Sound System” <Enter>Scroll down to “Open Sound System (DEPRECATED)” <Space Bar>Scroll down to “Obsolete OSS drivers (NEW)” <Space Bar>Scroll down to “BT878 audio dma (NEW)” <Space Bar>You should see it go-from: < > BT878 audio dma (NEW)-to: <M> BT878 audio dmaPress <Esc> four times.It now asks “Do you wish to save your new kernel configuration?”Select “Yes”

-Steve

Hey Steve.Just a small questionIn KnoppMyth R5D1 when i go to Open Sound System, there is no “Obsolete OSS drivers (NEW)” Though there is “BT878 audio dma". Should i use this one?

Do you have any ideas if btaudio is possible to work on KnoppMyth R5D1?

I tried

Code:

dmesg | grep bttv.*MSP34

and it returns .... found, so i think it should be possible

Also, if the video works fine, should i do the changes in the "video" section that you suggest?

On a clean install of R5D1 nothing i found here or googling would change tuner=19. After much trial and error I discovered that the only file change that works "for me" is by changing /etc/modprobe.conf
after
"alias ra0 rt2400
alias rausb0 rt2570"
I added
options bttv tuner=2 #in order to get my ATV wonder VE to work.

If I added a WINTV card I had to change the line to
options bttv tuner=2,2 #to force both cards to the right tuner

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum