public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Cannot configure second Kodicom 4400R
@ 2011-10-10 18:45 Allan Macdonald
  2011-10-10 20:17 ` Patrick Dickey
  0 siblings, 1 reply; 5+ messages in thread
From: Allan Macdonald @ 2011-10-10 18:45 UTC (permalink / raw)
  To: linux-media

[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]

Hi to all,

I am new to this list.

I have been successfully using a Kodicom 4400R with zoneminder but I
wanted to expand so I bought a second card and installed it.  The
problem with this card is that I cannot seem to be able to get the
second card to work.  I tried using xawtv with the following command:

xawtv -d /dev/video1

The result is that I get images from /dev/video0

I also tried:

xawtv -d /dev/video4

with the same result.

I obviously don't understand what's going on.

I tried following the instructions here, to no avail:

http://www.zoneminder.com/wiki/index.php/Kodicom_4400r

I also looked here:

http://linuxtv.org/wiki/index.php/Kodicom_4400R

but, unfortunately, the following page does not explain what happens
with more than one card installed.

Here's my bttv.conf:

[code]
options bttv gbuffers=32 card=133,132,133,133,133,132,133,133 tuner=4
chroma_agc=1
[/code]

I have attached a dmesg output and an lsmod output.

I would greatly appreciate some help.  Many thanks in advance.

Regards,

Allan Macdonald

[-- Attachment #2: dmesg-bttv.txt --]
[-- Type: text/plain, Size: 4388 bytes --]

[1789815.240043] bttv7: unloading
[1789815.240543] bttv6: unloading
[1789815.241957] bttv5: unloading
[1789815.242712] bttv4: unloading
[1789815.243791] bttv3: unloading
[1789815.245141] bttv2: unloading
[1789815.245911] bttv1: unloading
[1789815.246630] bttv0: unloading
[1789825.453780] bttv: driver version 0.9.18 loaded
[1789825.453783] bttv: using 32 buffers with 2080k (520 pages) each for capture
[1789825.454079] bttv: Bt8xx card found (0).
[1789825.454098] bttv0: Bt878 (rev 17) at 0000:04:0c.0, irq: 17, latency: 64, mmio: 0xfbefe000
[1789825.454194] bttv0: using: Kodicom 4400R (slave) [card=133,insmod option]
[1789825.454197] IRQ 17/bttv0: IRQF_DISABLED is not guaranteed on shared IRQs
[1789825.454226] bttv0: gpio: en=00000000, out=00000000 in=00ffffff [init]
[1789825.454324] bttv0: tuner absent
[1789825.454930] bttv0: registered device video0
[1789825.455328] bttv0: registered device vbi0
[1789825.455351] bttv0: PLL: 28636363 => 35468950 .
[1789825.455735] bttv0: PLL: 28636363 => 35468950 .
[1789825.455759] bttv0: PLL: 28636363 => 35468950 .. ok
[1789825.477567] bttv: Bt8xx card found (1).
[1789825.477590] bttv1: Bt878 (rev 17) at 0000:04:0d.0, irq: 18, latency: 64, mmio: 0xfbefc000
[1789825.477748] bttv1: using: Kodicom 4400R (master) [card=132,insmod option]
[1789825.477751] IRQ 18/bttv1: IRQF_DISABLED is not guaranteed on shared IRQs
[1789825.477787] bttv1: gpio: en=00000000, out=00000000 in=00ffffff [init]
[1789825.477953] bttv1: tuner absent
[1789825.478309] bttv1: registered device video1
[1789825.478408] bttv1: registered device vbi1
[1789825.478430] bttv1: PLL: 28636363 => 35468950 .
[1789825.479521] bttv1: PLL: 28636363 => 35468950 .
[1789825.479788] bttv1: PLL: 28636363 => 35468950 . ok
[1789857.668538] bttv: Bt8xx card found (2).
[1789857.668558] bttv2: Bt878 (rev 17) at 0000:04:0e.0, irq: 19, latency: 64, mmio: 0xfbefa000
[1789857.668702] bttv2: using: Kodicom 4400R (slave) [card=133,insmod option]
[1789857.668705] IRQ 19/bttv2: IRQF_DISABLED is not guaranteed on shared IRQs
[1789857.668742] bttv2: gpio: en=00000000, out=00000000 in=00ffffff [init]
[1789857.668804] bttv2: tuner absent
[1789857.668893] bttv2: registered device video2
[1789857.668923] bttv2: registered device vbi2
[1789857.668951] bttv2: PLL: 28636363 => 35468950 .
[1789857.670200] bttv2: PLL: 28636363 => 35468950 .
[1789857.670643] bttv2: PLL: 28636363 => 35468950 .. ok
[1789889.860537] bttv: Bt8xx card found (3).
[1789889.860558] bttv3: Bt878 (rev 17) at 0000:04:0f.0, irq: 16, latency: 64, mmio: 0xfbef8000
[1789889.860702] bttv3: using: Kodicom 4400R (slave) [card=133,insmod option]
[1789889.860705] IRQ 16/bttv3: IRQF_DISABLED is not guaranteed on shared IRQs
[1789889.860742] bttv3: gpio: en=00000000, out=00000000 in=00ffffff [init]
[1789889.860807] bttv3: tuner absent
[1789889.860899] bttv3: registered device video3
[1789889.860935] bttv3: registered device vbi3
[1789889.860960] bttv3: PLL: 28636363 => 35468950 .
[1789889.862152] bttv3: PLL: 28636363 => 35468950 .
[1789889.862871] bttv3: PLL: 28636363 => 35468950 .. ok
[1789922.052539] bttv: Bt8xx card found (4).
[1789922.052560] bttv4: Bt878 (rev 17) at 0000:05:0c.0, irq: 18, latency: 64, mmio: 0xfbffe000
[1789922.052704] bttv4: using: Kodicom 4400R (slave) [card=133,insmod option]
[1789922.052707] IRQ 18/bttv4: IRQF_DISABLED is not guaranteed on shared IRQs
[1789922.052737] bttv4: gpio: en=00000000, out=00000000 in=00ffffff [init]
[1789922.052801] bttv4: tuner absent
[1789922.052894] bttv4: registered device video4
[1789922.052926] bttv4: registered device vbi4
[1789922.052947] bttv4: PLL: 28636363 => 35468950 .
[1789922.054120] bttv4: PLL: 28636363 => 35468950 .
[1789922.054816] bttv4: PLL: 28636363 => 35468950 .. ok
[1789922.087532] bttv: Bt8xx card found (5).
[1789922.087550] bttv5: Bt878 (rev 17) at 0000:05:0d.0, irq: 19, latency: 64, mmio: 0xfbffc000
[1789922.087695] bttv5: using: Kodicom 4400R (master) [card=132,insmod option]
[1789922.087699] IRQ 19/bttv5: IRQF_DISABLED is not guaranteed on shared IRQs
[1789922.087727] bttv5: gpio: en=00000000, out=00000000 in=00ffffff [init]
[1789922.087802] bttv5: tuner absent
[1789922.087890] bttv5: registered device video5
[1789922.087922] bttv5: registered device vbi5
[1789922.087941] bttv5: PLL: 28636363 => 35468950 .
[1789922.089095] bttv5: PLL: 28636363 => 35468950 .
[1789922.089533] bttv5: PLL: 28636363 => 35468950 . ok

[-- Attachment #3: lsmod-bttv.txt --]
[-- Type: text/plain, Size: 357 bytes --]

bttv                  111669  0 
v4l2_common            15431  1 bttv
videodev               34425  2 bttv,v4l2_common
ir_common              38875  1 bttv
i2c_algo_bit            5028  1 bttv
videobuf_dma_sg        10782  1 bttv
videobuf_core          16356  2 bttv,videobuf_dma_sg
btcx_risc               3624  1 bttv
tveeprom               11102  1 bttv

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

* Re: Cannot configure second Kodicom 4400R
  2011-10-10 18:45 Cannot configure second Kodicom 4400R Allan Macdonald
@ 2011-10-10 20:17 ` Patrick Dickey
  2011-10-11 15:37   ` Allan Macdonald
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Dickey @ 2011-10-10 20:17 UTC (permalink / raw)
  To: Allan Macdonald; +Cc: linux-media

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there Allan,

I'm not familiar with the card (so you'll want to defer to someone else
if their answer differs from mine).  It looks like video0 and video1 are
assigned to the first card, and video2 and video3 are assigned to the
second card.  So, you might want to try

xawtv -d /dev/video2'

or

xawtv -d /dev/video3

and see if one of those uses the second card (you could try video4 or
video5 also, since they're assigned to cards).

Have a great day:)
Patrick.

On 10/10/2011 01:45 PM, Allan Macdonald wrote:
> Hi to all,
> 
> I am new to this list.
> 
> I have been successfully using a Kodicom 4400R with zoneminder but I
> wanted to expand so I bought a second card and installed it.  The
> problem with this card is that I cannot seem to be able to get the
> second card to work.  I tried using xawtv with the following command:
> 
> xawtv -d /dev/video1
> 
> The result is that I get images from /dev/video0
> 
> I also tried:
> 
> xawtv -d /dev/video4
> 
> with the same result.
> 
> I obviously don't understand what's going on.
> 
> I tried following the instructions here, to no avail:
> 
> http://www.zoneminder.com/wiki/index.php/Kodicom_4400r
> 
> I also looked here:
> 
> http://linuxtv.org/wiki/index.php/Kodicom_4400R
> 
> but, unfortunately, the following page does not explain what happens
> with more than one card installed.
> 
> Here's my bttv.conf:
> 
> [code]
> options bttv gbuffers=32 card=133,132,133,133,133,132,133,133 tuner=4
> chroma_agc=1
> [/code]
> 
> I have attached a dmesg output and an lsmod output.
> 
> I would greatly appreciate some help.  Many thanks in advance.
> 
> Regards,
> 
> Allan Macdonald

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6TUuUACgkQMp6rvjb3CAT9VwCfTyqoIrlUS+IszJIQWpyYD7j9
NlsAnRFpxHKQT+p7Hem+D2SpUWiDkxu2
=l16i
-----END PGP SIGNATURE-----

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

* Re: Cannot configure second Kodicom 4400R
  2011-10-10 20:17 ` Patrick Dickey
@ 2011-10-11 15:37   ` Allan Macdonald
  2011-10-15 23:15     ` Allan Macdonald
  0 siblings, 1 reply; 5+ messages in thread
From: Allan Macdonald @ 2011-10-11 15:37 UTC (permalink / raw)
  To: linux-media

On Mon, Oct 10, 2011 at 5:17 PM, Patrick Dickey <pdickeybeta@gmail.com> wrote:
> Hi there Allan,
>
> I'm not familiar with the card (so you'll want to defer to someone else
> if their answer differs from mine).  It looks like video0 and video1 are
> assigned to the first card, and video2 and video3 are assigned to the
> second card.  So, you might want to try
>
> xawtv -d /dev/video2'
>
> or
>
> xawtv -d /dev/video3
>
> and see if one of those uses the second card (you could try video4 or
> video5 also, since they're assigned to cards).
>
> Have a great day:)
> Patrick.
>
> On 10/10/2011 01:45 PM, Allan Macdonald wrote:
>> Hi to all,
>>
>> I am new to this list.
>>
>> I have been successfully using a Kodicom 4400R with zoneminder but I
>> wanted to expand so I bought a second card and installed it.  The
>> problem with this card is that I cannot seem to be able to get the
>> second card to work.  I tried using xawtv with the following command:
>>
>> xawtv -d /dev/video1
>>
>> The result is that I get images from /dev/video0
>>
>> I also tried:
>>
>> xawtv -d /dev/video4
>>
>> with the same result.
>>
>> I obviously don't understand what's going on.
>>
>> I tried following the instructions here, to no avail:
>>
>> http://www.zoneminder.com/wiki/index.php/Kodicom_4400r
>>
>> I also looked here:
>>
>> http://linuxtv.org/wiki/index.php/Kodicom_4400R
>>
>> but, unfortunately, the following page does not explain what happens
>> with more than one card installed.
>>
>> Here's my bttv.conf:
>>
>> [code]
>> options bttv gbuffers=32 card=133,132,133,133,133,132,133,133 tuner=4
>> chroma_agc=1
>> [/code]
>>
>> I have attached a dmesg output and an lsmod output.
>>
>> I would greatly appreciate some help.  Many thanks in advance.
>>
>> Regards,
>>
>> Allan Macdonald
>

