Fwd: Re: patch for lifeview hybrid mini

2010-08-24 Thread tomlohave



 Message original 
Sujet:  Re: patch for lifeview hybrid mini
Date :  Tue, 24 Aug 2010 08:35:39 +0200
De :tomloh...@gmail.com tomloh...@gmail.com
Pour : 	hermann pitton hermann-pit...@arcor.de, jpnew...@free.fr, 
linux-...@linuxtv.org




Le 24/08/2010 01:49, hermann pitton a écrit :

 Hello Thomas,



Hi hermann

 the assumption is good then.

 Latest revisions of the Lifeview cards do switch to radio mode with
 gpio21 high and let it low for TV. (it was the other way round
 previously)

 I was just wondering, if it might have radio support at all, since
 gpio21 is not set in the m$ gpio mask and you say it does not come with
 radio software.

 The gpio18 and 16 can trigger IRQs and are usually in use on such
 remotes for the button up/down signal and related IRQ sampling.

 All saa7133/35/31e with tda8275ac and radio IF support use a special
 7.5MHz ceramic filter, usually a huge well visible part in blue or
 orange color, but on latest designs they are hard to identify, since
 they might appear as SMD discrets now too.


it's hard to look because the card is covered by a metal plate
and we don't want to break it.

 The switch to this filter is often related to a an antenna connector RF
 input switch triggered by the same gpio, but not necessarily. All sort
 of combinations do exist.



