[linux-dvb] How to find which command generates error in FE_SET_PROPERTY

Darron Broad darron at kewl.org
Sat Nov 8 19:01:07 CET 2008


In message <4915C608.9000709 at verbraak.org>, Michel Verbraak wrote:

LO

>I'm trying to modify one of my applications to use the new S2API. With 
>this application I control my dvb-t and dvb-s/s2 receivers.
>
>I'm using szap-s2 as an example but I run into a problem that the ioctl 
>FE_SET_PROPERTY always returns -1 and variable errno is set to 14.
>
>My question is. How do I determine which of the commands in the command 
>queue given to FE_SET_PROPERTY is producing this error. I did not try 
>yet to devide my command queue up into one command queue per command.

The only commands as such as CLEAR and TUNE, the rest are tuning
parameters. The way this works is that the TUNE command informs
the kernel to retune using the parameters specified. This occurs
outside of the IOCTL call itself and you don't directly know
if a paramater was wrong, it just doesn't work.

The error you have:
> grep 14 /usr/include/asm-generic/errno-base.h
#define EFAULT          14      /* Bad address */

Suggests a problem in your code...

>Regards,
>
>Michel.
>
>Part of source code for dvb-s/s2:
>
>#ifdef S2API
>int TDVBDevice::SetProperty(struct dtv_property *cmdseq)

This should something like SetProperties(struct dtv_properties cmdseq[])
and then call ioctl(fefd, FE_SET_PROPERTY, cmdseq)
This sends of your args at the same time.

>      if (SetProperty(&p[0]) == 0)

That needs to be more like:
	SetProperties(&cmdseq)

I hope that helps.

cya!

--

 // /
{:)==={ Darron Broad <darron at kewl.org>
 \\ \ 




More information about the linux-dvb mailing list