Thanks for your reply, Patrick.  I tried every device from /dev/video0
to /dev/video5 and several channel numbers.

The wierd thing is that, if I pick video0, I can see inputs 0 - 3.

When I select devices video1 - 4, I still see the inputs for video0.

To the list:

What I'd really like to know is:

1. I had previously assumed that video0 was the first card installed,
video1 was the second, etc.  Is this incorrect?  Please clarify.

2. The card is a 4-input card.  I presume these inputs were
composite(0) to composite(3).  Am I mistaken here too?  Please
clarify.

As an educational exercise, (or just plain insanity - you judge!) I
have been playing around with the example C code found here:

http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html

and inserted the following couple of lines around line 457 (just after
the "Select video input" comment)

        int index;

        index = 0;

        if (-1 == ioctl (fd, VIDIOC_S_INPUT, &index)) {
        	      perror ("VIDIOC_S_INPUT");
	              exit (EXIT_FAILURE);
        }

Questions about this software:

1. I had assumed that, if I wanted the second input on the second
card, I would make the index variable equal to 1, compile and  run the
program with option -d /dev/video1.  Am I out to lunch?  (I actually
made the input number a command-line option but that source is at home
and I'm at work now).

2. Also, is the index passed to the VIDIOC_S_INPUT ioctl the same
index passed to VIDIOC_QBUF and VIDIOC_DQBUF"?

3. What does the documentation mean by "enqueue" and "dequeue"  I
believe to "dequeue" is to cause the driver to transfer a frame from
its internal fifo buffer to the destination buffer and move the oldest
data pointer to the next oldest item.  Is this correct?  Why does the
example program then go and "enqueue" the same data to the same
device?

I should point out that I don't really know what this program is
actually doing... The only thing I can figure is that the program gets
frames from the video device and stores them in a ram buffer (assuming
default options).  I guess the data is just a big binary blob and
another process is required to handle the data in some way (i.e.
display it, or whatever).  As you can see, I am totally new at this
and some help there would be appreciated as well.  Please help a baby
learn to crawl!

Cheers,
Allan

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

* Re: Cannot configure second Kodicom 4400R
  2011-10-11 15:37   ` Allan Macdonald
@ 2011-10-15 23:15     ` Allan Macdonald
  2011-10-29 14:13       ` Allan Macdonald
  0 siblings, 1 reply; 5+ messages in thread
From: Allan Macdonald @ 2011-10-15 23:15 UTC (permalink / raw)
  To: linux-media

On Tue, Oct 11, 2011 at 12:37 PM, Allan Macdonald
<allan.w.macdonald@gmail.com> wrote:
> On Mon, Oct 10, 2011 at 5:17 PM, Patrick Dickey <pdickeybeta@gmail.com> wrote:
>> Hi there Allan,
>>
>> I'm not familiar with the card (so you'll want to defer to someone else
>> if their answer differs from mine).  It looks like video0 and video1 are
>> assigned to the first card, and video2 and video3 are assigned to the
>> second card.  So, you might want to try
>>
>> xawtv -d /dev/video2'
>>
>> or
>>
>> xawtv -d /dev/video3
>>
>> and see if one of those uses the second card (you could try video4 or
>> video5 also, since they're assigned to cards).
>>
>> Have a great day:)
>> Patrick.
>>
>> On 10/10/2011 01:45 PM, Allan Macdonald wrote:
>>> Hi to all,
>>>
>>> I am new to this list.
>>>
>>> I have been successfully using a Kodicom 4400R with zoneminder but I
>>> wanted to expand so I bought a second card and installed it.  The
>>> problem with this card is that I cannot seem to be able to get the
>>> second card to work.  I tried using xawtv with the following command:
>>>
>>> xawtv -d /dev/video1
>>>
>>> The result is that I get images from /dev/video0
>>>
>>> I also tried:
>>>
>>> xawtv -d /dev/video4
>>>
>>> with the same result.
>>>
>>> I obviously don't understand what's going on.
>>>
>>> I tried following the instructions here, to no avail:
>>>
>>> http://www.zoneminder.com/wiki/index.php/Kodicom_4400r
>>>
>>> I also looked here:
>>>
>>> http://linuxtv.org/wiki/index.php/Kodicom_4400R
>>>
>>> but, unfortunately, the following page does not explain what happens
>>> with more than one card installed.
>>>
>>> Here's my bttv.conf:
>>>
>>> [code]
>>> options bttv gbuffers=32 card=133,132,133,133,133,132,133,133 tuner=4
>>> chroma_agc=1
>>> [/code]
>>>
>>> I have attached a dmesg output and an lsmod output.
>>>
>>> I would greatly appreciate some help.  Many thanks in advance.
>>>
>>> Regards,
>>>
>>> Allan Macdonald
>>
>
> Thanks for your reply, Patrick.  I tried every device from /dev/video0
> to /dev/video5 and several channel numbers.
>
> The wierd thing is that, if I pick video0, I can see inputs 0 - 3.
>
> When I select devices video1 - 4, I still see the inputs for video0.
>
> To the list:
>
> What I'd really like to know is:
>
> 1. I had previously assumed that video0 was the first card installed,
> video1 was the second, etc.  Is this incorrect?  Please clarify.
>
> 2. The card is a 4-input card.  I presume these inputs were
> composite(0) to composite(3).  Am I mistaken here too?  Please
> clarify.
>
> As an educational exercise, (or just plain insanity - you judge!) I
> have been playing around with the example C code found here:
>
> http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html
>
> and inserted the following couple of lines around line 457 (just after
> the "Select video input" comment)
>
>        int index;
>
>        index = 0;
>
>        if (-1 == ioctl (fd, VIDIOC_S_INPUT, &index)) {
>                      perror ("VIDIOC_S_INPUT");
>                      exit (EXIT_FAILURE);
>        }
>
> Questions about this software:
>
> 1. I had assumed that, if I wanted the second input on the second
> card, I would make the index variable equal to 1, compile and  run the
> program with option -d /dev/video1.  Am I out to lunch?  (I actually
> made the input number a command-line option but that source is at home
> and I'm at work now).
>
> 2. Also, is the index passed to the VIDIOC_S_INPUT ioctl the same
> index passed to VIDIOC_QBUF and VIDIOC_DQBUF"?
>
> 3. What does the documentation mean by "enqueue" and "dequeue"  I
> believe to "dequeue" is to cause the driver to transfer a frame from
> its internal fifo buffer to the destination buffer and move the oldest
> data pointer to the next oldest item.  Is this correct?  Why does the
> example program then go and "enqueue" the same data to the same
> device?
>
> I should point out that I don't really know what this program is
> actually doing... The only thing I can figure is that the program gets
> frames from the video device and stores them in a ram buffer (assuming
> default options).  I guess the data is just a big binary blob and
> another process is required to handle the data in some way (i.e.
> display it, or whatever).  As you can see, I am totally new at this
> and some help there would be appreciated as well.  Please help a baby
> learn to crawl!
>
> Cheers,
> Allan
>
Dear Linux Media community,

OK, since I haven't heard from anybody since my last post, maybe this
additonal info might help pique somebody's interest:

According to the web page,
http://linuxtv.org/wiki/index.php/Kodicom_4400R, the Kodicom 4400R has
4 Conexant BT878A ICs.  Each chip can select one of 16 inputs which
are routed through via a crosspoint video switch IC (Intersil
CD22M3494MQ) .  This is controlled by means of the GPIO on the
“master” BT878A (the “second”, “fifth”, etc. BT878A, according to the
BTTV driver ).  The crosspoint switch IC has 16 inputs and 4 outputs
(that’s what the web page says but the CD22M3484 data sheet says the
chip has 8 outputs, not 4).  The inputs are connected to the camera
input pins, the 4 BNC inputs shared with the 16 header pins.  The 4
outputs go to the inputs of the 4 BT878A IC’s.

Of course, the web page doesn’t describe which of the 8 crosspoint
switch outputs go to which 4 BT878A’s or which GPIO channels are used
to do this.

Nevertheless, the web page explains that the driver supposedly assigns
each BT878A one of the device files /dev/video0 to /dev/video3.
Presumably, a second card should have its 4 BT878A’s assigned to
/dev/video4 to /dev/video7.  Unfortunately, this is not happening.

Experiments using xawtv:

I tried the following command line
xawtv /dev/video0
and selected composite(0) to composite(15) and found the 4 cameras on
the 4 cards on the first 4 channels, with the remaining channels blank

I then tried every /dev/videoX from /dev/video1 up to /dev/video7 and
found exactly the SAME results on every device as /dev/video0!  On
every video device, I found only the first four channels on the first
card!

This looks very much like a driver problem (it could be a problem with
xawtv but that seems unlikely since xawtv is probably just using the
v4l2 api to select the video device and channel).

One might ask if the second card is broken.  If the second card was
broken, then wouldn't I just see nothing at all from /dev/video4 and
up?  The driver appears to be assigning the second 4 device files to
the first card.

Allan

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

* Re: Cannot configure second Kodicom 4400R
  2011-10-15 23:15     ` Allan Macdonald
@ 2011-10-29 14:13       ` Allan Macdonald
  0 siblings, 0 replies; 5+ messages in thread
From: Allan Macdonald @ 2011-10-29 14:13 UTC (permalink / raw)
  To: linux-media

I realized that my command line was wrong.  Stupid me.
xawtv -c /dev/videox
where x = 0 to 7

That worked.
I will go away now!

On Sat, Oct 15, 2011 at 8:15 PM, Allan Macdonald
<allan.w.macdonald@gmail.com> wrote:
> On Tue, Oct 11, 2011 at 12:37 PM, Allan Macdonald
> <allan.w.macdonald@gmail.com> wrote:
>> On Mon, Oct 10, 2011 at 5:17 PM, Patrick Dickey <pdickeybeta@gmail.com> wrote:
>>> Hi there Allan,
>>>
>>> I'm not familiar with the card (so you'll want to defer to someone else
>>> if their answer differs from mine).  It looks like video0 and video1 are
>>> assigned to the first card, and video2 and video3 are assigned to the
>>> second card.  So, you might want to try
>>>
>>> xawtv -d /dev/video2'
>>>
>>> or
>>>
>>> xawtv -d /dev/video3
>>>
>>> and see if one of those uses the second card (you could try video4 or
>>> video5 also, since they're assigned to cards).
>>>
>>> Have a great day:)
>>> Patrick.
>>>
>>> On 10/10/2011 01:45 PM, Allan Macdonald wrote:
>>>> Hi to all,
>>>>
>>>> I am new to this list.
>>>>
>>>> I have been successfully using a Kodicom 4400R with zoneminder but I
>>>> wanted to expand so I bought a second card and installed it.  The
>>>> problem with this card is that I cannot seem to be able to get the
>>>> second card to work.  I tried using xawtv with the following command:
>>>>
>>>> xawtv -d /dev/video1
>>>>
>>>> The result is that I get images from /dev/video0
>>>>
>>>> I also tried:
>>>>
>>>> xawtv -d /dev/video4
>>>>
>>>> with the same result.
>>>>
>>>> I obviously don't understand what's going on.
>>>>
>>>> I tried following the instructions here, to no avail:
>>>>
>>>> http://www.zoneminder.com/wiki/index.php/Kodicom_4400r
>>>>
>>>> I also looked here:
>>>>
>>>> http://linuxtv.org/wiki/index.php/Kodicom_4400R
>>>>
>>>> but, unfortunately, the following page does not explain what happens
>>>> with more than one card installed.
>>>>
>>>> Here's my bttv.conf:
>>>>
>>>> [code]
>>>> options bttv gbuffers=32 card=133,132,133,133,133,132,133,133 tuner=4
>>>> chroma_agc=1
>>>> [/code]
>>>>
>>>> I have attached a dmesg output and an lsmod output.
>>>>
>>>> I would greatly appreciate some help.  Many thanks in advance.
>>>>
>>>> Regards,
>>>>
>>>> Allan Macdonald
>>>
>>
>> Thanks for your reply, Patrick.  I tried every device from /dev/video0
>> to /dev/video5 and several channel numbers.
>>
>> The wierd thing is that, if I pick video0, I can see inputs 0 - 3.
>>
>> When I select devices video1 - 4, I still see the inputs for video0.
>>
>> To the list:
>>
>> What I'd really like to know is:
>>
>> 1. I had previously assumed that video0 was the first card installed,
>> video1 was the second, etc.  Is this incorrect?  Please clarify.
>>
>> 2. The card is a 4-input card.  I presume these inputs were
>> composite(0) to composite(3).  Am I mistaken here too?  Please
>> clarify.
>>
>> As an educational exercise, (or just plain insanity - you judge!) I
>> have been playing around with the example C code found here:
>>
>> http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html
>>
>> and inserted the following couple of lines around line 457 (just after
>> the "Select video input" comment)
>>
>>        int index;
>>
>>        index = 0;
>>
>>        if (-1 == ioctl (fd, VIDIOC_S_INPUT, &index)) {
>>                      perror ("VIDIOC_S_INPUT");
>>                      exit (EXIT_FAILURE);
>>        }
>>
>> Questions about this software:
>>
>> 1. I had assumed that, if I wanted the second input on the second
>> card, I would make the index variable equal to 1, compile and  run the
>> program with option -d /dev/video1.  Am I out to lunch?  (I actually
>> made the input number a command-line option but that source is at home
>> and I'm at work now).
>>
>> 2. Also, is the index passed to the VIDIOC_S_INPUT ioctl the same
>> index passed to VIDIOC_QBUF and VIDIOC_DQBUF"?
>>
>> 3. What does the documentation mean by "enqueue" and "dequeue"  I
>> believe to "dequeue" is to cause the driver to transfer a frame from
>> its internal fifo buffer to the destination buffer and move the oldest
>> data pointer to the next oldest item.  Is this correct?  Why does the
>> example program then go and "enqueue" the same data to the same
>> device?
>>
>> I should point out that I don't really know what this program is
>> actually doing... The only thing I can figure is that the program gets
>> frames from the video device and stores them in a ram buffer (assuming
>> default options).  I guess the data is just a big binary blob and
>> another process is required to handle the data in some way (i.e.
>> display it, or whatever).  As you can see, I am totally new at this
>> and some help there would be appreciated as well.  Please help a baby
>> learn to crawl!
>>
>> Cheers,
>> Allan
>>
> Dear Linux Media community,
>
> OK, since I haven't heard from anybody since my last post, maybe this
> additonal info might help pique somebody's interest:
>
> According to the web page,
> http://linuxtv.org/wiki/index.php/Kodicom_4400R, the Kodicom 4400R has
> 4 Conexant BT878A ICs.  Each chip can select one of 16 inputs which
> are routed through via a crosspoint video switch IC (Intersil
> CD22M3494MQ) .  This is controlled by means of the GPIO on the
> “master” BT878A (the “second”, “fifth”, etc. BT878A, according to the
> BTTV driver ).  The crosspoint switch IC has 16 inputs and 4 outputs
> (that’s what the web page says but the CD22M3484 data sheet says the
> chip has 8 outputs, not 4).  The inputs are connected to the camera
> input pins, the 4 BNC inputs shared with the 16 header pins.  The 4
> outputs go to the inputs of the 4 BT878A IC’s.
>
> Of course, the web page doesn’t describe which of the 8 crosspoint
> switch outputs go to which 4 BT878A’s or which GPIO channels are used
> to do this.
>
> Nevertheless, the web page explains that the driver supposedly assigns
> each BT878A one of the device files /dev/video0 to /dev/video3.
> Presumably, a second card should have its 4 BT878A’s assigned to
> /dev/video4 to /dev/video7.  Unfortunately, this is not happening.
>
> Experiments using xawtv:
>
> I tried the following command line
> xawtv /dev/video0
> and selected composite(0) to composite(15) and found the 4 cameras on
> the 4 cards on the first 4 channels, with the remaining channels blank
>
> I then tried every /dev/videoX from /dev/video1 up to /dev/video7 and
> found exactly the SAME results on every device as /dev/video0!  On
> every video device, I found only the first four channels on the first
> card!
>
> This looks very much like a driver problem (it could be a problem with
> xawtv but that seems unlikely since xawtv is probably just using the
> v4l2 api to select the video device and channel).
>
> One might ask if the second card is broken.  If the second card was
> broken, then wouldn't I just see nothing at all from /dev/video4 and
> up?  The driver appears to be assigning the second 4 device files to
> the first card.
>
> Allan
>

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

end of thread, other threads:[~2011-10-29 14:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-10 18:45 Cannot configure second Kodicom 4400R Allan Macdonald
2011-10-10 20:17 ` Patrick Dickey
2011-10-11 15:37   ` Allan Macdonald
2011-10-15 23:15     ` Allan Macdonald
2011-10-29 14:13       ` Allan Macdonald

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