good news :(

 Anyway, we demodulate the radio IF from such tuners on the
 saa7133/35/31e on the saa chip and do also the stereo separation and
 detection there. Hartmut added the needed code in saa7134-tvaudio and it
 is valid for all tuner=54.

 To achieve that, you need to use amux = TV for radio and likely also
 some gpio is involved for the RF routing.



Will look at this.
Many thanks.

 Cheers,
 Hermann






Best regards,

thomas



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: patch for lifeview hybrid mini

2010-08-23 Thread tomloh...@gmail.com

Le 17/08/2010 02:24, hermann pitton a écrit :

Hi,

Am Sonntag, den 15.08.2010, 07:20 +0200 schriebtomloh...@gmail.com:
   

Hi,

the proposed patch is 6 month old and the owner of the card does not
give any more sign of life for the support of the radio.
can someone review it and push it as is?

Cheers,

Signed-off-by: thomas gentytomloh...@gmail.com

 

Thomas, just some quick notes, since nobody else cares.

The m$ regspy gpio logs do show only gpio22 changing for analog and
DVB-T and this should be the out of reference AGC control on a hopefully
single hybrid tuner on that device called DUO.

Remember, gpios not set in the mask of the analog part of the device do
not change/switch anything, but those set there will change to zero even
without explicit gpio define for that specific analog input.

Out of historical reasons, we don't have this in our logs for DVB, also
else they would be littered by the changing gpios for the TS/MPEG
interface, but should be OK. We don't need to mark DVB related gpio
stuff in the analog gpio mask, since we need to use some sort of hack to
switch gpios on saa713x in DVB mode.

dvb and v4l still don't know much about what each other subsystem does
on that, but we have some progress.

So, for now, I don't know for what gpio21 high in analog TV mode should
be good, since the m$ driver seems not to do anything on that one, for
what we have so far. Also it is common on later LifeView stuff (arrgh),
but always is present in related logs then too.

If ever needed,

despite of that line inputs and muxes are also totally unconfirmed, and
radio is plain madness ...

drop the radio support for now, mark the external inputs as untested and
I give some reviewed by so far with headaches.

If we can't get more from here anymore, we must let it bounce.

Cheers,
Hermann



   


Hi Hermann,

thanks for you response

for gpios : there is no software bundled with this card to listen to the 
radio so there is maybe a gpio not showed

in regspy when trying to listen music. Is this a bad assumption?
anyway gpios 22 and 16 are hight in regspy
with gpiomask 410 000 :
dvb, analog tv and svideo work fine
only radio remains :
you can hear the results for radio here (2 Mo):
http://perso.orange.fr/tomlohave/linux/radio.test
we can clearly hear the sound of a song but it is broken and 
interrupted, the question is why

have you a suggestion ?

Cheers

T.G
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: patch for lifeview hybrid mini

2010-08-23 Thread hermann pitton

Am Montag, den 23.08.2010, 16:06 +0200 schrieb tomloh...@gmail.com:
 Le 17/08/2010 02:24, hermann pitton a écrit : 
  Hi,
  
  Am Sonntag, den 15.08.2010, 07:20 +0200 schrieb tomloh...@gmail.com:

   Hi,
   
   the proposed patch is 6 month old and the owner of the card does not 
   give any more sign of life for the support of the radio.
   can someone review it and push it as is?
   
   Cheers,
   
   Signed-off-by: thomas gentytomloh...@gmail.com
   
   
  Thomas, just some quick notes, since nobody else cares.
  
  The m$ regspy gpio logs do show only gpio22 changing for analog and
  DVB-T and this should be the out of reference AGC control on a hopefully
  single hybrid tuner on that device called DUO.
  
  Remember, gpios not set in the mask of the analog part of the device do
  not change/switch anything, but those set there will change to zero even
  without explicit gpio define for that specific analog input.
  
  Out of historical reasons, we don't have this in our logs for DVB, also
  else they would be littered by the changing gpios for the TS/MPEG
  interface, but should be OK. We don't need to mark DVB related gpio
  stuff in the analog gpio mask, since we need to use some sort of hack to
  switch gpios on saa713x in DVB mode.
  
  dvb and v4l still don't know much about what each other subsystem does
  on that, but we have some progress.
  
  So, for now, I don't know for what gpio21 high in analog TV mode should
  be good, since the m$ driver seems not to do anything on that one, for
  what we have so far. Also it is common on later LifeView stuff (arrgh),
  but always is present in related logs then too.
  
  If ever needed,
  
  despite of that line inputs and muxes are also totally unconfirmed, and
  radio is plain madness ...
  
  drop the radio support for now, mark the external inputs as untested and
  I give some reviewed by so far with headaches.
  
  If we can't get more from here anymore, we must let it bounce.
  
  Cheers,
  Hermann
  
  
  

 
 Hi Hermann,
 
 thanks for you response
 
 for gpios : there is no software bundled with this card to listen to
 the radio so there is maybe a gpio not showed 
 in regspy when trying to listen music. Is this a bad assumption?
 anyway gpios 22 and 16 are hight in regspy
 with gpiomask 410 000 :
 dvb, analog tv and svideo work fine
 only radio remains :
 you can hear the results for radio here (2 Mo): 
 http://perso.orange.fr/tomlohave/linux/radio.test
 we can clearly hear the sound of a song but it is broken and
 interrupted, the question is why
 have you a suggestion ?
 
 Cheers
 
 T.G

Hello Thomas,

the assumption is good then.

Latest revisions of the Lifeview cards do switch to radio mode with
gpio21 high and let it low for TV. (it was the other way round
previously)

I was just wondering, if it might have radio support at all, since
gpio21 is not set in the m$ gpio mask and you say it does not come with
radio software.

The gpio18 and 16 can trigger IRQs and are usually in use on such
remotes for the button up/down signal and related IRQ sampling.

All saa7133/35/31e with tda8275ac and radio IF support use a special
7.5MHz ceramic filter, usually a huge well visible part in blue or
orange color, but on latest designs they are hard to identify, since
they might appear as SMD discrets now too.

The switch to this filter is often related to a an antenna connector RF
input switch triggered by the same gpio, but not necessarily. All sort
of combinations do exist.

Anyway, we demodulate the radio IF from such tuners on the
saa7133/35/31e on the saa chip and do also the stereo separation and
detection there. Hartmut added the needed code in saa7134-tvaudio and it
is valid for all tuner=54.

To achieve that, you need to use amux = TV for radio and likely also
some gpio is involved for the RF routing.

Cheers,
Hermann


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: patch for lifeview hybrid mini

2010-08-16 Thread hermann pitton
Hi,

Am Sonntag, den 15.08.2010, 07:20 +0200 schrieb tomloh...@gmail.com:
 Hi,
 
 the proposed patch is 6 month old and the owner of the card does not 
 give any more sign of life for the support of the radio.
 can someone review it and push it as is?
 
 Cheers,
 
 Signed-off-by: thomas gentytomloh...@gmail.com
 

Thomas, just some quick notes, since nobody else cares.

The m$ regspy gpio logs do show only gpio22 changing for analog and
DVB-T and this should be the out of reference AGC control on a hopefully
single hybrid tuner on that device called DUO.

Remember, gpios not set in the mask of the analog part of the device do
not change/switch anything, but those set there will change to zero even
without explicit gpio define for that specific analog input.

Out of historical reasons, we don't have this in our logs for DVB, also
else they would be littered by the changing gpios for the TS/MPEG
interface, but should be OK. We don't need to mark DVB related gpio
stuff in the analog gpio mask, since we need to use some sort of hack to
switch gpios on saa713x in DVB mode.

dvb and v4l still don't know much about what each other subsystem does
on that, but we have some progress.

So, for now, I don't know for what gpio21 high in analog TV mode should
be good, since the m$ driver seems not to do anything on that one, for
what we have so far. Also it is common on later LifeView stuff (arrgh),
but always is present in related logs then too.

If ever needed,

despite of that line inputs and muxes are also totally unconfirmed, and
radio is plain madness ...

drop the radio support for now, mark the external inputs as untested and
I give some reviewed by so far with headaches.

If we can't get more from here anymore, we must let it bounce.

Cheers,
Hermann












--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


patch for lifeview hybrid mini

2010-08-14 Thread tomloh...@gmail.com

Hi,

the proposed patch is 6 month old and the owner of the card does not 
give any more sign of life for the support of the radio.

can someone review it and push it as is?

Cheers,

Signed-off-by: thomas gentytomloh...@gmail.com



diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 07f6bb8..d246e15 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -5462,6 +5462,37 @@ struct saa7134_board saa7134_boards[] = {
 			.amux = TV,
 		},
 	},
