cx231xx: Initial support Evromedia USB Full Hybrid Full HD
PATCH 1/2 cx231xx: Initial support Evromedia USB Full Hybrid Full HD
This patch provide only digital support. The device is based on Si2168 30-demodulator, Si2158-20 tuner and CX23102-11Z chipset; USB id: 1b80:d3b2.
Status:
- DVB-T2 works fine;
- Composite and SVideo works fine;
- Analog not implemented.
--- drivers/media/usb/cx231xx/Kconfig | 1 + drivers/media/usb/cx231xx/cx231xx-cards.c | 29 +++++++++++++ drivers/media/usb/cx231xx/cx231xx-dvb.c | 70 +++++++++++++++++++++++++++++++ drivers/media/usb/cx231xx/cx231xx.h | 1 + 4 files changed, 101 insertions(+)
drivers/media/usb/cx231xx/Kconfig +1 -0
@@ -50,6 +50,7 @@ config VIDEO_CX231XX_DVB select DVB_LGDT3306A if MEDIA_SUBDRV_AUTOSELECT select DVB_TDA18271C2DD if MEDIA_SUBDRV_AUTOSELECT select DVB_SI2165 if MEDIA_SUBDRV_AUTOSELECT + select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT ---help---
drivers/media/usb/cx231xx/cx231xx-cards.c +29 -0
@@ -841,6 +841,33 @@ struct cx231xx_board cx231xx_boards[] = { .gpio = NULL, } }, }, + [CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD ] = { + .name ="Evromedia USB Full Hybrid Full HD" , + .tuner_type =TUNER_ABSENT , + .demod_addr =0x64 ,/* 0xc8 >> 1 */ + .demod_i2c_master =I2C_1_MUX_3 , + .has_dvb =1 , + .ir_i2c_master =I2C_0 , + .norm =V4L2_STD_PAL , + .output_mode =OUT_MODE_VIP11 , + .tuner_addr =0x60 ,/* 0xc0 >> 1 */ + .tuner_i2c_master =I2C_2 , + .input = {{ + .type =CX231XX_VMUX_TELEVISION , + .vmux =0 , + .amux =CX231XX_AMUX_VIDEO , + }, { + .type =CX231XX_VMUX_COMPOSITE1 , + .vmux =CX231XX_VIN_2_1 , + .amux =CX231XX_AMUX_LINE_IN , + }, { + .type =CX231XX_VMUX_SVIDEO , + .vmux =CX231XX_VIN_1_1 | + (CX231XX_VIN_1_2 <<8 ) | +CX25840_SVIDEO_ON , + .amux =CX231XX_AMUX_LINE_IN , + } }, + }, };const unsigned int cx231xx_bcount =ARRAY_SIZE (cx231xx_boards);
@@ -908,6 +935,8 @@ struct usb_device_id cx231xx_id_table[] = { .driver_info = CX231XX_BOARD_OTG102}, {USB_DEVICE(USB_VID_TERRATEC, 0x00a6), .driver_info = CX231XX_BOARD_TERRATEC_GRABBY}, + {USB_DEVICE(0x1b80, 0xd3b2), + .driver_info = CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD}, {}, };
drivers/media/usb/cx231xx/cx231xx-dvb.c +70 -0
82 lines not on this page · raw message
drivers/media/usb/cx231xx/cx231xx.h +1 -0
@@ -78,6 +78,7 @@#define CX231XX_BOARD_HAUPPAUGE_930C_HD_1114xx 20#define CX231XX_BOARD_HAUPPAUGE_955Q 21#define CX231XX_BOARD_TERRATEC_GRABBY 22 +#define CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD 23/* Limits minimum and default number of buffers */ #define CX231XX_MIN_BUF 4
Signature · 1 line
2.10.2
PATCH 2/2 cx231xx: Fix I2C on Internal Master 3 Bus
Internal Master 3 Bus can send and receive only 4 bytes per time.
--- drivers/media/usb/cx231xx/cx231xx-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/media/usb/cx231xx/cx231xx-core.c +6 -1
@@ -355,7 +355,12 @@ int cx231xx_send_vendor_cmd(struct cx231xx *dev,*/ if ((ven_req->wLength >4 ) && ((ven_req->bRequest ==0x4 ) || (ven_req->bRequest ==0x5 ) || - (ven_req->bRequest ==0x6 ))) { + (ven_req->bRequest ==0x6 ) || + +/* Internal Master 3 Bus can send +* and receive only 4 bytes per time +*/ + (ven_req->bRequest ==0x2 ))) { unsend_size =0 ; pdata = ven_req->pBuff;
Signature · 1 line
2.10.2
Re: [PATCH 2/2] [media] cx231xx: Fix I2C on Internal Master 3 Bus
Quoted 16 lines · Oleh Kravchenko
Internal Master 3 Bus can send and receive only 4 bytes per time.
Signed-off-by Oleh Kravchenko <[email protected]>--- drivers/media/usb/cx231xx/cx231xx-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/media/usb/cx231xx/cx231xx-core.c +0
-0@@ -355,7 +355,12 @@ int cx231xx_send_vendor_cmd(struct cx231xx *dev,*/ if ((ven_req->wLength > 4) && ((ven_req->bRequest == 0x4) || (ven_req->bRequest == 0x5) ||
drivers/media/usb/cx231xx/cx231xx-core.c int cx231xx_send_vendor_cmd(struct cx231xx *dev, · line 366
Quoted 10 lines
drivers/media/usb/cx231xx/cx231xx-core.c +6
-1- (ven_req->bRequest == 0x6))) { + (ven_req->bRequest == 0x6) || + + /* Internal Master 3 Bus can send + * and receive only 4 bytes per time + */ + (ven_req->bRequest == 0x2))) { unsend_size =0 ; pdata = ven_req->pBuff;
Good that you finally got i2c fixed properly and get rid of that ugly device specific hack.
That new comment still does not open for me, why you call i2c bus tuner sits as internal?
There is now commands 2, 4, 5, and 6 that should be split to 4 byte long, is there any vendor command that could be longer? Maybe you could just add single comment which states what all those 4 commands are.
Your patches are still on wrong order - you should first fix i2c and after that add device support.
regards
Antti
Signature · 1 line
http://palosaari.fi/
Re: [PATCH 2/2] [media] cx231xx: Fix I2C on Internal Master 3 Bus
Quoted 30 lines · Antti Palosaari
Quoted 16 lines · Oleh Kravchenko
Internal Master 3 Bus can send and receive only 4 bytes per time.
Signed-off-by Oleh Kravchenko <[email protected]>--- drivers/media/usb/cx231xx/cx231xx-core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/media/usb/cx231xx/cx231xx-core.c +0
-0@@ -355,7 +355,12 @@ int cx231xx_send_vendor_cmd(struct cx231xx *dev,*/ if ((ven_req->wLength > 4) && ((ven_req->bRequest == 0x4) || (ven_req->bRequest == 0x5) ||drivers/media/usb/cx231xx/cx231xx-core.c int cx231xx_send_vendor_cmd(struct cx231xx *dev, · line 366
Quoted 10 lines
drivers/media/usb/cx231xx/cx231xx-core.c +6
-1- (ven_req->bRequest == 0x6))) { + (ven_req->bRequest == 0x6) || + + /* Internal Master 3 Bus can send + * and receive only 4 bytes per time + */ + (ven_req->bRequest == 0x2))) { unsend_size =0 ; pdata = ven_req->pBuff;Good that you finally got i2c fixed properly and get rid of that ugly device specific hack.
Quoted 1 line
That new comment still does not open for me, why you call i2c bus tuner sits as internal?
Because Sri Deevi called it:
/* Internal Master 3 Bus */
dev->i2c_bus[2].nr = 2;
dev->i2c_bus[2].dev = dev;
dev->i2c_bus[2].i2c_period = I2C_SPEED_100K; /* 100kHz */
dev->i2c_bus[2].i2c_nostop = 0;
dev->i2c_bus[2].i2c_reserve = 0;Quoted 1 line
There is now commands 2, 4, 5, and 6 that should be split to 4 byte long, is there any vendor command that could be longer? Maybe you could just add single comment which states what all those 4 commands are.
Those commands is I2C bus numbers, plus read flag:
0 - write to I2C_0 0+4 - read from I2C_0 1 - write to I2C_1 1+4 - read from I2C_1 2 - write to I2C_2 2+4 - read from I2C_2
So I think my comment is good enough.
Quoted 1 line
Your patches are still on wrong order - you should first fix i2c and after that add device support.
Looks like I can't change this, it already merged into linux-next :)
Quoted 2 lines
regards
Antti
Signature · 2 lines
Best regards, Oleh Kravchenko