public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Dvico Dual 4 card not working.
@ 2008-03-31  3:22 Nicholas Magers
  2008-03-31  9:32 ` Alan Cox
  2008-04-01  8:23 ` 冯鑫
  0 siblings, 2 replies; 11+ messages in thread
From: Nicholas Magers @ 2008-03-31  3:22 UTC (permalink / raw)
  To: video4linux-list

I have run a number of updates on my Fedora 8 system and now my Dvico
Dual 4 card no longer works. I use it with Mythtv. It seems when I
updated my Nvidia graphics driver from Livna it had an effect. I am at
work now but can provide some output if required. I have also built my
friends machine and found the exact same issue. Any help would be
appreciated.


***************************************************************
This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. 

Views expressed in this message are those of the individual sender, and are not necessarily the views of the Department of  Lands.

This email message has been swept by MIMEsweeper for the presence of computer viruses.
***************************************************************

--
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] 11+ messages in thread

* Re: Dvico Dual 4 card not working.
  2008-03-31  3:22 Nicholas Magers
@ 2008-03-31  9:32 ` Alan Cox
  2008-04-01  8:23 ` 冯鑫
  1 sibling, 0 replies; 11+ messages in thread
From: Alan Cox @ 2008-03-31  9:32 UTC (permalink / raw)
  To: Nicholas Magers; +Cc: video4linux-list

On Mon, Mar 31, 2008 at 02:22:15PM +1100, Nicholas Magers wrote:
> Dual 4 card no longer works. I use it with Mythtv. It seems when I
> updated my Nvidia graphics driver from Livna it had an effect. I am at

Nvidia driver reports should go to Nvidia, only they have the source code
so only they can help you

--
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] 11+ messages in thread

* RE: Dvico Dual 4 card not working.
@ 2008-03-31 21:57 Nicholas Magers
  2008-03-31 23:32 ` Alan Cox
  0 siblings, 1 reply; 11+ messages in thread
From: Nicholas Magers @ 2008-03-31 21:57 UTC (permalink / raw)
  To: Alan Cox; +Cc: video4linux-list

Is this an automated response. Alan are you a robot?

Fortunately I was able to get my Dvico dual 4 TV tuner card working
again by removing the v4l distribution and going back to hg clone
http://linuxtv.org/hg/~pascoe/xc-test Instructions on this page
http://www.itee.uq.edu.au/~chrisp/Linux-DVB/DVICO/

-----Original Message-----
From: Alan Cox [mailto:alan@redhat.com] 
Sent: Monday, 31 March 2008 8:32 PM
To: Nicholas Magers
Cc: video4linux-list@redhat.com
Subject: Re: Dvico Dual 4 card not working.

On Mon, Mar 31, 2008 at 02:22:15PM +1100, Nicholas Magers wrote:
> Dual 4 card no longer works. I use it with Mythtv. It seems when I
> updated my Nvidia graphics driver from Livna it had an effect. I am at

Nvidia driver reports should go to Nvidia, only they have the source
code
so only they can help you


***************************************************************
This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. 

Views expressed in this message are those of the individual sender, and are not necessarily the views of the Department of  Lands.

This email message has been swept by MIMEsweeper for the presence of computer viruses.
***************************************************************


--
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] 11+ messages in thread

* Re: Dvico Dual 4 card not working.
  2008-03-31 21:57 Dvico Dual 4 card not working Nicholas Magers
@ 2008-03-31 23:32 ` Alan Cox
  0 siblings, 0 replies; 11+ messages in thread
From: Alan Cox @ 2008-03-31 23:32 UTC (permalink / raw)
  To: Nicholas Magers; +Cc: Alan Cox, video4linux-list

On Tue, Apr 01, 2008 at 08:57:13AM +1100, Nicholas Magers wrote:
> Is this an automated response. Alan are you a robot?

Neither a robot nor 1000 gnomes, just pointing out the reality. Nvidia have
our soure, we don't have theirs so if you get a bug with their driver we can't
really do anything about it - but Nvidia can.

Alan

--
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] 11+ messages in thread

* RE: Dvico Dual 4 card not working.
@ 2008-04-01  1:14 Nicholas Magers
  2008-04-01  7:27 ` Alan Cox
  0 siblings, 1 reply; 11+ messages in thread
From: Nicholas Magers @ 2008-04-01  1:14 UTC (permalink / raw)
  To: Alan Cox; +Cc: video4linux-list

I guess what I'm saying is in my naivety I mentioned the word 'Nvidia'.
In all likelihood the problem has nothing to do with the 'Nvidia"
component. I will in the future not mention the word 'Nvidia' so that my
questions aren't railroaded to a dead end. Thanks for the valuable
lesson.

-----Original Message-----
From: Alan Cox [mailto:alan@redhat.com] 
Sent: Tuesday, 1 April 2008 10:33 AM
To: Nicholas Magers
Cc: Alan Cox; video4linux-list@redhat.com
Subject: Re: Dvico Dual 4 card not working.

On Tue, Apr 01, 2008 at 08:57:13AM +1100, Nicholas Magers wrote:
> Is this an automated response. Alan are you a robot?

Neither a robot nor 1000 gnomes, just pointing out the reality. Nvidia
have
our soure, we don't have theirs so if you get a bug with their driver we
can't
really do anything about it - but Nvidia can.

Alan


***************************************************************
This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. 

Views expressed in this message are those of the individual sender, and are not necessarily the views of the Department of  Lands.

This email message has been swept by MIMEsweeper for the presence of computer viruses.
***************************************************************


--
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] 11+ messages in thread

* Re: Dvico Dual 4 card not working.
@ 2008-04-01  1:53 Ben Caldwell
  0 siblings, 0 replies; 11+ messages in thread
From: Ben Caldwell @ 2008-04-01  1:53 UTC (permalink / raw)
  To: video4linux-list; +Cc: alan, Nicholas.Magers

>
> ---------- Forwarded message ----------
> From: Alan Cox <alan@redhat.com>
> To: Nicholas Magers <Nicholas.Magers@lands.nsw.gov.au>
> Date: Mon, 31 Mar 2008 05:32:05 -0400
> Subject: Re: Dvico Dual 4 card not working.
> On Mon, Mar 31, 2008 at 02:22:15PM +1100, Nicholas Magers wrote:
> > Dual 4 card no longer works. I use it with Mythtv. It seems when I
> > updated my Nvidia graphics driver from Livna it had an effect. I am at
>
> Nvidia driver reports should go to Nvidia, only they have the source code
> so only they can help you
>
I have recently posted a similar problem with the dvico dual digital 4 card
on a Fedora 8 mythtv box. I don't think that this problem is due to the
nvidia driver.
My tuner card was working fine until I updated the to the latest v4l source
from the hg repository a week or two back and made new kernel modules, I
included traces in my post which can be seen in the list archives at the end
of march.
I reverted to a previous kernel that still has the kernel modules made from
an earlier version of the v4l source and everything works fine again. I am
not going to try compiling new modules for the working kernel as it could
leave me with no way at all to use my tuner card.

So tonight I will try building modules for my latest kernel (from Fedora
updates) from an older version of the v4l source and report back to this
list with the results.

- Ben Caldwell
--
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] 11+ messages in thread

* RE: Dvico Dual 4 card not working.
@ 2008-04-01  2:31 Nicholas Magers
  2008-04-01 15:41 ` Ben Caldwell
  0 siblings, 1 reply; 11+ messages in thread
From: Nicholas Magers @ 2008-04-01  2:31 UTC (permalink / raw)
  To: Ben Caldwell, video4linux-list; +Cc: alan

I'll be interested in the result.

 

From: Ben Caldwell [mailto:benny.caldwell@gmail.com] 
Sent: Tuesday, 1 April 2008 12:54 PM
To: video4linux-list@redhat.com
Cc: alan@redhat.com; Nicholas Magers
Subject: Re: Dvico Dual 4 card not working.

 

	---------- Forwarded message ----------
	From: Alan Cox <alan@redhat.com>
	To: Nicholas Magers <Nicholas.Magers@lands.nsw.gov.au>
	Date: Mon, 31 Mar 2008 05:32:05 -0400
	Subject: Re: Dvico Dual 4 card not working.
	On Mon, Mar 31, 2008 at 02:22:15PM +1100, Nicholas Magers wrote:
	> Dual 4 card no longer works. I use it with Mythtv. It seems