+	[SAA7134_BOARD_FLYDVBTDUO_MEDION] = {
+		/* Thomas Genty tomloh...@gmail.com */
+		.name   = LifeView FlyDVB-T DUO Mini,
+		.audio_clock= 0x00187de7,
+		.tuner_type = TUNER_PHILIPS_TDA8290,
+		.radio_type = UNSET,
+		.tuner_addr	= ADDR_UNSET,
+		.radio_addr	= ADDR_UNSET,
+		.gpiomask	= 0x0060,
+		.mpeg   = SAA7134_MPEG_DVB,
+		.inputs = {{
+			.name = name_tv,
+			.vmux = 1,
+			.amux = TV,
+			.gpio = 0x20,
+			.tv   = 1,
+		},{
+			.name = name_comp1,
+			.vmux = 3,
+			.amux = LINE1,
+		},{
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+			.gpio = 0x20,	/* No tested */
+		},
+	},
 
 };
 
@@ -6631,6 +6662,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
 		.subdevice= 0x6655,
 		.driver_data  = SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S,
 	}, {
+		.vendor   = PCI_VENDOR_ID_PHILIPS,
+		.device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+		.subvendor= 0x5168, 
+		.subdevice= 0x0307,  /* Lifeview flydvb-t hybrid mini, LR307-N */   
+		.driver_data  = SAA7134_BOARD_FLYDVBTDUO_MEDION,
+	}, {
 		/* --- boards without eeprom + subsystem ID --- */
 		.vendor   = PCI_VENDOR_ID_PHILIPS,
 		.device   = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -7383,6 +7420,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
 	case SAA7134_BOARD_AVERMEDIA_SUPER_007:
 	case SAA7134_BOARD_TWINHAN_DTV_DVB_3056:
 	case SAA7134_BOARD_CREATIX_CTX953:
+	case SAA7134_BOARD_FLYDVBTDUO_MEDION:
 	{
 		/* this is a hybrid board, initialize to analog mode
 		 * and configure firmware eeprom address
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 31e82be..2a2e3d8 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -824,6 +824,19 @@ static struct tda1004x_config asus_tiger_3in1_config = {
 	.request_firmware = philips_tda1004x_request_firmware
 };
 
+static struct tda1004x_config tda827x_flydvbtduo_medion_config = {
+	.demod_address = 0x08,
+	.invert= 1,
+	.invert_oclk   = 0,
+	.xtal_freq = TDA10046_XTAL_16M,
+	.agc_config= TDA10046_AGC_TDA827X,
+	.gpio_config   = TDA10046_GP01_I,
+	.if_freq   = TDA10046_FREQ_045,
+	.i2c_gate  = 0x4b,
+	.tuner_address = 0x61,
+	.request_firmware = philips_tda1004x_request_firmware
+};
+
 /* --
  * special case: this card uses saa713x GPIO22 for the mode switch
  */
@@ -1590,6 +1603,22 @@ static int dvb_init(struct saa7134_dev *dev)
    dtv1000s_tda18271_config);
 		}
 		break;
+	case SAA7134_BOARD_FLYDVBTDUO_MEDION:
+		/* this card uses saa713x GPIO22 for the mode switch */
+		fe0-dvb.frontend = dvb_attach(tda10046_attach,
+	   tda827x_flydvbtduo_medion_config,
+	   dev-i2c_adap);
+		if (fe0-dvb.frontend) {
+			if (dvb_attach(tda827x_attach,fe0-dvb.frontend,
+   tda827x_flydvbtduo_medion_config.tuner_address, dev-i2c_adap,
+ads_duo_cfg) == NULL) {
+wprintk(no tda827x tuner found at addr: %02x\n,
+	tda827x_flydvbtduo_medion_config.tuner_address);
+goto dettach_frontend;
+			}
+		} else
+			wprintk(failed to attach tda10046\n);
+		break;
 	default:
 		wprintk(Huh? unknown DVB card?\n);
 		break;
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 756a1ca..c1f213c 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -304,6 +304,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_BEHOLD_H7 178
 #define SAA7134_BOARD_BEHOLD_A7 179
 #define SAA7134_BOARD_AVERMEDIA_M733A   180
+#define SAA7134_BOARD_FLYDVBTDUO_MEDION 181
 
 #define SAA7134_MAXBOARDS 32
 #define SAA7134_INPUT_MAX 8