public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Set Frequency Problem
@ 2010-03-22 12:05 Sanfelici Claudio
       [not found] ` <9c4b1d601003220735i5af4be8bo8dc64138bb359f9b@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Sanfelici Claudio @ 2010-03-22 12:05 UTC (permalink / raw)
  To: video4linux-list

Hello all,
it's first time I write to this mailing list, so I'm sorry if this 
problem has been already discussed.
I'm writing an application in java tha use v4l2 through JNI layer (but I 
have the same problem in a C test program)

When I call the VIDIOC_S_FREQUENCY the driver change the frequency, but 
the video signal is 0 (according to the VIDIOC_G_TUNER) and the image is 
black. I've to call some times the VIDIOC_S_FREQUENCY to get the signal on

The driver I'm using is the SAA7130.

Any ideas?

Just another question: at this time I'm working with userpointer and 
read method to grab the images, but probably I will must use the video 
overlay. I've tried to start the overlay following the v4l 
documentation, but it doesn't work. I suspect that I must use the Xorg 
library to get some information (such as the frame buffer address). 
Could someone show me the way?

Thanks in advance

-- 
Pillar Engineering
di Sanfelici Claudio
Via Monza, 53
20063 Cernusco sul Naviglio - MI
P.Iva 05403820961
C.F. SNFCDP81D28C523E
Tel. 02.99.76.55.69
Fax. 02.99.76.55.70
Cell. +39 333.14.27.805
E-Mail info@pillar.it
Sito: www.pillar.it  

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Set Frequency Problem
       [not found]   ` <4BA7A993.2080008@pillar.it>
@ 2010-03-22 18:29     ` Adrian Pardini
  2010-03-22 18:35     ` Adrian Pardini
  1 sibling, 0 replies; 5+ messages in thread
From: Adrian Pardini @ 2010-03-22 18:29 UTC (permalink / raw)
  To: Linux and Kernel Video

(I forgot to cc' the list)

---------- Forwarded message ----------
From: Sanfelici Claudio <sanfelici@pillar.it>
Date: Mon, 22 Mar 2010 18:32:03 +0100
Subject: Re: Set Frequency Problem
To: Adrian Pardini <pardo.bsso@gmail.com>

Yes, I set the input during initialization time. The set frequency
sometimes works correctly and I can see the images. Normally, the
first set works and I can see the images; than i call the set
frequency and (sometimes) the signal goes 0. In this moment to
continue with other tests, I've put the set frequency ioctl in a
do/while loop that continue to call the set frequency untill the
signal goes >0

Of course, with other programs the card works

Thank you !

Pillar Engineering
di Sanfelici Claudio
Via Monza, 53
20063 Cernusco sul Naviglio - MI
P.Iva 05403820961
C.F. SNFCDP81D28C523E
Tel. 02.99.76.55.69
Fax. 02.99.76.55.70
Cell. +39 333.14.27.805
E-Mail info@pillar.it
Sito: www.pillar.it



Adrian Pardini ha scritto:
>
> On 22/03/2010, Sanfelici Claudio <sanfelici@pillar.it> wrote:
> [...]
>
>>
>> When I call the VIDIOC_S_FREQUENCY the driver change the frequency, but
>> the video signal is 0 (according to the VIDIOC_G_TUNER) and the image is
>> black. I've to call some times the VIDIOC_S_FREQUENCY to get the signal on
>>
>>
>
> Hi, is the right input selected? Does the card work with other
> programs, like xawtv?
>
> cheers
>
>


-- 
Adrian.
http://elesquinazotango.com.ar
http://www.noalcodigodescioli.blogspot.com/

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Set Frequency Problem
       [not found]   ` <4BA7A993.2080008@pillar.it>
  2010-03-22 18:29     ` Adrian Pardini
@ 2010-03-22 18:35     ` Adrian Pardini
  2010-03-23 21:22       ` Sanfelici Claudio
  1 sibling, 1 reply; 5+ messages in thread
From: Adrian Pardini @ 2010-03-22 18:35 UTC (permalink / raw)
  To: Sanfelici Claudio; +Cc: Linux and Kernel Video

On 22/03/2010, Sanfelici Claudio <sanfelici@pillar.it> wrote:
> Yes, I set the input during initialization time. The set frequency sometimes
> works correctly and I can see the images. Normally, the first set works and
> I can see the images; than i call the set frequency and (sometimes) the
> signal goes 0. In this moment to continue with other tests, I've put the set
> frequency ioctl in a do/while loop that continue to call the set frequency
> untill the signal goes >0
>
> Of course, with other programs the card works
>
> Thank you !


Well, thats a good sign. Could you share with us the relevant C code
and more info about the card?





> Adrian Pardini ha scritto:
>>
>> On 22/03/2010, Sanfelici Claudio <sanfelici@pillar.it> wrote:
>> [...]
>>
>>>
>>> When I call the VIDIOC_S_FREQUENCY the driver change the frequency, but
>>> the video signal is 0 (according to the VIDIOC_G_TUNER) and the image is
>>> black. I've to call some times the VIDIOC_S_FREQUENCY to get the signal
>>> on
>>>
>>>
>>
>> Hi, is the right input selected? Does the card work with other
>> programs, like xawtv?
>>
>> cheers
>>
>>


-- 
Adrian.
http://elesquinazotango.com.ar
http://www.noalcodigodescioli.blogspot.com/

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Set Frequency Problem
  2010-03-22 18:35     ` Adrian Pardini
@ 2010-03-23 21:22       ` Sanfelici Claudio
  2010-03-23 22:05         ` Adrian Pardini
  0 siblings, 1 reply; 5+ messages in thread
From: Sanfelici Claudio @ 2010-03-23 21:22 UTC (permalink / raw)
  To: Adrian Pardini; +Cc: Linux and Kernel Video


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Set Frequency Problem
  2010-03-23 21:22       ` Sanfelici Claudio
@ 2010-03-23 22:05         ` Adrian Pardini
  0 siblings, 0 replies; 5+ messages in thread
From: Adrian Pardini @ 2010-03-23 22:05 UTC (permalink / raw)
  To: Sanfelici Claudio; +Cc: Linux and Kernel Video

On 23/03/2010, Sanfelici Claudio <sanfelici@pillar.it> wrote:
> Hi !
> I was writing the C code for you and... I've solved the problem.
> In the Video for Linux two Api Specification, in the VIDIOC_G/S_INPUT
> section you can read:
> "It is ggod pratice to select an input before querying or negotiating any
> other parameters."
>
> So, if I call VIODIOC_S_INPUT everytime before call the VIDIOC_S_FREQUENCY
> it works!
>
> Has it sense?
>

Not for me. (N.B i'm no expert in v4l). Looking at xawtv sources (file
libng/plugins/drv0-v4l2.c) it does the following:

---
static void
v4l2_setfreq(void *handle, unsigned long freq)
{
    struct v4l2_handle *h = handle;
    struct v4l2_frequency f;

    if (ng_debug)
        fprintf(stderr,"v4l2: freq: %.3f\n",(float)freq/16);
    memset(&f,0,sizeof(f));
    f.type = V4L2_TUNER_ANALOG_TV;
    f.frequency = freq;
    xioctl(h->fd, VIDIOC_S_FREQUENCY, &f, 0);
}
---

I think you are missing something or your driver is somehow broken,
but a lot of cheap (and not so) cards have an saa7130/7134 and work
fine.

> Thank you !

You are welcome just keep in mind that this list is deprecated, most
of the people is at linux-media@vger.kernel.org


> P.S. about my second question? the way to start video overlay?

i have no clue. The best advice I can give you is to grab the sources
of some app (xawvt is a good starting point) and see how it works.
Isn't free software wonderful?




-- 
Adrian.
http://elesquinazotango.com.ar
http://www.noalcodigodescioli.blogspot.com/

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-23 22:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-22 12:05 Set Frequency Problem Sanfelici Claudio
     [not found] ` <9c4b1d601003220735i5af4be8bo8dc64138bb359f9b@mail.gmail.com>
     [not found]   ` <4BA7A993.2080008@pillar.it>
2010-03-22 18:29     ` Adrian Pardini
2010-03-22 18:35     ` Adrian Pardini
2010-03-23 21:22       ` Sanfelici Claudio
2010-03-23 22:05         ` Adrian Pardini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox