[V4L] Unable to set winTV FM to mono

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I bought a hauppauge  bttv Bt878 winTV to record audio
from the FM tuner. Low static is more important than
stereo because I am recording voice interviews, not music.

The station I am interested comes in with no static if
I hit the Mono button on the Windows radio program. I am
trying to replicate this in Linux (RH 7.0).

I wrote a small program to turn on the radio and set 
video_audio.mode it doesn't seem to have an effect: 

typedef unsigned long ulong;

#include <iostream.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/videodev.h>
int main(int argc, char *argv[])
{
  ulong freq = 1454; // 90.9 * 16
  video_audio va;
  video_tuner vt;
  int fd = open("/dev/radio0", O_RDWR);
  ioctl(fd, VIDIOCSFREQ, &freq);

  ioctl(fd, VIDIOCGAUDIO, &va);
  cout << "va.audio   = " << va.audio   << endl
       << "va.volume  = " << va.volume  << endl
       << "va.bass    = " << va.bass    << endl
       << "va.treble  = " << va.treble  << endl
       << "va.flags   = " << va.flags   << endl
       << "va.name    = " << va.name    << endl
       << "va.mode    = " << va.mode    << endl
       << "va.balance = " << va.balance << endl
       << "va.step    = " << va.step    << endl
       << endl;

  va.mode = 2;
  ioctl(fd, VIDIOCSAUDIO, &va);
  ioctl(fd, VIDIOCGAUDIO, &va);
  cout << "va.mode = " << va.mode << endl;

  return(0);
}

This yielded

va.audio   = 0
va.volume  = 65535
va.bass    = 32768
va.treble  = 32768
va.flags   = 30
va.name    = TV
va.mode    = 1
va.balance = 0
va.step    = 0

va.mode = 1

I also had the msp3400 module loaded with debug=1 and the following
was in /var/log/messages

Dec 13 15:42:47 localhost kernel: msp3400: setvolume: 0:0 0x00 0x00
Dec 13 15:42:47 localhost kernel: msp3400: setvolume: 0:0 0x00 0x00
Dec 13 15:42:47 localhost kernel: msp3400: setmode: 0
Dec 13 15:42:48 localhost kernel: msp3400: setvolume: 0:0 0x00 0x00
Dec 13 15:42:48 localhost kernel: msp3400: setmode: 2
Dec 13 15:42:48 localhost kernel: msp3400: setvolume: 65535:65535 0x73
0x00
Dec 13 15:42:48 localhost kernel: msp3400: carrier1 val: -10888 / 4.5  
NTSC
Dec 13 15:42:48 localhost kernel: msp3400: carrier1 val: -3969 / 5.5  
PAL B/G
Dec 13 15:42:48 localhost kernel: msp3400: setvolume: 65535:65535 0x73
0x00
Dec 13 15:42:48 localhost kernel: msp3400: setbass: 32768 0x00
Dec 13 15:42:48 localhost kernel: msp3400: settreble: 32768 0x00
Dec 13 15:42:48 localhost kernel: msp3400: carrier1 val: -1955 / 6.0  
PAL I
Dec 13 15:42:48 localhost kernel: msp3400: carrier1 val: -2299 / 6.5  
PAL D/K + SAT + SECAM
Dec 13 15:42:48 localhost kernel: msp3400: setmode: 3
Dec 13 15:42:48 localhost kernel: msp3400: FM setstereo: 1
Dec 13 15:42:48 localhost kernel: msp3400: setvolume: 65535:65535 0x73
0x00
Dec 13 15:42:48 localhost kernel: msp3400: mono sound carrier: 0.000 MHz

Does anyone know what I am doing wrong?

Thanks,

Will Heyman
heyman@xxxxxxxx





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux