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

Commit e2a1774d authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (6488): ivtv: add ASUS Falcon2 support

parent 05e99719
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ config VIDEO_IVTV
	select VIDEO_SAA7127
	select VIDEO_TVAUDIO
	select VIDEO_CS53L32A
	select VIDEO_M52790
	select VIDEO_WM8775
	select VIDEO_WM8739
	select VIDEO_VP27SMPX
+40 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include "ivtv-i2c.h"

#include <media/msp3400.h>
#include <media/m52790.h>
#include <media/wm8775.h>
#include <media/cs53l32a.h>
#include <media/cx25840.h>
@@ -915,6 +916,44 @@ static const struct ivtv_card ivtv_card_avertv_mce116 = {
	.pci_list = ivtv_pci_avertv_mce116,
};

/* ------------------------------------------------------------------------- */

/* ASUS Falcon2 */

static const struct ivtv_card_pci_info ivtv_pci_asus_falcon2[] = {
	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b66 },
	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x462e },
	{ PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ASUSTEK, 0x4b2e },
	{ 0, 0, 0 }
};

static const struct ivtv_card ivtv_card_asus_falcon2 = {
	.type = IVTV_CARD_ASUS_FALCON2,
	.name = "ASUS Falcon2",
	.v4l2_capabilities = IVTV_CAP_ENCODER,
	.hw_video = IVTV_HW_CX25840,
	.hw_audio = IVTV_HW_CX25840,
	.hw_audio_ctrl = IVTV_HW_CX25840,
	.hw_muxer = IVTV_HW_M52790,
	.hw_all = IVTV_HW_CX25840 | IVTV_HW_M52790 | IVTV_HW_TUNER,
	.video_inputs = {
		{ IVTV_CARD_INPUT_VID_TUNER,  0, CX25840_COMPOSITE2 },
		{ IVTV_CARD_INPUT_SVIDEO1,    1, CX25840_SVIDEO3    },
		{ IVTV_CARD_INPUT_COMPOSITE1, 2, CX25840_COMPOSITE2 },
	},
	.audio_inputs = {
		{ IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO5, M52790_IN_TUNER },
		{ IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL,
			M52790_IN_V2 | M52790_SW1_YCMIX | M52790_SW2_YCMIX },
		{ IVTV_CARD_INPUT_LINE_IN1, CX25840_AUDIO_SERIAL, M52790_IN_V2 },
	},
	.radio_input = { IVTV_CARD_INPUT_AUD_TUNER, CX25840_AUDIO_SERIAL, M52790_IN_TUNER },
	.tuners = {
		{ .std = V4L2_STD_525_60, .tuner = TUNER_PHILIPS_FM1236_MK3 },
	},
	.pci_list = ivtv_pci_asus_falcon2,
};

static const struct ivtv_card *ivtv_card_list[] = {
	&ivtv_card_pvr250,
	&ivtv_card_pvr350,
@@ -937,6 +976,7 @@ static const struct ivtv_card *ivtv_card_list[] = {
	&ivtv_card_pg600v2,
	&ivtv_card_club3d,
	&ivtv_card_avertv_mce116,
	&ivtv_card_asus_falcon2,

	/* Variations of standard cards but with the same PCI IDs.
	   These cards must come last in this list. */
+5 −2
Original line number Diff line number Diff line
@@ -45,7 +45,8 @@
#define IVTV_CARD_PG600V2	     18 /* Yuan PG600V2/GotView PCI DVD Lite */
#define IVTV_CARD_CLUB3D	     19 /* Club3D ZAP-TV1x01 */
#define IVTV_CARD_AVERTV_MCE116	     20 /* AVerTV MCE 116 Plus */
#define IVTV_CARD_LAST 		     20
#define IVTV_CARD_ASUS_FALCON2	     21 /* ASUS Falcon2 */
#define IVTV_CARD_LAST 		     21

/* Variants of existing cards but with the same PCI IDs. The driver
   detects these based on other device information.
@@ -69,6 +70,7 @@
#define IVTV_PCI_ID_HAUPPAUGE_ALT1 	0x0270
#define IVTV_PCI_ID_HAUPPAUGE_ALT2 	0x4070
#define IVTV_PCI_ID_ADAPTEC 		0x9005
#define IVTV_PCI_ID_ASUSTEK 		0x1043
#define IVTV_PCI_ID_AVERMEDIA 		0x1461
#define IVTV_PCI_ID_YUAN1		0x12ab
#define IVTV_PCI_ID_YUAN2 		0xff01
@@ -96,7 +98,8 @@
#define IVTV_HW_SAA717X   (1 << 12)
#define IVTV_HW_WM8739    (1 << 13)
#define IVTV_HW_VP27SMPX  (1 << 14)
#define IVTV_HW_GPIO      (1 << 15)
#define IVTV_HW_M52790    (1 << 15)
#define IVTV_HW_GPIO      (1 << 16)

#define IVTV_HW_SAA711X   (IVTV_HW_SAA7115 | IVTV_HW_SAA7114)

+5 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ MODULE_PARM_DESC(cardtype,
		 "\t\t\t19 = Yuan PG600V2/GotView PCI DVD Lite\n"
		 "\t\t\t20 = Club3D ZAP-TV1x01\n"
		 "\t\t\t21 = AverTV MCE 116 Plus\n"
		 "\t\t\t22 = ASUS Falcon2\n"
		 "\t\t\t 0 = Autodetect (default)\n"
		 "\t\t\t-1 = Ignore this card\n\t\t");
MODULE_PARM_DESC(pal, "Set PAL standard: B, G, H, D, K, I, M, N, Nc, 60");
@@ -882,6 +883,10 @@ static void ivtv_load_and_init_modules(struct ivtv *itv)
	if (hw & IVTV_HW_CS53L32A)
		ivtv_request_module(itv, "cs53l32a");
#endif
#ifndef CONFIG_VIDEO_M52790
	if (hw & IVTV_HW_M52790)
		ivtv_request_module(itv, "m52790");
#endif

	/* check which i2c devices are actually found */
	for (i = 0; i < 32; i++) {
+3 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@
#endif /* I2C_ADAP_CLASS_TV_ANALOG */

#define IVTV_CS53L32A_I2C_ADDR		0x11
#define IVTV_M52790_I2C_ADDR		0x48
#define IVTV_CX25840_I2C_ADDR 		0x44
#define IVTV_SAA7115_I2C_ADDR 		0x21
#define IVTV_SAA7127_I2C_ADDR 		0x44
@@ -110,6 +111,7 @@ static const u8 hw_driverids[] = {
	I2C_DRIVERID_SAA717X,
	I2C_DRIVERID_WM8739,
	I2C_DRIVERID_VP27SMPX,
	I2C_DRIVERID_M52790,
	0 		/* IVTV_HW_GPIO dummy driver ID */
};

@@ -130,6 +132,7 @@ static const char * const hw_drivernames[] = {
	"saa717x",
	"wm8739",
	"vp27smpx",
	"m52790",
	"gpio",
};

Loading