public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [linux-dvb] Problems with new S2API and DVB-T
@ 2008-10-06 12:22 Jose Alberto Reguero
  2008-10-07  1:06 ` Steven Toth
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Alberto Reguero @ 2008-10-06 12:22 UTC (permalink / raw)
  To: linux-dvb

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

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



[-- Attachment #2: dvb_frontend.diff --]
[-- Type: text/x-patch, Size: 1774 bytes --]

diff -r 979d14edeb2e linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c	Sat Oct 04 21:37:36 2008 -0300
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c	Mon Oct 06 14:14:39 2008 +0200
@@ -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;

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

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

* Re: [linux-dvb] Problems with new S2API and DVB-T
  2008-10-06 12:22 [linux-dvb] Problems with new S2API and DVB-T Jose Alberto Reguero
@ 2008-10-07  1:06 ` Steven Toth
  2008-10-07  9:34   ` Jose Alberto Reguero
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Toth @ 2008-10-07  1:06 UTC (permalink / raw)
  To: Jose Alberto Reguero; +Cc: linux-dvb

Jose Alberto Reguero wrote:
> 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
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

* Re: [linux-dvb] Problems with new S2API and DVB-T
  2008-10-07  1:06 ` Steven Toth
@ 2008-10-07  9:34   ` Jose Alberto Reguero
  2008-10-07 14:44     ` Steven Toth
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Alberto Reguero @ 2008-10-07  9:34 UTC (permalink / raw)
  To: Steven Toth; +Cc: linux-dvb

El Martes, 7 de Octubre de 2008, Steven Toth escribió:
> Jose Alberto Reguero wrote:
> > 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

It works ok.
Thanks.

Jose Alberto


_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

* Re: [linux-dvb] Problems with new S2API and DVB-T
  2008-10-07  9:34   ` Jose Alberto Reguero
@ 2008-10-07 14:44     ` Steven Toth
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Toth @ 2008-10-07 14:44 UTC (permalink / raw)
  To: Jose Alberto Reguero; +Cc: linux-dvb

Jose Alberto Reguero wrote:
> El Martes, 7 de Octubre de 2008, Steven Toth escribió:
>> Jose Alberto Reguero wrote:
>>> 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
> 
> It works ok.
> Thanks.

Thanks for testing Jose, regards.

- Steve


_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

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

end of thread, other threads:[~2008-10-07 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 12:22 [linux-dvb] Problems with new S2API and DVB-T Jose Alberto Reguero
2008-10-07  1:06 ` Steven Toth
2008-10-07  9:34   ` Jose Alberto Reguero
2008-10-07 14:44     ` Steven Toth

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