when I
	> updated my Nvidia graphics driver from Livna it had an effect.
I am at
	
	Nvidia driver reports should go to Nvidia, only they have the
source code
	so only they can help you

I have recently posted a similar problem with the dvico dual digital 4
card on a Fedora 8 mythtv box. I don't think that this problem is due to
the nvidia driver.

My tuner card was working fine until I updated the to the latest v4l
source from the hg repository a week or two back and made new kernel
modules, I included traces in my post which can be seen in the list
archives at the end of march.

I reverted to a previous kernel that still has the kernel modules made
from an earlier version of the v4l source and everything works fine
again. I am not going to try compiling new modules for the working
kernel as it could leave me with no way at all to use my tuner card.

 

So tonight I will try building modules for my latest kernel (from Fedora
updates) from an older version of the v4l source and report back to this
list with the results.

 

- Ben Caldwell


***************************************************************
This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. 

Views expressed in this message are those of the individual sender, and are not necessarily the views of the Department of  Lands.

This email message has been swept by MIMEsweeper for the presence of computer viruses.
***************************************************************

--
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] 11+ messages in thread

* Re: Dvico Dual 4 card not working.
  2008-04-01  1:14 Nicholas Magers
@ 2008-04-01  7:27 ` Alan Cox
  0 siblings, 0 replies; 11+ messages in thread
From: Alan Cox @ 2008-04-01  7:27 UTC (permalink / raw)
  To: Nicholas Magers; +Cc: Alan Cox, video4linux-list

On Tue, Apr 01, 2008 at 12:14:18PM +1100, Nicholas Magers wrote:
> I guess what I'm saying is in my naivety I mentioned the word 'Nvidia'.
> In all likelihood the problem has nothing to do with the 'Nvidia"
> component. I will in the future not mention the word 'Nvidia' so that my
> questions aren't railroaded to a dead end. Thanks for the valuable
> lesson.

Far more constructive would be to make sure you can reproduce bugs with the
"nv" driver - a lot of video playback and overlay bugs are heavily dependant
upon the X video driver and so things like Nvidia binary drivers cause problems
like those you reported

--
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] 11+ messages in thread

* Re: Dvico Dual 4 card not working.
  2008-03-31  3:22 Nicholas Magers
  2008-03-31  9:32 ` Alan Cox
@ 2008-04-01  8:23 ` 冯鑫
  1 sibling, 0 replies; 11+ messages in thread
From: 冯鑫 @ 2008-04-01  8:23 UTC (permalink / raw)
  To: video4linux-list

I use a driver that is "soc_camera V4L2 interface for directly
connected cameras".but I have some problems:
1、is this driver for linux-2.6.24?
2、I want to know how can I get arch/arm/mach-pxa/devices.c.
3、the function mt9v022_probe(struct i2c_client *client) in mt9v022.c
does not execute,why?

thanks
fengxin

--
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] 11+ messages in thread

* Re: Dvico Dual 4 card not working.
  2008-04-01  2:31 Nicholas Magers
@ 2008-04-01 15:41 ` Ben Caldwell
  2008-04-01 20:19   ` Michael Krufky
  0 siblings, 1 reply; 11+ messages in thread
From: Ben Caldwell @ 2008-04-01 15:41 UTC (permalink / raw)
  To: Nicholas Magers; +Cc: alan, video4linux-list

On Tue, Apr 1, 2008 at 10:31 AM, Nicholas Magers <
Nicholas.Magers@lands.nsw.gov.au> wrote:

>  I'll be interested in the result.
>

After much plodding through changesets I have something to report. It seems
that the the dvico dual digital 4 card is broken in changesets after
d4df22377e83 (11 days ago).
It is interesting to note that the next change (the one that breaks it) is
"Removes video_dev from tuner-xc3028 config struct" - the dvico dual digital
4 has an xc3028.

So to get it working:
*hg update -r d4df22377e83
make clean
make rminstall
make release
make
make install*

Then reboot. One other interesting thing I have found is that sometimes
after compiling new modules I actually have to turn the PC off then on again
(rather than just a reboot) to get everything working properly.

- Ben
--
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] 11+ messages in thread

* Re: Dvico Dual 4 card not working.
  2008-04-01 15:41 ` Ben Caldwell
