Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: Nexus-s video feed lost (Card/Diseqc Issue?)
Petri Nykanen wrote:
>
> --- libs/libmythtv/originals/dvbrecorder.cpp 2003-09-17 00:49:11.000000000 +0300
> +++ libs/libmythtv/dvbrecorder.cpp 2003-09-17 00:57:11.000000000 +0300
> @@ -191,9 +191,9 @@
> {
> int this_pid = pids[i];
>
> - if (this_pid < 0x100 || this_pid > 0x1fff)
> + if (this_pid < 0x1 || this_pid > 0x1fff)
PID 0 is also valid
> --- libs/libmythtv/originals/dvbchannel.cpp 2003-09-17 00:49:42.000000000 +0300
> +++ libs/libmythtv/dvbchannel.cpp 2003-09-17 00:57:10.000000000 +0300
> @@ -841,6 +858,43 @@
> return true;
> }
>
> +/* Original from http://linuxtv.org/cgi-bin/cvsweb.cgi/DVB/apps/szap/szap.c */
> +void DVBChannel::DiseqcSendMsg(int fd, fe_sec_voltage_t v, dvb_diseqc_cmd_t *cmd, fe_sec_tone_mode_t t, fe_sec_mini_cmd_t b)
> +{
> + ioctl(fd, FE_SET_TONE, SEC_TONE_OFF);
> + ioctl(fd, FE_SET_VOLTAGE, v);
> + usleep(15 * 1000);
> + ioctl(fd, FE_DISEQC_SEND_MASTER_CMD, &cmd->cmd);
> + usleep(cmd->wait * 1000);
> + usleep(15 * 1000);
> + ioctl(fd, FE_DISEQC_SEND_BURST, b);
> + usleep(15 * 1000);
> + ioctl(fd, FE_SET_TONE, t);
> +}
You shouln't *ever* do ioctls w/o checking the return value/errno
(even though szap does it...).
> +
> +
> +/* digital satellite equipment control,
> + * specification is available from http://www.eutelsat.com/
> + */
> +
> +/* Original from http://linuxtv.org/cgi-bin/cvsweb.cgi/DVB/apps/szap/szap.c */
> +bool DVBChannel::Diseqc(int secfd, int sat_no, int pol, int hi_lo)
szap's naming scheme sucks; better use
bool DVBChannel::Diseqc(int secfd, int sat_no, int pol_vert, int hi_band)
The other stuff looks OK to me.
Johannes
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index