Re: avermedia A306 / PCIe-minicard (laptop) / CX23885
Hello Hello Remi! Thank you for looking at the Avercard with the CX23885 driver. Antti, redirected me toward you, What exactly is your question? And If it's at the least at the same stage as the HC81 , I think it deserve's to be listed in cards.h Possibly. Tell us again 1) what you have working reliably 2) what isn't working but the driver is exposing and 3) what the driver is exposing but has not been tested. So people will know right away, that this card has been identified by the V4L community, and dont have Anyone working on that card would arrive here on the mailing list, I don't think that's going to be an issue. I suggest you focus on getting feature of the card working reliably, produce a patchset and I'm sure it will get reviewed, refined then eventually merged. Other comments below. + [CX23885_BOARD_AVERMEDIA_A306] = { +.name = AVerTV Hybrid Minicard PCIe A306, +.tuner_type = TUNER_XC2028, +.tuner_addr = 0x61, /* 0xc2 1 */ +.tuner_bus = 1, +.porta = CX23885_ANALOG_VIDEO, + .portb = CX23885_MPEG_ENCODER, +.input = {{ +.type = CX23885_VMUX_TELEVISION, +.vmux = CX25840_VIN2_CH1 | + CX25840_VIN5_CH2 | + CX25840_NONE0_CH3 | + CX25840_NONE1_CH3, +.amux = CX25840_AUDIO8, +}, { +.type = CX23885_VMUX_SVIDEO, +.vmux = CX25840_VIN8_CH1 | + CX25840_NONE_CH2 | + CX25840_VIN7_CH3 | + CX25840_SVIDEO_ON, +.amux = CX25840_AUDIO6, +}, { +.type = CX23885_VMUX_COMPONENT, +.vmux = CX25840_VIN1_CH1 | + CX25840_NONE_CH2 | + CX25840_NONE0_CH3 | + CX25840_NONE1_CH3, +.amux = CX25840_AUDIO6, +}}, + + } Does the card have a MPEG2 hardware compressor and is it functioning properly? (/dev/video1) Are both svideo and component inputs working correctly in tvtime? What about audio inputs? Does the card have any audio inputs and is the driver acting and exposing those features correctly? If not then please remove any of these sections. +case CX23885_BOARD_AVERMEDIA_A306: +cx_clear(MC417_CTL, 1); +/* GPIO-0,1,2 setup direction as output */ +cx_set(GP0_IO, 0x0007); +mdelay(10); +/* AF9013 demod reset */ +cx_set(GP0_IO, 0x00010001); +mdelay(10); +cx_clear(GP0_IO, 0x00010001); +mdelay(10); +cx_set(GP0_IO, 0x00010001); +mdelay(10); +/* demod tune? */ +cx_clear(GP0_IO, 0x00030003); +mdelay(10); +cx_set(GP0_IO, 0x00020002); +mdelay(10); +cx_set(GP0_IO, 0x00010001); +mdelay(10); +cx_clear(GP0_IO, 0x00020002); +/* XC3028L tuner reset */ +cx_set(GP0_IO, 0x00040004); +cx_clear(GP0_IO, 0x00040004); +cx_set(GP0_IO, 0x00040004); +mdelay(60); +break; You're setting and clearing the GPIO direction enable registers (upper 16 bits), this isn't a good idea. If you want to drive a GPIO in a specific direction (lower 8 bits), perhaps for a reset, instead do this: /* AF9013 demod reset */ cx_set(GP0_IO, 0x00010001); /* Establish the direction of the GPIO and it's signal level) mdelay(10); cx_clear(GP0_IO, 0x0001); /* change the signal level, drive to low */ mdelay(10); cx_set(GP0_IO, 0x0001); /* back to high */ mdelay(10); Repeat this example for other other 'demod tune' and 3028 resets you are doing, don't toggle the upper 16bits, else you leave the GPIO floating, a bad idea. - Steve -- Steven Toth - Kernel Labs http://www.kernellabs.com -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: avermedia A306 / PCIe-minicard (laptop) / CX23885
Hello :) Thnx for the reply ! Well, I do not have the cables ... it's a laptop card, orginally for a Dell, I am doing my tests on an Acer, The Video0 dev , composite/s-video is showing an analog signal, i guess a noise picture because not hooked-up, but bottom half is sometimes green . Analog scanning/reception = NULL , I might have to check again the antenna connexion, For the Mpeg, negative, it's a 9013 chip, I still have to discecte the 9015 driver and pull-out the 9013 spcific data , iguess . What I need the most, Is a big picture of the V4L API , like an organigram of what is where ( initialising this or that, handeling setups - and controls) I code, but going thru others Code, is always like playing Maze ... :) especially an API in a whole System Package... But I am searching on my side :) I there a dummy /test driver for PCIe cards I can study ? Best regards Rémi. Le 17 septembre 2013 à 15:38, Steven Toth st...@kernellabs.com a écrit : Hello Hello Remi! Thank you for looking at the Avercard with the CX23885 driver. Antti, redirected me toward you, What exactly is your question? And If it's at the least at the same stage as the HC81 , I think it deserve's to be listed in cards.h Possibly. Tell us again 1) what you have working reliably 2) what isn't working but the driver is exposing and 3) what the driver is exposing but has not been tested. So people will know right away, that this card has been identified by the V4L community, and dont have Anyone working on that card would arrive here on the mailing list, I don't think that's going to be an issue. I suggest you focus on getting feature of the card working reliably, produce a patchset and I'm sure it will get reviewed, refined then eventually merged. Other comments below. + [CX23885_BOARD_AVERMEDIA_A306] = { + .name = AVerTV Hybrid Minicard PCIe A306, + .tuner_type = TUNER_XC2028, + .tuner_addr = 0x61, /* 0xc2 1 */ + .tuner_bus = 1, + .porta = CX23885_ANALOG_VIDEO, + .portb = CX23885_MPEG_ENCODER, + .input = {{ + .type = CX23885_VMUX_TELEVISION, + .vmux = CX25840_VIN2_CH1 | + CX25840_VIN5_CH2 | + CX25840_NONE0_CH3 | + CX25840_NONE1_CH3, + .amux = CX25840_AUDIO8, + }, { + .type = CX23885_VMUX_SVIDEO, + .vmux = CX25840_VIN8_CH1 | + CX25840_NONE_CH2 | + CX25840_VIN7_CH3 | + CX25840_SVIDEO_ON, + .amux = CX25840_AUDIO6, + }, { + .type = CX23885_VMUX_COMPONENT, + .vmux = CX25840_VIN1_CH1 | + CX25840_NONE_CH2 | + CX25840_NONE0_CH3 | + CX25840_NONE1_CH3, + .amux = CX25840_AUDIO6, + }}, + + } Does the card have a MPEG2 hardware compressor and is it functioning properly? (/dev/video1) Are both svideo and component inputs working correctly in tvtime? What about audio inputs? Does the card have any audio inputs and is the driver acting and exposing those features correctly? If not then please remove any of these sections. + case CX23885_BOARD_AVERMEDIA_A306: + cx_clear(MC417_CTL, 1); + /* GPIO-0,1,2 setup direction as output */ + cx_set(GP0_IO, 0x0007); + mdelay(10); + /* AF9013 demod reset */ + cx_set(GP0_IO, 0x00010001); + mdelay(10); + cx_clear(GP0_IO, 0x00010001); + mdelay(10); + cx_set(GP0_IO, 0x00010001); + mdelay(10); + /* demod tune? */ + cx_clear(GP0_IO, 0x00030003); + mdelay(10); + cx_set(GP0_IO, 0x00020002); + mdelay(10); + cx_set(GP0_IO, 0x00010001); + mdelay(10); + cx_clear(GP0_IO, 0x00020002); + /* XC3028L tuner reset */ + cx_set(GP0_IO, 0x00040004); + cx_clear(GP0_IO, 0x00040004); + cx_set(GP0_IO, 0x00040004); + mdelay(60); + break; You're setting and clearing the GPIO direction enable registers (upper 16 bits), this isn't a good idea. If you want to drive a GPIO in a specific direction
Re: avermedia A306 / PCIe-minicard (laptop) / CX23885
Hello :) Thnx for the reply ! You are welcome. Well, I do not have the cables ... it's a laptop card, orginally for a Dell, I am doing my tests on an Acer, So you don't have a valid signal to test your changes with? The Video0 dev , composite/s-video is showing an analog signal, i guess a noise picture because not hooked-up, Hmm. Possibly, or possible the video decoder and video patch is not configured. but bottom half is sometimes green . So you haven't seen ANY stable video from any analog input? Analog scanning/reception = NULL , I might have to check again the antenna connexion, OK. For the Mpeg, negative, it's a 9013 chip, I still have to discecte the 9015 driver and pull-out the 9013 spcific data , iguess . OK. No mpeg either. So you don't have anything working so far, that's my reading of your current state. What I need the most, Is a big picture of the V4L API , like an organigram of what is where ( initialising this or that, linuxtv.org handeling setups - and controls) V4L2 Specification at linuxtv.org I there a dummy /test driver for PCIe cards I can study ? CX23885 is a good place to start. It's fully functional and matches the hardware you have to experiment with. - Steve -- Steven Toth - Kernel Labs http://www.kernellabs.com -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: avermedia A306 / PCIe-minicard (laptop) / CX23885
I resubmit with the proper keyword , sorry for the pollution . Signed-off-by: Rémi PUTHOMME-ESSAISSI r...@remis.cc Hello I suggest this patch, For v4l/cx23885.h v4l/cx23885-video.c and v4l/cx23885-cards.c Status, AVerMedia A306 MiniCard Hybrid DVB-T / 14f1:8852 (rev 02) Subsystem: 1461:c139 Is beeing regognized and loaded by the driver, by it's PCI ID , The correct firmwares are loaded fully notably by the Xceive 3028 . I'm testing the mpeg side, not fully yet (firmware) . The full dmesg output, with all relevant drivers set debug=1 , is atteched to the email . I do not have all the cables to test (it's a laptop ..:) ) so testing is more than welcome. Best regards Rémi PUTHOMME-ESSAISSI . root@medeb:~/v4l# diff -u media_build/v4l/cx23885-cards.c media_build.remi/v4l/cx23885-cards.c --- media_build/v4l/cx23885-cards.c 2012-12-28 00:04:05.0 +0100 +++ media_build.remi/v4l/cx23885-cards.c 2013-08-21 14:15:54.173195979 +0200 @@ -604,8 +604,39 @@ CX25840_NONE0_CH3 | CX25840_NONE1_CH3, .amux = CX25840_AUDIO6, - } }, - } + }} + }, + [CX23885_BOARD_AVERMEDIA_A306] = { + .name = AVerTV Hybrid Minicard PCIe A306, + .tuner_type = TUNER_XC2028, + .tuner_addr = 0x61, /* 0xc2 1 */ + .tuner_bus = 1, + .porta = CX23885_ANALOG_VIDEO, + .portb = CX23885_MPEG_ENCODER, + .input = {{ + .type = CX23885_VMUX_TELEVISION, + .vmux = CX25840_VIN2_CH1 | + CX25840_VIN5_CH2 | + CX25840_NONE0_CH3 | + CX25840_NONE1_CH3, + .amux = CX25840_AUDIO8, + }, { + .type = CX23885_VMUX_SVIDEO, + .vmux = CX25840_VIN8_CH1 | + CX25840_NONE_CH2 | + CX25840_VIN7_CH3 | + CX25840_SVIDEO_ON, + .amux = CX25840_AUDIO6, + }, { + .type = CX23885_VMUX_COMPONENT, + .vmux = CX25840_VIN1_CH1 | + CX25840_NONE_CH2 | + CX25840_NONE0_CH3 | + CX25840_NONE1_CH3, + .amux = CX25840_AUDIO6, + }}, + + } }; const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); @@ -841,7 +872,12 @@ .subvendor = 0x1461, .subdevice = 0xd939, .card = CX23885_BOARD_AVERMEDIA_HC81R, - }, + }, { + .subvendor = 0x1461, + .subdevice = 0xc139, + .card = CX23885_BOARD_AVERMEDIA_A306, + }, + }; const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); @@ -1069,6 +1105,10 @@ /* XC3028L Reset Command */ bitmask = 1 2; break; + case CX23885_BOARD_AVERMEDIA_A306: + /* XC3028L Reset Command */ + bitmask = 1 2; + break; } if (bitmask) { @@ -1394,6 +1434,34 @@ cx_set(GP0_IO, 0x00040004); mdelay(60); break; + case CX23885_BOARD_AVERMEDIA_A306: + cx_clear(MC417_CTL, 1); + /* GPIO-0,1,2 setup direction as output */ + cx_set(GP0_IO, 0x0007); + mdelay(10); + /* AF9013 demod reset */ + cx_set(GP0_IO, 0x00010001); + mdelay(10); + cx_clear(GP0_IO, 0x00010001); + mdelay(10); + cx_set(GP0_IO, 0x00010001); + mdelay(10); + /* demod tune? */ + cx_clear(GP0_IO, 0x00030003); + mdelay(10); + cx_set(GP0_IO, 0x00020002); + mdelay(10); + cx_set(GP0_IO, 0x00010001); + mdelay(10); + cx_clear(GP0_IO, 0x00020002); + /* XC3028L tuner reset */ + cx_set(GP0_IO, 0x00040004); + cx_clear(GP0_IO, 0x00040004); + cx_set(GP0_IO, 0x00040004); + mdelay(60); + break; + + } } @@ -1623,6 +1691,21 @@ ts2-ts_clk_en_val = 0x1; /* Enable TS_CLK */ ts2-src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; break; + + case CX23885_BOARD_AVERMEDIA_A306: + /* Defaults for VID B */ + ts1-gen_ctrl_val = 0x4; /* Parallel */ + ts1-ts_clk_en_val = 0x1; /*