From: Marc Schneider Date: Fri, 27 Mar 2009 00:07:18 +0000 (-0300) Subject: V4L/DVB (11338): af9015: add support for TrekStor DVB-T USB Stick X-Git-Tag: v2.6.30-rc1~136^2~101 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=261448405eb578972244ae406a2d785bc095f193;p=platform%2Fupstream%2Fkernel-adaptation-pc.git V4L/DVB (11338): af9015: add support for TrekStor DVB-T USB Stick Add USB ID (15a4:901b) and remote for TrekStor DVB-T USB Stick. Signed-off-by: Marc Schneider Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 1086f30..1496746 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c @@ -833,6 +833,16 @@ static int af9015_read_config(struct usb_device *udev) af9015_ir_table_msi; af9015_config.ir_table_size = ARRAY_SIZE(af9015_ir_table_msi); + } else if (udev->descriptor.idProduct == + cpu_to_le16(USB_PID_TREKSTOR_DVBT)) { + af9015_properties[i].rc_key_map = + af9015_rc_keys_trekstor; + af9015_properties[i].rc_key_map_size = + ARRAY_SIZE(af9015_rc_keys_trekstor); + af9015_config.ir_table = + af9015_ir_table_trekstor; + af9015_config.ir_table_size = + ARRAY_SIZE(af9015_ir_table_trekstor); } break; case USB_VID_AVERMEDIA: @@ -1238,6 +1248,7 @@ static struct usb_device_id af9015_usb_table[] = { {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U)}, {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_2)}, {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_3)}, + {USB_DEVICE(USB_VID_AFATECH, USB_PID_TREKSTOR_DVBT)}, {0}, }; MODULE_DEVICE_TABLE(usb, af9015_usb_table); @@ -1402,7 +1413,7 @@ static struct dvb_usb_device_properties af9015_properties[] = { .i2c_algo = &af9015_i2c_algo, - .num_device_descs = 7, + .num_device_descs = 8, .devices = { { .name = "Xtensions XD-380", @@ -1442,6 +1453,11 @@ static struct dvb_usb_device_properties af9015_properties[] = { &af9015_usb_table[18], NULL}, .warm_ids = {NULL}, }, + { + .name = "TrekStor DVB-T USB Stick", + .cold_ids = {&af9015_usb_table[19], NULL}, + .warm_ids = {NULL}, + }, } } }; diff --git a/drivers/media/dvb/dvb-usb/af9015.h b/drivers/media/dvb/dvb-usb/af9015.h index 00e2571..5c44bad 100644 --- a/drivers/media/dvb/dvb-usb/af9015.h +++ b/drivers/media/dvb/dvb-usb/af9015.h @@ -120,11 +120,11 @@ struct af9015_config { enum af9015_remote { AF9015_REMOTE_NONE = 0, - AF9015_REMOTE_A_LINK_DTU_M, +/* 1 */ AF9015_REMOTE_A_LINK_DTU_M, AF9015_REMOTE_MSI_DIGIVOX_MINI_II_V3, AF9015_REMOTE_MYGICTV_U718, AF9015_REMOTE_DIGITTRADE_DVB_T, - AF9015_REMOTE_AVERMEDIA_KS, +/* 5 */ AF9015_REMOTE_AVERMEDIA_KS, }; /* Leadtek WinFast DTV Dongle Gold */ @@ -691,4 +691,67 @@ static u8 af9015_ir_table_digittrade[] = { 0x00, 0xff, 0x1d, 0xe2, 0x40, 0x00, 0x00, }; +/* TREKSTOR DVB-T USB Stick */ +static struct dvb_usb_rc_key af9015_rc_keys_trekstor[] = { + { 0x07, 0x04, KEY_AGAIN }, /* Home */ + { 0x07, 0x05, KEY_MUTE }, /* Mute */ + { 0x07, 0x06, KEY_UP }, /* Up */ + { 0x07, 0x07, KEY_DOWN }, /* Down */ + { 0x07, 0x09, KEY_RIGHT }, /* Right */ + { 0x07, 0x0a, KEY_ENTER }, /* OK */ + { 0x07, 0x0b, KEY_FASTFORWARD }, /* Fast forward */ + { 0x07, 0x0c, KEY_REWIND }, /* Rewind */ + { 0x07, 0x0d, KEY_PLAY }, /* Play/Pause */ + { 0x07, 0x0e, KEY_VOLUMEUP }, /* Volume + */ + { 0x07, 0x0f, KEY_VOLUMEDOWN }, /* Volume - */ + { 0x07, 0x10, KEY_RECORD }, /* Record */ + { 0x07, 0x11, KEY_STOP }, /* Stop */ + { 0x07, 0x12, KEY_ZOOM }, /* TV */ + { 0x07, 0x13, KEY_EPG }, /* Info/EPG */ + { 0x07, 0x14, KEY_CHANNELDOWN }, /* Channel - */ + { 0x07, 0x15, KEY_CHANNELUP }, /* Channel + */ + { 0x07, 0x1e, KEY_1 }, + { 0x07, 0x1f, KEY_2 }, + { 0x07, 0x20, KEY_3 }, + { 0x07, 0x21, KEY_4 }, + { 0x07, 0x22, KEY_5 }, + { 0x07, 0x23, KEY_6 }, + { 0x07, 0x24, KEY_7 }, + { 0x07, 0x25, KEY_8 }, + { 0x07, 0x26, KEY_9 }, + { 0x07, 0x08, KEY_LEFT }, /* LEFT */ + { 0x07, 0x27, KEY_0 }, +}; + +static u8 af9015_ir_table_trekstor[] = { + 0x00, 0xff, 0x86, 0x79, 0x04, 0x07, 0x00, + 0x00, 0xff, 0x85, 0x7a, 0x05, 0x07, 0x00, + 0x00, 0xff, 0x87, 0x78, 0x06, 0x07, 0x00, + 0x00, 0xff, 0x8c, 0x73, 0x07, 0x07, 0x00, + 0x00, 0xff, 0x89, 0x76, 0x09, 0x07, 0x00, + 0x00, 0xff, 0x88, 0x77, 0x0a, 0x07, 0x00, + 0x00, 0xff, 0x8a, 0x75, 0x0b, 0x07, 0x00, + 0x00, 0xff, 0x9e, 0x61, 0x0c, 0x07, 0x00, + 0x00, 0xff, 0x8d, 0x72, 0x0d, 0x07, 0x00, + 0x00, 0xff, 0x8b, 0x74, 0x0e, 0x07, 0x00, + 0x00, 0xff, 0x9b, 0x64, 0x0f, 0x07, 0x00, + 0x00, 0xff, 0x9d, 0x62, 0x10, 0x07, 0x00, + 0x00, 0xff, 0x8e, 0x71, 0x11, 0x07, 0x00, + 0x00, 0xff, 0x9c, 0x63, 0x12, 0x07, 0x00, + 0x00, 0xff, 0x8f, 0x70, 0x13, 0x07, 0x00, + 0x00, 0xff, 0x93, 0x6c, 0x14, 0x07, 0x00, + 0x00, 0xff, 0x97, 0x68, 0x15, 0x07, 0x00, + 0x00, 0xff, 0x92, 0x6d, 0x1e, 0x07, 0x00, + 0x00, 0xff, 0x96, 0x69, 0x1f, 0x07, 0x00, + 0x00, 0xff, 0x9a, 0x65, 0x20, 0x07, 0x00, + 0x00, 0xff, 0x91, 0x6e, 0x21, 0x07, 0x00, + 0x00, 0xff, 0x95, 0x6a, 0x22, 0x07, 0x00, + 0x00, 0xff, 0x99, 0x66, 0x23, 0x07, 0x00, + 0x00, 0xff, 0x90, 0x6f, 0x24, 0x07, 0x00, + 0x00, 0xff, 0x94, 0x6b, 0x25, 0x07, 0x00, + 0x00, 0xff, 0x98, 0x67, 0x26, 0x07, 0x00, + 0x00, 0xff, 0x9f, 0x60, 0x08, 0x07, 0x00, + 0x00, 0xff, 0x84, 0x7b, 0x27, 0x07, 0x00, +}; + #endif diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index 75dc4b7..4870ed6 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h @@ -65,6 +65,7 @@ #define USB_PID_AFATECH_AF9005 0x9020 #define USB_PID_AFATECH_AF9015_9015 0x9015 #define USB_PID_AFATECH_AF9015_9016 0x9016 +#define USB_PID_TREKSTOR_DVBT 0x901b #define USB_VID_ALINK_DTU 0xf170 #define USB_PID_ANSONIC_DVBT_USB 0x6000 #define USB_PID_ANYSEE 0x861f