@ 2008-04-01 20:19   ` Michael Krufky
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Krufky @ 2008-04-01 20:19 UTC (permalink / raw)
  To: Ben Caldwell; +Cc: alan, Nicholas Magers, LInux DVB, video4linux-list

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

On Tue, Apr 1, 2008 at 11:41 AM, Ben Caldwell <benny.caldwell@gmail.com> wrote:
> On Tue, Apr 1, 2008 at 10:31 AM, Nicholas Magers <
>  After much plodding through changesets I have something to report. It seems
>  that the the dvico dual digital 4 card is broken in changesets after
>  d4df22377e83 (11 days ago).
>  It is interesting to note that the next change (the one that breaks it) is
>  "Removes video_dev from tuner-xc3028 config struct" - the dvico dual digital
>  4 has an xc3028.
>
>  So to get it working:
>  *hg update -r d4df22377e83
>  make clean
>  make rminstall
>  make release
>  make
>  make install*
>
>  Then reboot. One other interesting thing I have found is that sometimes
>  after compiling new modules I actually have to turn the PC off then on again
>  (rather than just a reboot) to get everything working properly.
>
>  - Ben


Can you try using the v4l-dvb master branch hg repository on
linuxtv.org again, after applying the attached patch (see below)

It is clear what went wrong on the Dual Digital 4 --

Mauro did some changes recently that use a "magic number" (yuck) to
differentiate between devices and manage multiple instances of the
xc2028 driver on a hybrid design.

He used i2c_adapter->algo_data to generate this "magic number" ,
which, IMHO is a very bad idea, especially since some digital-only
devices do not even define algo_data.  On the other hand,
i2c_adap->algo_data is a reasonable structure to use for the
"video_dev" pointer in the tuner_callback function, *if* it is
defined.

The patch in the link above uses the 'hybrid_tuner_request_state"
method to manage multiple instances of the device driver on a hybrid
design.  This uses a *much* safer method, using the i2c_adapter ID
along with the device i2c address to identify unique instances.  For
the "video_dev" pointer, the patch also uses a safer method:  If the
dvb_adapter device is defined, use fe->dvb->priv, otherwise, fall back
to Mauro's previous method of using i2c_adap->algo_data.

Please note:  This patch is intended for testing purposes only --
there is a remaining issue in this patch, where it doesn't destroy
some memory properly when tuner instances are destroyed.  I'll be
happy to fix that remaining issue after I receive some reports that
the larger issue is actually remedied by this patch.

Please let me know if this fixes the problem, and I'll produce a new
patch afterwards.

Regards,

Mike Krufky

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xc-instance.patch --]
[-- Type: text/x-diff; name=xc-instance.patch, Size: 3767 bytes --]

diff -r 0776e4801991 linux/drivers/media/video/tuner-xc2028.c
--- a/linux/drivers/media/video/tuner-xc2028.c	Fri Mar 28 14:52:44 2008 -0300
+++ b/linux/drivers/media/video/tuner-xc2028.c	Tue Apr 01 15:57:38 2008 -0400
@@ -57,7 +57,7 @@ MODULE_PARM_DESC(firmware_name, "Firmwar
 MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the "
 				"default firmware name\n");
 
-static LIST_HEAD(xc2028_list);
+static LIST_HEAD(hybrid_tuner_instance_list);
 static DEFINE_MUTEX(xc2028_list_mutex);
 
 /* struct for storing firmware table */
@@ -79,12 +79,11 @@ struct firmware_properties {
 };
 
 struct xc2028_data {
-	struct list_head        xc2028_list;
+	struct list_head        hybrid_tuner_instance_list;
 	struct tuner_i2c_props  i2c_props;
 	int                     (*tuner_callback) (void *dev,
 						   int command, int arg);
 	void			*video_dev;
-	int			count;
 	__u32			frequency;
 
 	struct firmware_description *firm;
@@ -1095,19 +1094,12 @@ static int xc2028_dvb_release(struct dvb
 
 	mutex_lock(&xc2028_list_mutex);
 
-	priv->count--;
-
-	if (!priv->count) {
-		list_del(&priv->xc2028_list);
-
-		kfree(priv->ctrl.fname);
-
-		free_firmware(priv);
-		kfree(priv);
-		fe->tuner_priv = NULL;
-	}
+	if (priv)
+		hybrid_tuner_release_state(priv);
 
 	mutex_unlock(&xc2028_list_mutex);
+
+	fe->tuner_priv = NULL;
 
 	return 0;
 }
@@ -1179,7 +1171,7 @@ struct dvb_frontend *xc2028_attach(struc
 				   struct xc2028_config *cfg)
 {
 	struct xc2028_data *priv;
-	void               *video_dev;
+	int instance;
 
 	if (debug)
 		printk(KERN_DEBUG "xc2028: Xcv2028/3028 init called!\n");
@@ -1192,48 +1184,40 @@ struct dvb_frontend *xc2028_attach(struc
 		return NULL;
 	}
 
-	video_dev = cfg->i2c_adap->algo_data;
-
-	if (debug)
-		printk(KERN_DEBUG "xc2028: video_dev =%p\n", video_dev);
-
 	mutex_lock(&xc2028_list_mutex);
 
-	list_for_each_entry(priv, &xc2028_list, xc2028_list) {
-		if (&priv->i2c_props.adap->dev == &cfg->i2c_adap->dev) {
-			video_dev = NULL;
-			if (debug)
-				printk(KERN_DEBUG "xc2028: reusing device\n");
-
-			break;
-		}
-	}
-
-	if (video_dev) {
-		priv = kzalloc(sizeof(*priv), GFP_KERNEL);
-		if (priv == NULL) {
-			mutex_unlock(&xc2028_list_mutex);
-			return NULL;
-		}
-
-		priv->i2c_props.addr = cfg->i2c_addr;
-		priv->i2c_props.adap = cfg->i2c_adap;
-		priv->i2c_props.name = "xc2028";
-
-		priv->video_dev = video_dev;
+	instance = hybrid_tuner_request_state(struct xc2028_data, priv,
+					      hybrid_tuner_instance_list,
+					      cfg->i2c_adap, cfg->i2c_addr,
+					      "xc2028");
+	switch (instance) {
+	case 0:
+		/* memory allocation failure */
+		goto fail;
+		break;
+	case 1:
+		/* new tuner instance */
 		priv->tuner_callback = cfg->callback;
 		priv->ctrl.max_len = 13;
 
 		mutex_init(&priv->lock);
 
-		list_add_tail(&priv->xc2028_list, &xc2028_list);
-	}
-
-	fe->tuner_priv = priv;
-	priv->count++;
-
-	if (debug)
-		printk(KERN_DEBUG "xc2028: usage count is %i\n", priv->count);
+		/* analog side (tuner-core) uses i2c_adap->algo_data.
+		 * digital side is not guaranteed to have algo_data defined.
+		 *
+		 * digital side will always have fe->dvb defined.
+		 * analog side (tuner-core) doesn't (yet) define fe->dvb.
+		 */
+		priv->video_dev = ((fe->dvb) && (fe->dvb->priv)) ?
+				   fe->dvb->priv : cfg->i2c_adap->algo_data;
+
+		fe->tuner_priv = priv;
+		break;
+	case 2:
+		/* existing tuner instance */
+		fe->tuner_priv = priv;
+		break;
+	}
 
 	memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops,
 	       sizeof(xc2028_dvb_tuner_ops));
@@ -1246,6 +1230,11 @@ struct dvb_frontend *xc2028_attach(struc
 	mutex_unlock(&xc2028_list_mutex);
 
 	return fe;
+fail:
+	mutex_unlock(&xc2028_list_mutex);
+
+	xc2028_dvb_release(fe);
+	return NULL;
 }
 
 EXPORT_SYMBOL(xc2028_attach);

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
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] 11+ messages in thread

end of thread, other threads:[~2008-04-01 20:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-31 21:57 Dvico Dual 4 card not working Nicholas Magers
2008-03-31 23:32 ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2008-04-01  2:31 Nicholas Magers
2008-04-01 15:41 ` Ben Caldwell
2008-04-01 20:19   ` Michael Krufky
2008-04-01  1:53 Ben Caldwell
2008-04-01  1:14 Nicholas Magers
2008-04-01  7:27 ` Alan Cox
2008-03-31  3:22 Nicholas Magers
2008-03-31  9:32 ` Alan Cox
2008-04-01  8:23 ` 冯鑫

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