Hi all,

I have got my TwinHan VP2031A DVB-C card working with Linux version
2.6.23.14 and MythTV.
For this I needed three changes to dst.c and these changes are attached here
in a single patch file.
Maybe they are useful for others (or even they may end up in the official
version?).
Fixes 1 and 2 are largely based on patches I once received from Manu Abraham
for an older version of the Linux kernel.


====== Fix #1 ======
Around line 849 change the type_flags to this:
.type_flags = DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_VLF,

The original code has also the following flags:
DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_1
It strikes me as odd that the original code states that the card has both
FW_1 and FW_2.
Two versions of firmware in one card?

====== Fix #2 ======
Around line 1360 in function dst_get_tuna,  remove the following test:
 !(state->dst_type == DST_TYPE_IS_CABLE)


====== Fix #3 ======
Around line 1828
.caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_16 | FE_CAN_QAM_32 | FE_CAN_QAM_64 |
FE_CAN_QAM_
128 | FE_CAN_QAM_256

The original code is this:
.caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_AUTO

Reason to change this is that I got this warnings from MythTV:
2008-01-29 23:17:24.171 DVBChan(1:0) Warning: Unsupported modulation
parameter.
The problem is (as far as I understand this) that MythTV tries to tune with
qam64 (which is correct)
and that the error message comes because the capability indicates that it
cannot do qam64.
Note that MythTV gives only a warning, it does work OK.
Changing the capabilities to include FE_CAN_QAM_64 solves the problem.
Note that the function dst_set_modulation accepts QAM16/32/64/128/148 but
returns -EINVAL  for QAM_AUTO.
I think this is a fix that is not specific for the VP2031A card but that is
valid for all TwinHan DVB-C cards.
However, I have of course only tested with my VP2031A.

Hope this is useful,
Klaas.
*** dst.c.orig	2008-01-31 19:37:19.000000000 +0100
--- dst.c	2008-01-31 19:40:12.000000000 +0100
***************
*** 846,852 ****
  		.device_id = "DCT-CI",
  		.offset = 1,
  		.dst_type = DST_TYPE_IS_CABLE,
! 		.type_flags = DST_TYPE_HAS_MULTI_FE | DST_TYPE_HAS_FW_1	| DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_VLF,
  		.dst_feature = DST_TYPE_HAS_CA,
  		.tuner_type = 0
  	},
--- 846,852 ----
  		.device_id = "DCT-CI",
  		.offset = 1,
  		.dst_type = DST_TYPE_IS_CABLE,
! 		.type_flags = DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_VLF,
  		.dst_feature = DST_TYPE_HAS_CA,
  		.tuner_type = 0
  	},
***************
*** 1357,1363 ****
  		return retval;
  	}
  	if ((state->type_flags & DST_TYPE_HAS_VLF) &&
- 		!(state->dst_type == DST_TYPE_IS_CABLE) &&
  		!(state->dst_type == DST_TYPE_IS_ATSC)) {
  
  		if (state->rx_tuna[9] != dst_check_sum(&state->rx_tuna[0], 9)) {
--- 1357,1362 ----
***************
*** 1826,1832 ****
  		.symbol_rate_min = 1000000,
  		.symbol_rate_max = 45000000,
  	/*     . symbol_rate_tolerance	=	???,*/
! 		.caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_AUTO
  	},
  
  	.release = dst_release,
--- 1825,1831 ----
  		.symbol_rate_min = 1000000,
  		.symbol_rate_max = 45000000,
  	/*     . symbol_rate_tolerance	=	???,*/
! 		.caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_16 | FE_CAN_QAM_32 | FE_CAN_QAM_64 | FE_CAN_QAM_128 | FE_CAN_QAM_256
  	},
  
  	.release = dst_release,
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Reply via email to