Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] ?: How can I properly tune my DVB-S card with the NAPI
- To: linux-dvb@linuxtv.org
- Subject: [linux-dvb] ?: How can I properly tune my DVB-S card with the NAPI
- From: Varga Zsager Peter <jagger@sch.bme.hu>
- Date: Sat, 24 Mar 2001 05:25:13 +0100 (MET)
Hi,
I would like to set my SIEMENS DVB-S card for the channel VOX. My
satellit dish is pointing to HOTBIRD. The tunning parameter from
the .gvideorc file is the below:
Channel : <Name>
Frequency : <frequency> (unit depends on tuner)
CHBC : <Color> <Hue> <Brightness> <Contrast> (numbers depend on your hardware)
NI : <TV norm> <Input> (if norm=-1 then SAT is expected)
SAT : <Polarization> (0 = vertical, 1 horizontal)
<Signal Rate>
<FEC> (0=1/2, 1=2/3, 2=3/4, 3=4/5, 4=5/6, 5=6/7 6=7/8, 7=8/9 8=Auto)
<VPID> <APID> <LNB Nr.>
<type> (Analog,DVBS,DVBT,DVBC)=(0,1,2,3)
<dvbnum> (id of channel in DVB structure)
Channel : VOX
Frequency : 11054
CBHC : 255 0 0 255
NI : -1 0
SAT : 1 27500 4 500 501 1 1 0
My releated code to this is:
.
.
.
// sec
if ((secDevFd = open(secDev, O_RDWR)) < 0) {
perror("Sec device open O_RDWR error");
return -1;
}
else { fprintf(stderr, "%s sec device opened for O_RDWR, secDevFd = %d \n", secDev, secDevFd); }
mySecCommand.type = 0;
mySecCommand.u.diseqc.addr = 0x10;
mySecCommand.u.diseqc.cmd = 0x38;
mySecCommand.u.diseqc.numParams = 1;
mySecCommand.u.diseqc.params[0] = 0xf0;
mySecCmdSequence.voltage = SEC_VOLTAGE_18; // 14V/18V (V=0/H=1)
mySecCmdSequence.miniCommand = SEC_MINI_NONE;
mySecCmdSequence.continuousTone = SEC_TONE_OFF; // 22KHz (ttk) (freq < 118000UL) ? 0 : 1
mySecCmdSequence.numCommands = 1;
mySecCmdSequence.commands = &mySecCommand;
if (ioctl(secDevFd, SEC_SEND_SEQUENCE, &mySecCmdSequence) < 0) {
perror("SEC_SEND_SEQUENCE error");
return -1;
}
else { fprintf(stderr, "SEC_SEND_SEQUENCE set \n"); }
// frontend
if ((frontendDevFd = open(frontendDev, O_RDWR)) < 0) {
perror("Frontend device open O_RDWR error");
return -1;
}
else { fprintf(stderr, "%s frontend device opened for O_RDWR, frontendDevFd = %d \n", frontendDev, frontendDevFd); }
wantedFreq = 11054;
wantedSr = 27500;
myQpskParameters.iFrequency = (wantedFreq < 11800UL) ? ((wantedFreq - 9750UL) * 1000000UL) : ((wantedFreq - 10600UL) * 1000000UL);
myQpskParameters.SymbolRate = wantedSr * 1000;
myQpskParameters.FEC_inner = 4;
if (ioctl(frontendDevFd, QPSK_TUNE, &myQpskParameters) < 0) {
perror("QPSK_TUNE error");
return -1;
}
else { fprintf(stderr, "QPSK_TUNE set \n"); }
// demuxVideo
if ((demuxVideoDevFd = open(demuxDev, O_RDWR)) < 0) {
perror("Demux (VIDEO) device open O_RDWR error");
return -1;
}
else { fprintf(stderr, "%s demux (VIDEO) device opened for O_RDWR, demuxVideoDevFd = %d \n", demuxDev, demuxVideoDevFd); }
myVideoDmxPesFilterParams.pid = 0x1f4; // 500
myVideoDmxPesFilterParams.input = DMX_IN_FRONTEND;
myVideoDmxPesFilterParams.output = DMX_OUT_TS_TAP;
myVideoDmxPesFilterParams.pesType = DMX_PES_VIDEO;
myVideoDmxPesFilterParams.flags = DMX_IMMEDIATE_START;
if (ioctl(demuxVideoDevFd, DMX_SET_PES_FILTER, &myVideoDmxPesFilterParams) < 0) {
perror("DMX_SET_PES_FILTER (VIDEO) error");
return -1;
}
else { fprintf(stderr, "DMX_SET_PES_FILTER (VIDEO) set \n"); }
// demuxAudio
if ((demuxAudioDevFd = open(demuxDev, O_RDWR)) < 0) {
perror("Demux (AUDIO) device open O_RDWR error");
return -1;
}
else { fprintf(stderr, "%s demux (AUDIO) device opened for O_RDWR, demuxAudioDevFd = %d \n", demuxDev, demuxAudioDevFd); }
myAudioDmxPesFilterParams.pid = 0x1f5; // 501
myAudioDmxPesFilterParams.input = DMX_IN_FRONTEND;
myAudioDmxPesFilterParams.output = DMX_OUT_TS_TAP;
myAudioDmxPesFilterParams.pesType = DMX_PES_AUDIO;
myAudioDmxPesFilterParams.flags = DMX_IMMEDIATE_START;
if (ioctl(demuxAudioDevFd, DMX_SET_PES_FILTER, &myAudioDmxPesFilterParams) < 0) {
perror("DMX_SET_PES_FILTER (AUDIO) error");
return -1;
}
else { fprintf(stderr, "DMX_SET_PES_FILTER (AUDIO) set \n"); }
.
.
.
I think, my tune for the DVB-S card isn't correct, because I can nothing
to read from the /dev/dvr device (and if I try with DMX_OUT_TAP than from
the /dev/demux device also). I haven't any idea what I should to set in
the secCommand stucture, I have copied it from the DVB/apps/test/test_dvr.c
file:
mySecCommand.type = 0;
mySecCommand.u.diseqc.addr = 0x10;
mySecCommand.u.diseqc.cmd = 0x38;
mySecCommand.u.diseqc.numParams = 1;
mySecCommand.u.diseqc.params[0] = 0xf0;
Can anybody tell me the correct settings for this channel with the NAPI?
With the v4l API can I do it easier and it is functional properly:
.
.
.
ioctl(videoDevFd, VIDIOCGFRONTEND, &myFrontend);
wantedFreq = 11054;
wantedSr = 27500;
myFrontend.freq = (wantedFreq < 11800UL) ? ((wantedFreq - 9750UL) * 1000000UL) : ((wantedFreq - 10600UL) * 1000000UL);
myFrontend.ttk = (wantedFreq < 11800UL) ? 0 : 1;
myFrontend.diseqc = 1; // Diseqc input select (LNB number)
myFrontend.srate = wantedSr * 1000;
myFrontend.volt = 1; // 14/18V (V=0/H=1)
myFrontend.video_pid = 500;
myFrontend.audio_pid = 501;
myFrontend.fec = 4; // 5/6
myFrontend.AFC = 1;
myFrontend.channel_flags = DVB_CHANNEL_FTA;
ioctl(videoDevFd, VIDIOCSFRONTEND, &myFrontend)
.
.
.
thanks the help,
Peter
=-=-=-=-=-=-=-=-=-=-=-=-=
Peter Varga Zsager
Mobile: +36-30-2950386
E-mail: jagger@sch.bme.hu
---
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index