Skip to contentSkip to conversation

Problems with new S2API and DVB-T

linux-dvb Jose Alberto Reguero 2 participants 4 messages Oct 6, 2008 – Oct 7, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

I am trying to use the new API for DVB-T and I have some problems. They are not way to set code_rate_HP, code_rate_LP, transmission_mode, and guard_interval , and the default values are 0, that are not the AUTO ones. Also the bandwidth is not treated well. The attached patch is a workaround that works for me.

Thanks.
Jose Alberto

linux/drivers/media/dvb/dvb-core/dvb_frontend.c +6 -21
diff -r 979d14edeb2e linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -974,15 +974,7 @@
 		c->delivery_system = SYS_DVBC_ANNEX_AC;
 		break;
 	case FE_OFDM:
-		if (p->u.ofdm.bandwidth == BANDWIDTH_6_MHZ)
-			c->bandwidth_hz = 6000000;
-		else if (p->u.ofdm.bandwidth == BANDWIDTH_7_MHZ)
-			c->bandwidth_hz = 7000000;
-		else if (p->u.ofdm.bandwidth == BANDWIDTH_8_MHZ)
-			c->bandwidth_hz = 8000000;
-		else
-			/* Including BANDWIDTH_AUTO */
-			c->bandwidth_hz = 0;
+		c->bandwidth_hz = p->u.ofdm.bandwidth;
 		c->code_rate_HP = p->u.ofdm.code_rate_HP;
 		c->code_rate_LP = p->u.ofdm.code_rate_LP;
 		c->modulation = p->u.ofdm.constellation;
@@ -1031,19 +1023,12 @@
 		break;
 	case FE_OFDM:
 		printk("%s() Preparing OFDM req\n", __FUNCTION__);
-		if (c->bandwidth_hz == 6000000)
-			p->u.ofdm.bandwidth = BANDWIDTH_6_MHZ;
-		else if (c->bandwidth_hz == 7000000)
-			p->u.ofdm.bandwidth = BANDWIDTH_7_MHZ;
-		else if (c->bandwidth_hz == 8000000)
-			p->u.ofdm.bandwidth = BANDWIDTH_8_MHZ;
-		else
-			p->u.ofdm.bandwidth = BANDWIDTH_AUTO;
-		p->u.ofdm.code_rate_HP = c->code_rate_HP;
-		p->u.ofdm.code_rate_LP = c->code_rate_LP;
+		p->u.ofdm.bandwidth = c->bandwidth_hz;
+		p->u.ofdm.code_rate_HP = FEC_AUTO;
+		p->u.ofdm.code_rate_LP = FEC_AUTO;
 		p->u.ofdm.constellation = c->modulation;
-		p->u.ofdm.transmission_mode = c->transmission_mode;
-		p->u.ofdm.guard_interval = c->guard_interval;
+		p->u.ofdm.transmission_mode = TRANSMISSION_MODE_AUTO;
+		p->u.ofdm.guard_interval = GUARD_INTERVAL_AUTO;
 		p->u.ofdm.hierarchy_information = c->hierarchy;
 		c->delivery_system = SYS_DVBT;
 		break;

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#1 lore raw
Quoted 5 lines · Jose Alberto Reguero

I am trying to use the new API for DVB-T and I have some problems. They are not way to set code_rate_HP, code_rate_LP, transmission_mode, and guard_interval , and the default values are 0, that are not the AUTO ones. Also the bandwidth is not treated well. The attached patch is a workaround that works for me.

Hi Jose,

Thanks for your patch.

I've taken a different approach and added support for DTV_TRANSMISSION_MODE, DTV_HIERARCHY, DTV_GUARD_INTERVAL, DTV_CODE_RATE_HP and DTV_CODE_RATE_LP, so this will probably help.

In terms of the bandwidth changes, you realise that you have to bandwidth in units of HZ via the S2API? If you're doing this then I do not see why the bandwidth code is failing. We have some backward compat code which should be cleanly taking care of this, proving you pass HZ into the S2API.

One interest point is that we may want to pick sensible defaults for the cache values during initialisation (which doesn't currently happen). Applications that rely on default behaviour could be failing... although Kaffeine, Myth, VDR and tzap applications are not experiencing this issue.

http://linuxtv.org/hg/~stoth/s2

Could you pull this tree and try again? (Remember to change your bandwidth values to HZ, I.e. 8000000.

Thanks again,

Steve

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#2 lore raw
Quoted 26 lines · Steven Toth
Quoted 5 lines · Jose Alberto Reguero

I am trying to use the new API for DVB-T and I have some problems. They are not way to set code_rate_HP, code_rate_LP, transmission_mode, and guard_interval , and the default values are 0, that are not the AUTO ones. Also the bandwidth is not treated well. The attached patch is a workaround that works for me.

Hi Jose,

Thanks for your patch.

I've taken a different approach and added support for DTV_TRANSMISSION_MODE, DTV_HIERARCHY, DTV_GUARD_INTERVAL, DTV_CODE_RATE_HP and DTV_CODE_RATE_LP, so this will probably help.

In terms of the bandwidth changes, you realise that you have to bandwidth in units of HZ via the S2API? If you're doing this then I do not see why the bandwidth code is failing. We have some backward compat code which should be cleanly taking care of this, proving you pass HZ into the S2API.

One interest point is that we may want to pick sensible defaults for the cache values during initialisation (which doesn't currently happen). Applications that rely on default behaviour could be failing... although Kaffeine, Myth, VDR and tzap applications are not experiencing this issue.

Quoted 8 lines

http://linuxtv.org/hg/~stoth/s2

Could you pull this tree and try again? (Remember to change your bandwidth values to HZ, I.e. 8000000.

Thanks again,

Steve

It works ok.
Thanks.

Jose Alberto

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

#3 lore raw
Quoted 31 lines · Jose Alberto Reguero
Quoted 30 lines · Steven Toth
Quoted 5 lines · Jose Alberto Reguero

I am trying to use the new API for DVB-T and I have some problems. They are not way to set code_rate_HP, code_rate_LP, transmission_mode, and guard_interval , and the default values are 0, that are not the AUTO ones. Also the bandwidth is not treated well. The attached patch is a workaround that works for me.

Hi Jose,

Thanks for your patch.

I've taken a different approach and added support for DTV_TRANSMISSION_MODE, DTV_HIERARCHY, DTV_GUARD_INTERVAL, DTV_CODE_RATE_HP and DTV_CODE_RATE_LP, so this will probably help.

In terms of the bandwidth changes, you realise that you have to bandwidth in units of HZ via the S2API? If you're doing this then I do not see why the bandwidth code is failing. We have some backward compat code which should be cleanly taking care of this, proving you pass HZ into the S2API.

One interest point is that we may want to pick sensible defaults for the cache values during initialisation (which doesn't currently happen). Applications that rely on default behaviour could be failing... although Kaffeine, Myth, VDR and tzap applications are not experiencing this issue.

http://linuxtv.org/hg/~stoth/s2

Could you pull this tree and try again? (Remember to change your bandwidth values to HZ, I.e. 8000000.

Quoted 6 lines
Quoted 3 lines

Thanks again,

Steve

It works ok.
Thanks.

Thanks for testing Jose, regards.

- Steve

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb