Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecfcfec8 authored by Igor M. Liplianin's avatar Igor M. Liplianin Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (12463): Add support for Compro VideoMate S350 DVB-S PCI card.



Add Compro VideoMate S350 DVB-S driver.
The card uses zl10313, zl10039, saa7130 integrated circuits.

Signed-off-by: default avatarIgor M. Liplianin <liplianin@me.by>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d0a1ddad
Loading
Loading
Loading
Loading
+48 −0
Original line number Original line Diff line number Diff line
@@ -2828,3 +2828,51 @@ IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE] = {
	[0x13] = KEY_CAMERA,
	[0x13] = KEY_CAMERA,
};
};
EXPORT_SYMBOL_GPL(ir_codes_evga_indtube);
EXPORT_SYMBOL_GPL(ir_codes_evga_indtube);

IR_KEYTAB_TYPE ir_codes_videomate_s350[IR_KEYTAB_SIZE] = {
	[0x00] = KEY_TV,
	[0x01] = KEY_DVD,
	[0x04] = KEY_RECORD,
	[0x05] = KEY_VIDEO, /* TV/Video */
	[0x07] = KEY_STOP,
	[0x08] = KEY_PLAYPAUSE,
	[0x0a] = KEY_REWIND,
	[0x0f] = KEY_FASTFORWARD,
	[0x10] = KEY_CHANNELUP,
	[0x12] = KEY_VOLUMEUP,
	[0x13] = KEY_CHANNELDOWN,
	[0x14] = KEY_MUTE,
	[0x15] = KEY_VOLUMEDOWN,
	[0x16] = KEY_1,
	[0x17] = KEY_2,
	[0x18] = KEY_3,
	[0x19] = KEY_4,
	[0x1a] = KEY_5,
	[0x1b] = KEY_6,
	[0x1c] = KEY_7,
	[0x1d] = KEY_8,
	[0x1e] = KEY_9,
	[0x1f] = KEY_0,
	[0x21] = KEY_SLEEP,
	[0x24] = KEY_ZOOM,
	[0x25] = KEY_LAST,    /* Recall */
	[0x26] = KEY_SUBTITLE, /* CC */
	[0x27] = KEY_LANGUAGE, /* MTS */
	[0x29] = KEY_CHANNEL, /* SURF */
	[0x2b] = KEY_A,
	[0x2c] = KEY_B,
	[0x2f] = KEY_SHUFFLE, /* Snapshot */
	[0x23] = KEY_RADIO,
	[0x02] = KEY_PREVIOUSSONG,
	[0x06] = KEY_NEXTSONG,
	[0x03] = KEY_EPG,
	[0x09] = KEY_SETUP,
	[0x22] = KEY_BACKSPACE,
	[0x0c] = KEY_UP,
	[0x0e] = KEY_DOWN,
	[0x0b] = KEY_LEFT,
	[0x0d] = KEY_RIGHT,
	[0x11] = KEY_ENTER,
	[0x20] = KEY_TEXT,
};
EXPORT_SYMBOL_GPL(ir_codes_videomate_s350);
+1 −0
Original line number Original line Diff line number Diff line
@@ -47,6 +47,7 @@ config VIDEO_SAA7134_DVB
	select DVB_TDA10048 if !DVB_FE_CUSTOMISE
	select DVB_TDA10048 if !DVB_FE_CUSTOMISE
	select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMISE
	select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMISE
	select MEDIA_TUNER_TDA8290 if !MEDIA_TUNER_CUSTOMISE
	select MEDIA_TUNER_TDA8290 if !MEDIA_TUNER_CUSTOMISE
	select DVB_ZL10039 if !DVB_FE_CUSTOMISE
	---help---
	---help---
	  This adds support for DVB cards based on the
	  This adds support for DVB cards based on the
	  Philips saa7134 chip.
	  Philips saa7134 chip.
+30 −1
Original line number Original line Diff line number Diff line
@@ -5116,6 +5116,25 @@ struct saa7134_board saa7134_boards[] = {
			.gpio = 0x00,
			.gpio = 0x00,
		},
		},
	},
	},
	[SAA7134_BOARD_VIDEOMATE_S350] = {
		/* Jan D. Louw <jd.louw@mweb.co.za */
		.name		= "Compro VideoMate S350/S300",
		.audio_clock	= 0x00187de7,
		.tuner_type	= TUNER_ABSENT,
		.radio_type	= UNSET,
		.tuner_addr	= ADDR_UNSET,
		.radio_addr	= ADDR_UNSET,
		.mpeg		= SAA7134_MPEG_DVB,
		.inputs = { {
			.name	= name_comp1,
			.vmux	= 0,
			.amux	= LINE1,
		}, {
			.name	= name_svideo,
			.vmux	= 8, /* Not tested */
			.amux	= LINE1
		} },
	},
};
};


const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -6223,7 +6242,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
		.subvendor    = 0x1461, /* Avermedia Technologies Inc */
		.subvendor    = 0x1461, /* Avermedia Technologies Inc */
		.subdevice    = 0xf31d,
		.subdevice    = 0xf31d,
		.driver_data  = SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS,
		.driver_data  = SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS,

	}, {
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
		.subvendor    = 0x185b,
		.subdevice    = 0xc900,
		.driver_data  = SAA7134_BOARD_VIDEOMATE_S350,
	}, {
	}, {
		/* --- boards without eeprom + subsystem ID --- */
		/* --- boards without eeprom + subsystem ID --- */
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.vendor       = PCI_VENDOR_ID_PHILIPS,
@@ -6673,6 +6697,11 @@ int saa7134_board_init1(struct saa7134_dev *dev)
		saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x80040100, 0x80040100);
		saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x80040100, 0x80040100);
		saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100);
		saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100);
		break;
		break;
	case SAA7134_BOARD_VIDEOMATE_S350:
		dev->has_remote = SAA7134_REMOTE_GPIO;
		saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x00008000, 0x00008000);
		saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000);
		break;
	}
	}
	return 0;
	return 0;
}
}
+15 −0
Original line number Original line Diff line number Diff line
@@ -56,6 +56,7 @@
#include "zl10353.h"
#include "zl10353.h"


#include "zl10036.h"
#include "zl10036.h"
#include "zl10039.h"
#include "mt312.h"
#include "mt312.h"


MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
@@ -968,6 +969,10 @@ static struct zl10036_config avertv_a700_tuner = {
	.tuner_address = 0x60,
	.tuner_address = 0x60,
};
};


static struct mt312_config zl10313_compro_s350_config = {
	.demod_address = 0x0e,
};

static struct lgdt3305_config hcw_lgdt3305_config = {
static struct lgdt3305_config hcw_lgdt3305_config = {
	.i2c_addr           = 0x0e,
	.i2c_addr           = 0x0e,
	.mpeg_mode          = LGDT3305_MPEG_SERIAL,
	.mpeg_mode          = LGDT3305_MPEG_SERIAL,
@@ -1472,6 +1477,16 @@ static int dvb_init(struct saa7134_dev *dev)
					__func__);
					__func__);
			}
			}
		}
		}
		break;
	case SAA7134_BOARD_VIDEOMATE_S350:
		fe0->dvb.frontend = dvb_attach(mt312_attach,
				&zl10313_compro_s350_config, &dev->i2c_adap);
		if (fe0->dvb.frontend)
			if (dvb_attach(zl10039_attach, fe0->dvb.frontend,
					0x60, &dev->i2c_adap) == NULL)
				wprintk("%s: No zl10039 found!\n",
					__func__);

		break;
		break;
	default:
	default:
		wprintk("Huh? unknown DVB card?\n");
		wprintk("Huh? unknown DVB card?\n");
+5 −0
Original line number Original line Diff line number Diff line
@@ -605,6 +605,11 @@ int saa7134_input_init1(struct saa7134_dev *dev)
		mask_keycode = 0x7f;
		mask_keycode = 0x7f;
		polling = 40; /* ms */
		polling = 40; /* ms */
		break;
		break;
	case SAA7134_BOARD_VIDEOMATE_S350:
		ir_codes     = ir_codes_videomate_s350;
		mask_keycode = 0x003f00;
		mask_keydown = 0x040000;
		break;
	}
	}
	if (NULL == ir_codes) {
	if (NULL == ir_codes) {
		printk("%s: Oops: IR config error [card=%d]\n",
		printk("%s: Oops: IR config error [card=%d]\n",
Loading