Re: Terratec Cinergy S2 PCI HD ioctl DVBFE_GET_INFO failed:Operation not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Zeno!

I'm glad it worked out for you, as for szap2 is included in dvb-apps
under "test" directory.
http://linuxtv.org/hg/dvb-apps

Kaffeine doesn't have support for multiproto someone is working on
that according to him he was suppose to release
last week, I don't know what happened. You can ask him yourself
"webdev at chaosmedia dot org"

As for "Using 'STB0899 Multistandard' DVB-S" it's always been that
like that when scanning but it should find HD channels
as well.

If you want to use Kaffeine or any other DVB applications that lack
multiproto support there is another alternative.
You cant patch mutiproto with old api patch, if you go with this i
think you are going to need unpatched scan and szap
which can be found in standard dvb-apps.
(This DVB-S only, but if you use it with multiproto supported apps
like vdr u can use DVB_S2)

I have attached "multiproto-support-old-api.diff"

Faruk

On Sun, Jun 8, 2008 at 12:29 PM, Zeno Zoli <zeno.zoli@xxxxxxxxx> wrote:
> Thanks. I got the scan working. It failed on most frequencies though.
>
> ----------------------------------> Using 'STB0899 Multistandard' DVB-S
>
> Shouldn't that be:
> ----------------------------------> Using 'STB0899 Multistandard' DVB-S2  ?
>
> Besides that. Do you know where the patched szap2 can be found, or is there
> an alternative?
> Tried Kaffeine, but still without success. Guess I need a kaffeine patch
> too.
>
>
> On Sat, Jun 7, 2008 at 8:11 PM, Faruk A <fa@xxxxxxxxx> wrote:
>>
>> Hi Zeno!
>>
>> If i remember correctly i think i got Hunk failed too i had to paste
>> it manually.
>> here is my copy already been patched and compiled. If the binary scan
>> doesn't work run "make clean" and then "make"
>> http://www.zshare.net/download/1322006118c9c70a/
>>
>> Faruk
>>
>>
>> On Sat, Jun 7, 2008 at 7:17 PM, Zeno Zoli <zeno.zoli@xxxxxxxxx> wrote:
>> > Tried, and got
>> >
>> > Hunk #1 FAILED at 1674.
>> > Hunk #2 FAILED at 1693.
>> > Hunk #3 FAILED at 1704.
>> >
>> >
>> >
>> > On Fri, Jun 6, 2008 at 2:50 PM, Faruk A <fa@xxxxxxxxx> wrote:
>> >>
>> >> Hi Zeno!
>> >>
>> >> Apply this patch.
>> >>
>> >> diff -Naur 1/scan.c 2/scan.c
>> >> --- 1/scan.c    2008-04-03 02:00:19.000000000 +0200
>> >> +++ 2/scan.c    2008-04-03 12:29:32.000000000 +0200
>> >> @@ -1674,15 +1674,18 @@
>> >>        }
>> >>
>> >>         struct dvbfe_info fe_info1;
>> >> +       enum dvbfe_delsys delivery;
>> >>
>> >>         // a temporary hack, need to clean
>> >>         memset(&fe_info1, 0, sizeof (struct dvbfe_info));
>> >>
>> >>         if(t->modulation_system == 0)
>> >> -            fe_info1.delivery = DVBFE_DELSYS_DVBS;
>> >> +            delivery = DVBFE_DELSYS_DVBS;
>> >>         else if(t->modulation_system == 1)
>> >> -            fe_info1.delivery = DVBFE_DELSYS_DVBS2;
>> >> -
>> >> +            delivery = DVBFE_DELSYS_DVBS2;
>> >> +
>> >> +        ioctl(frontend_fd, DVBFE_SET_DELSYS, &delivery); //switch
>> >> system
>> >> +
>> >>         int result = ioctl(frontend_fd, DVBFE_GET_INFO, &fe_info1);
>> >>         if (result < 0) {
>> >>             perror("ioctl DVBFE_GET_INFO failed");
>> >> @@ -1690,7 +1693,7 @@
>> >>             return -1;
>> >>         }
>> >>
>> >> -        switch (fe_info1.delivery) {
>> >> +        switch (delivery) {
>> >>             case DVBFE_DELSYS_DVBS:
>> >>                 info("----------------------------------> Using '%s'
>> >> DVB-S\n", fe_info.name);
>> >>                 break;
>> >> @@ -1701,7 +1704,7 @@
>> >>                 info("----------------------------------> Using '%s'
>> >> DVB-S2\n", fe_info.name);
>> >>                 break;
>> >>             default:
>> >> -                info("Unsupported Delivery system (%d)!\n",
>> >> fe_info1.delivery);
>> >> +                info("Unsupported Delivery system (%d)!\n", delivery);
>> >>                 t->last_tuning_failed = 1;
>> >>                 return -1;
>> >>         }
>> >>
>> >>
>> >>
>> >> 2008/6/6 Zeno Zoli <zeno.zoli@xxxxxxxxx>:
>> >> > I suppose so
>> >> >
>> >> > wget http://jusst.de/manu/scan.tar.bz2
>> >> > from
>> >> > http://www.linuxtv.org/wiki/index.php/TerraTec_Cinergy_S2_PCI_HD_CI
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > 2008/6/6 Goga777 <goga777@xxxxx>:
>> >> >>
>> >> >> which scan version do you use ? does it support the multiproto api ?
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> > I'm new to DVB on linux, but have some linux experience. I have
>> >> >> > trouble
>> >> >> > to
>> >> >> > get my new Terratec Cinergy S2 PCI HD to work properly. I have
>> >> >> > followed
>> >> >> > the
>> >> >> > guide here:
>> >> >> > http://linuxtv.org/wiki/index.php/TerraTec_Cinergy_S2_PCI_HD_CI
>> >> >> >
>> >> >> > I get "ioctl DVBFE_GET_INFO failed: Operation not supported"
>> >> >> > when I try to ./scan -vv dvb-s/Thor-1.0W ( more info below)
>> >> >> >
>> >> >> > Could it be related to my choice of Ubuntu 2.6.24-16-server?
>> >> >> > Thanks for your help.
>> >> >> >
>> >> >> > Zeno.
>> >> >> >
>> >> >> >
>> >> >> > uname -a
>> >> >> > Linux htpc 2.6.24-16-server #1 SMP i686 GNU/Linux
>> >> >> >
>> >> >> > /home/htpc/scan# ./scan -vv dvb-s/Thor-1.0W
>> >> >> > scanning dvb-s/Thor-1.0W
>> >> >> > using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
>> >> >> > initial transponder 11247000 V 24500000 24500000
>> >> >> > initial transponder 11293000 H 24500000 24500000
>> >> >> > initial transponder 11325000 H 24500000 24500000
>> >> >> > initial transponder 12054000 H 28000000 28000000
>> >> >> > initial transponder 12169000 H 28000000 28000000
>> >> >> > initial transponder 12226000 V 28000000 28000000
>> >> >> > ioctl DVBFE_GET_INFO failed: Operation not supported
>> >> >> > ioctl DVBFE_GET_INFO failed: Operation not supported
>> >> >> > ioctl DVBFE_GET_INFO failed: Operation not supported
>> >> >> > ioctl DVBFE_GET_INFO failed: Operation not supported
>> >> >> > ioctl DVBFE_GET_INFO failed: Operation not supported
>> >> >> > ioctl DVBFE_GET_INFO failed: Operation not supported
>> >> >> > ERROR: initial tuning failed
>> >> >> > dumping lists (0 services)
>> >> >> >
>> >> >> > lsmod
>> >> >> >
>> >> >> > lnbp21                  3200  1 mantis
>> >> >> > mb86a16                21632  1 mantis
>> >> >> > stb6100                 8836  1 mantis
>> >> >> > tda10021                7684  1 mantis
>> >> >> > tda10023                7300  1 mantis
>> >> >> > stb0899                36224  1 mantis
>> >> >> > stv0299                11528  1 mantis
>> >> >> > dvb_core               89212  2 mantis,stv0299
>> >> >> >
>> >> >> >
>> >> >> > dmesg
>> >> >> >
>> >> >> >  36.793511] found a VP-1041 PCI DSS/DVB-S/DVB-S2 device on
>> >> >> > (02:09.0),
>> >> >> > [   36.793513]     Mantis Rev 1 [153b:1179], irq: 20, latency: 64
>> >> >> > [   36.793515]     memory: 0xfddff000, mmio: 0xf8a54000
>> >> >> > [   36.796981]     MAC Address=[00:08:ca:1c:a8:e9]
>> >> >> > [   36.797011] mantis_alloc_buffers (0): DMA=0x37560000
>> >> >> > cpu=0xf7560000
>> >> >> > size=65536
>> >> >> > [   36.797061] mantis_alloc_buffers (0): RISC=0x37501000
>> >> >> > cpu=0xf7501000
>> >> >> > size=1000
>> >> >> > [   36.797107] DVB: registering new adapter (Mantis dvb adapter)
>> >> >> > [   37.345712] stb0899_get_dev_id: Device ID=[8], Release=[2]
>> >> >> > [   37.358369] stb0899_get_dev_id: Demodulator Core ID=[DMD1],
>> >> >> > Version=[1]
>> >> >> > [   37.371023] stb0899_get_dev_id: FEC Core ID=[FEC1], Version=[1]
>> >> >> > [   37.371074] stb0899_attach: Attaching STB0899
>> >> >> > [   37.371076] mantis_frontend_init (0): found STB0899
>> >> >> > DVB-S/DVB-S2
>> >> >> > frontend
>> >> >> > @0x68
>> >> >> > [   37.371135] stb6100_attach: Attaching STB6100
>> >> >> > [   37.371491] DVB: registering frontend 0 (STB0899
>> >> >> > Multistandard)...
>> >> >> > [   37.371523] mantis_ca_init (0): Registering EN50221 device
>> >> >> > [   37.372914] mantis_ca_init (0): Registered EN50221 device
>> >> >> > [   37.372973] mantis_hif_init (0): Adapter(0) Initializing Mantis
>> >> >> > Host
>> >> >> > Interface
>> >> >> >
>> >> >> > lspci -v
>> >> >> > 02:09.0 Multimedia controller: Twinhan Technology Co. Ltd Mantis
>> >> >> > DTV
>> >> >> > PCI
>> >> >> > Bridge Controller [Ver 1.0] (rev 01)
>> >> >> >         Subsystem: TERRATEC Electronic GmbH Unknown device 1179
>> >> >> >         Flags: bus master, medium devsel, latency 64, IRQ 20
>> >> >> >         Memory at fddff000 (32-bit, prefetchable) [size=4K]
>> >> >>
>> >> >> >
>> >> >>
>> >> >> _______________________________________________
>> >> >> linux-dvb mailing list
>> >> >> linux-dvb@xxxxxxxxxxx
>> >> >> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > linux-dvb mailing list
>> >> > linux-dvb@xxxxxxxxxxx
>> >> > http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>> >> >
>> >
>> >
>
>
From: Anssi Hannula <anssi.hannula@xxxxxxxxx>

multiproto: add support for using multiproto drivers with old api

Allow using multiproto drivers with the old API. Multiproto drivers
will provide one frontend type over the old API. For STB0899 this is
FE_QPSK. olddrv_to_newapi() and newapi_to_olddrv() are renamed to
oldapi_to_newapi() and newapi_to_oldapi(), respectively.

Signed-off-by: Anssi Hannula <anssi.hannula@xxxxxxxxx>

---

diff -r 6fdfb2b22241 -r 5dc544760be6 linux/drivers/media/dvb/dvb-core/dvb_frontend.c
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c	Fri May 23 17:17:02 2008 +0300
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c	Fri May 23 17:25:59 2008 +0300
@@ -354,7 +354,7 @@
 	return 0;
 }
 
-int newapi_to_olddrv(struct dvbfe_params *params,
+int newapi_to_oldapi(struct dvbfe_params *params,
 		     struct dvb_frontend_parameters *p,
 		     enum dvbfe_delsys delsys)
 {
@@ -466,7 +466,7 @@
 	return 0;
 }
 
-int olddrv_to_newapi(struct dvb_frontend *fe,
+int oldapi_to_newapi(struct dvb_frontend *fe,
 		     struct dvbfe_params *params,
 		     struct dvb_frontend_parameters *p,
 		     enum fe_type fe_type)
@@ -1649,6 +1649,9 @@
 		memset(&fetunesettings, 0, sizeof(struct dvb_frontend_tune_settings));
 		memcpy(&fetunesettings.parameters, parg, sizeof (struct dvb_frontend_parameters));
 
+		/* Request the search algorithm to search */
+		fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
+
 		/* force auto frequency inversion if requested */
 		if (dvb_force_auto_inversion) {
 			fepriv->parameters.inversion = INVERSION_AUTO;
@@ -1697,6 +1700,27 @@
 		if (dvb_override_tune_delay > 0)
 			fepriv->min_delay = (dvb_override_tune_delay * HZ) / 1000;
 
+		if (oldapi_to_newapi(fe, &fepriv->fe_params, &fepriv->parameters, fe->ops.info.type) == -EINVAL)
+			printk("%s: ERROR !!! Converting Old parameters --> New parameters\n", __func__);
+
+		/* set delivery system to the default old-API one */
+		if (fe->ops.set_delsys) {
+			switch(fe->ops.info.type) {
+			case FE_QPSK:
+				fe->ops.set_delsys(fe, DVBFE_DELSYS_DVBS);
+				fe->ops.set_delsys(fe, DVBFE_DELSYS_DVBS);
+			case FE_QAM:
+				fe->ops.set_delsys(fe, DVBFE_DELSYS_DVBC);
+				break;
+			case FE_OFDM:
+				fe->ops.set_delsys(fe, DVBFE_DELSYS_DVBT);
+				break;
+			case FE_ATSC:
+				fe->ops.set_delsys(fe, DVBFE_DELSYS_ATSC);
+				break;
+			}
+		}
+
 		fepriv->state = FESTATE_RETUNE;
 		dvb_frontend_wakeup(fe);
 		dvb_frontend_add_event(fe, 0);
@@ -1720,6 +1744,13 @@
 		if (fe->ops.get_frontend) {
 			memcpy (parg, &fepriv->parameters, sizeof (struct dvb_frontend_parameters));
 			err = fe->ops.get_frontend(fe, (struct dvb_frontend_parameters*) parg);
+		} else if (fe->ops.get_params) {
+			err = fe->ops.get_params(fe, &fepriv->fe_params);
+			if (!err) {
+				if (newapi_to_oldapi(&fepriv->fe_params, &fepriv->parameters, fepriv->delsys)  == -EINVAL)
+					printk("%s: ERROR !!! Converting New parameters --> Old parameters\n", __func__);
+				memcpy(parg, &fepriv->parameters, sizeof (struct dvb_frontend_parameters));
+			}
 		}
 		break;
 
@@ -1751,7 +1782,7 @@
 		    (delsys & DVBFE_DELSYS_DVBT) ||
 		    (delsys & DVBFE_DELSYS_ATSC)) {
 
-			if (newapi_to_olddrv(&fepriv->fe_params, &fepriv->parameters, fepriv->delsys)  == -EINVAL)
+			if (newapi_to_oldapi(&fepriv->fe_params, &fepriv->parameters, fepriv->delsys)  == -EINVAL)
 				printk("%s: ERROR !!! Converting New parameters --> Old parameters\n", __func__);
 		}
 		/* Request the search algorithm to search	*/
@@ -1841,7 +1872,7 @@
 		} else if (fe->ops.get_frontend) {
 			err = fe->ops.get_frontend(fe, &fepriv->parameters);
 			if (!err) {
-				if (olddrv_to_newapi(fe, &fepriv->fe_params, &fepriv->parameters, fe->ops.info.type) == -EINVAL)
+				if (oldapi_to_newapi(fe, &fepriv->fe_params, &fepriv->parameters, fe->ops.info.type) == -EINVAL)
 					printk("%s: ERROR !!! Converting Old parameters --> New parameters\n", __func__);
 				memcpy(parg, &fepriv->fe_params, sizeof (struct dvbfe_params));
 			}
diff -r 6fdfb2b22241 -r 5dc544760be6 linux/drivers/media/dvb/frontends/stb0899_drv.c
--- a/linux/drivers/media/dvb/frontends/stb0899_drv.c	Fri May 23 17:17:02 2008 +0300
+++ b/linux/drivers/media/dvb/frontends/stb0899_drv.c	Fri May 23 17:25:59 2008 +0300
@@ -2036,6 +2036,7 @@
 
 	.info = {
 		.name			= "STB0899 Multistandard",
+		.type			= FE_QPSK, /* with old API */
 	},
 
 	.release			= stb0899_release,
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux