All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: "Márcio Araújo Alves" <froooozen@gmail.com>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: [RFC PATCH] cx231xx: Add support for Kworld UB430 AF
Date: Mon, 08 Nov 2010 13:59:08 -0200	[thread overview]
Message-ID: <4CD81E4C.8000106@redhat.com> (raw)

This device seems to be close to Pixelview design. Probably, the remote controller
is different.

Also, AGC selection doesn't seem to use any GPIO writing, at least from the logs
I got from Márcio.

Reported by: Márcio Araújo Alves <froooozen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

---

PS.: This patch is to be applied against staging/for_v2.6.38 branch at the main tree:
	http://git.linuxtv.org/media_tree.git?a=shortlog;h=refs/heads/staging/for_v2.6.38

Márcio,

Could you please test it? It would be wonderful if you could test the new IR support. You
should uncomment the code bellow (commented with #if 0), and, eventually, you'll need to
play with RC keymaps.

I'd appreciate if you could send me some parsed logs for both analog and digital
modes. I've improved the cx231xx-specific parser at v4l-apps, in order to catch GPIO
changes. So far, I didn't get any trial to change GPIO bits on your logs (nor on my logs with 
Pixelview).

When I have more time, I'll try to do more tests on it.

 drivers/media/dvb/dvb-usb/dvb-usb-ids.h     |    1 
 drivers/media/video/cx231xx/cx231xx-cards.c |   48 ++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

--- patchwork.orig/drivers/media/video/cx231xx/cx231xx-cards.c
+++ patchwork/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -435,6 +435,52 @@ struct cx231xx_board cx231xx_boards[] = 
 			.gpio = 0,
 		} },
 	},
+	[CX231XX_BOARD_KWORLD_U430_AF] = {
+		.name = "Kworld UB430-AF",
+		.tuner_type = TUNER_NXP_TDA18271,
+		.tuner_addr = 0x60,
+		.decoder = CX231XX_AVDECODER,
+		.output_mode = OUT_MODE_VIP11,
+		.demod_xfer_mode = 0,
+		.ctl_pin_status_mask = 0xFFFFFFC4,
+		.agc_analog_digital_select_gpio = 0xffff,
+		.tuner_sif_gpio = -1,
+		.tuner_scl_gpio = -1,
+		.tuner_sda_gpio = -1,
+		.gpio_pin_status_mask = 0x4001000,
+		.tuner_i2c_master = 2,
+		.demod_i2c_master = 1,
+#if 0
+		/*
+		 * FIXME: it is very likely that this device uses an I2C
+		 * remote controller. Not sure if it will use the same
+		 * i2c addr as Pixelview, or what's the keycode map.
+		 */
+		.ir_i2c_master = 2,
+		.rc_map = RC_MAP_KWORLD_315U,
+#endif
+		.has_dvb = 1,
+		.demod_addr = 0x10,
+		.norm = V4L2_STD_PAL_M,
+		.input = {{
+			.type = CX231XX_VMUX_TELEVISION,
+			.vmux = CX231XX_VIN_3_1,
+			.amux = CX231XX_AMUX_VIDEO,
+			.gpio = 0,
+		}, {
+			.type = CX231XX_VMUX_COMPOSITE1,
+			.vmux = CX231XX_VIN_2_1,
+			.amux = CX231XX_AMUX_LINE_IN,
+			.gpio = 0,
+		}, {
+			.type = CX231XX_VMUX_SVIDEO,
+			.vmux = CX231XX_VIN_1_1 |
+				(CX231XX_VIN_1_2 << 8) |
+				CX25840_SVIDEO_ON,
+			.amux = CX231XX_AMUX_LINE_IN,
+			.gpio = 0,
+		} },
+	},
 };
 const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards);
 
@@ -464,6 +510,8 @@ struct usb_device_id cx231xx_id_table[] 
 	 .driver_info = CX231XX_BOARD_HAUPPAUGE_USBLIVE2},
 	{USB_DEVICE_VER(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD, 0x4000, 0x4001),
 	 .driver_info = CX231XX_BOARD_PV_PLAYTV_USB_HYBRID},
+	{USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_UB430_AF),
+	 .driver_info = CX231XX_BOARD_KWORLD_U430_AF},
 	{},
 };
 
--- patchwork.orig/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ patchwork/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -130,6 +130,7 @@
 #define USB_PID_KWORLD_PC160_2T				0xc160
 #define USB_PID_KWORLD_PC160_T				0xc161
 #define USB_PID_KWORLD_UB383_T				0xe383
+#define USB_PID_KWORLD_UB430_AF				0xe424
 #define USB_PID_KWORLD_VSTREAM_COLD			0x17de
 #define USB_PID_KWORLD_VSTREAM_WARM			0x17df
 #define USB_PID_TERRATEC_CINERGY_T_USB_XE		0x0055

                 reply	other threads:[~2010-11-08 15:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CD81E4C.8000106@redhat.com \
    --to=mchehab@redhat.com \
    --cc=froooozen@gmail.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.