Ok, I figured out debugging, and I think I solved. Don't know if you want to removed the cardtype ref at top, or if it even matters.

See diff attached.  I based the diff off the original 0.3.7k source.

The cx25840_input_layout was not set correctly. I added to set this when you change cardtype from the ivtv call. Finally found your reference.. :)

Robert

Robert Kohler wrote:

Dug a little deeper,
Changing the one line in the cx25840-driver.c fixed it. Not a permanent solution, but should help in issolating. Looks like cardtype is NEVER set in the driver itself. You moved it to the cx25840_command subroutine, but
it is never called, at least not I can see.
   I changed line 59 to specify a default of cardtype=1.  It worked??
static int cardtype = 1;

So, I think all the mods we made based on "cardtype", are not called as cardtype stays 0.

Robert


Robert Kohler wrote:

Hans,
I have the Diamond PVR-550 card, and we worked together on the 0.3.7g release, and finally got a patch that worked. Problem was cardtype=1 gave video only, until we patched, then sound came with it.

I tested 0.3.7k and it failed miserably. No audio or video on the Tuner input (1).
   I tested 0.3.7k with your patch... still fails...
Just like 0.3.7i that I reported, and you thought it was due to me specifying a cardtype on the modprobe.conf. It appears the module does just ignore this option, and still loads by the way, I tried without it, and it still fails. No video or audio. But, in 0.3.7i, I know Composite and Svideo worked, just no Tuner input.

Since a patched 0.3.7g worked, I stepped up in revisions to see where it broke.

Well, the very next release, 0.3.7h, I install without any patches, and removed the cardtype def in modprobe.conf. This should have, as in the previous release, given me video, without sound.
Instead this gives nothing.  No sound and No video.
So something significant changed in this release, and probably in the auto-detection algorithms you put in...
Maybe we turned something on inadvertently....?

I don't have time to dig deeper right now, but the Tuner input of the card seem to have stopped working as of 0.3.7h.
Hopefully that gives some clues..

Hans Verkuil wrote:

If you have a diamondmm PVR-550, then can you please test the attached patch. It solves a problem with missing sound when using the tuner. However, I am not sure if this patch might break the sound for others who now have good
sound. Please let me know if it succeeds or not!

Without feedback during the next week I'll just put the patch in and hope
for the best.

Regards,

        Hans



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
ivtv-devel mailing list
ivtv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel





-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
ivtv-devel mailing list
ivtv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ivtv-devel


*** cx25840-driver.c	2005-08-26 16:46:40.000000000 -0500
--- cx25840-driver.c.orig	2005-08-21 09:51:45.000000000 -0500
***************
*** 507,522 ****
          case DECODER_SET_CARD_TYPE:
          {
                  cardtype = *(int *)arg;
- 		CX25840_DEBUG("Setting cardtype to %d\n",
- 		      cardtype);
- 		switch (cardtype) {
- 		case 0:
- 			cx25840_input_layout = pvr150_input_layout;
- 			break;
- 		case 1:
- 			cx25840_input_layout = pg600_input_layout;
- 			break;
- 		}
                  break;
          }
  
--- 507,512 ----
***************
*** 716,726 ****
  		case CX25840_TUNER:
  			CX25840_DEBUG("now setting Tuner input\n");
  			CX25840_SET_CH_1__SOURCE(cardtype == 1 ? 0x01 : 0x06);
! 			CX25840_SET_PWR_DN_CH3(0x01);
! 			CX25840_SET_PWR_DN_CH2(0x00);
! 			CX25840_SET_CH_2__SOURCE(0x01);
  			CX25840_SET_PWR_DN_ADC2(0x00);
! 			CX25840_SET_CH_SEL_ADC2(0x00);
  			CX25840_SET_INPUT_MODE(0x00);
  			break;
  
--- 706,716 ----
  		case CX25840_TUNER:
  			CX25840_DEBUG("now setting Tuner input\n");
  			CX25840_SET_CH_1__SOURCE(cardtype == 1 ? 0x01 : 0x06);
! 			CX25840_SET_PWR_DN_CH2(0x01);
! 			CX25840_SET_PWR_DN_CH3(0x00);
! 			CX25840_SET_CH_3__SOURCE(0x01);
  			CX25840_SET_PWR_DN_ADC2(0x00);
! 			CX25840_SET_CH_SEL_ADC2(0x01);
  			CX25840_SET_INPUT_MODE(0x00);
  			break;
  
***************
*** 1148,1155 ****
  	state->audio = DECODER_AUDIO_48_KHZ;
  	state->audio_input = -1;
  
- 	CX25840_DEBUG("Setting input_layout while cardtype is set to %d\n",
- 	      cardtype);
  	switch (cardtype) {
  	case 0:
  		cx25840_input_layout = pvr150_input_layout;
--- 1138,1143 ----

Reply via email to