Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751075AbeABVq5 (ORCPT + 1 other); Tue, 2 Jan 2018 16:46:57 -0500 Received: from mail-lf0-f48.google.com ([209.85.215.48]:34922 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbeABVqy (ORCPT ); Tue, 2 Jan 2018 16:46:54 -0500 X-Google-Smtp-Source: ACJfBosZMPcthMMI4pztF78NHy7V/9CJBgY4vt5nBLSYeg5qT/UI0VbwGpJLerqnKd6Yrltmcf9jFqV3viCHkvX/qf8= MIME-Version: 1.0 In-Reply-To: References: <59BEEC39.2030609@googlemail.com> <59C1044E.8060805@googlemail.com> <59C16D1E.80308@googlemail.com> From: Nigel Kettlewell Date: Tue, 2 Jan 2018 21:46:51 +0000 Message-ID: Subject: Re: [PATCH] Support HVR-1200 analog video as a clone of HVR-1500. Tested, composite and s-video inputs. To: Hans Verkuil Cc: Devin Heitmueller , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: To be honest we should probably just drop this, I no longer have the card in my machine so cannot re-test it if ever needed. On 4 December 2017 at 12:01, Hans Verkuil wrote: > Hi Nigel, > > Can you repost this as a proper patch? It doesn't apply (issues with tabs and > whitespace: please use tabs!), and I am missing a "Signed-off-by" line (see > https://elinux.org/Developer_Certificate_Of_Origin). > > Thanks! > > Hans > > On 09/19/2017 09:16 PM, Nigel Kettlewell wrote: >> [adding kernel mailing lists missed from my reply] >> >> Thank you, yes I think I cribbed too much from the 1500. I think the >> tuner part is not necessary: I have no analog over-the-air signal so I >> cannot test it, hence I have removed the tuner element from the patch >> (below). >> >> I have tested DVB-T which works fine. dmesg shows no errors (attached). >> >> DISPLAY=xxx:0.0 vlc dvb-t://frequency=498000000:bandwidth=8 >> --dvb-adapter=0 --programs=8373 >> >> >> /usr/local/bin/v4l2-ctl --set-input 1 >> /usr/local/bin/v4l2-ctl -s 0x000000f7 >> cat /dev/video0 > /tmp/svideo.raw >> >> ffmpeg -f rawvideo -pix_fmt yuyv422 -r 25 -s:v 720x576 -i >> /tmp/svideo.raw -vcodec mpeg2video -vb 2000k -y /tmp/svideo.mpg >> >> >> Revised patch: >> >> --- >> drivers/media/pci/cx23885/cx23885-cards.c | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/drivers/media/pci/cx23885/cx23885-cards.c >> b/drivers/media/pci/cx23885/cx23885-cards.c >> index 0350f13..1b685f0 100644 >> --- a/drivers/media/pci/cx23885/cx23885-cards.c >> +++ b/drivers/media/pci/cx23885/cx23885-cards.c >> @@ -196,7 +196,22 @@ struct cx23885_board cx23885_boards[] = { >> }, >> [CX23885_BOARD_HAUPPAUGE_HVR1200] = { >> .name = "Hauppauge WinTV-HVR1200", >> + .porta = CX23885_ANALOG_VIDEO, >> .portc = CX23885_MPEG_DVB, >> + .input = {{ >> + .type = CX23885_VMUX_COMPOSITE1, >> + .vmux = CX25840_VIN7_CH3 | >> + CX25840_VIN4_CH2 | >> + CX25840_VIN6_CH1, >> + .gpio0 = 0, >> + }, { >> + .type = CX23885_VMUX_SVIDEO, >> + .vmux = CX25840_VIN7_CH3 | >> + CX25840_VIN4_CH2 | >> + CX25840_VIN8_CH1 | >> + CX25840_SVIDEO_ON, >> + .gpio0 = 0, >> + } }, >> }, >> [CX23885_BOARD_HAUPPAUGE_HVR1700] = { >> .name = "Hauppauge WinTV-HVR1700", >> @@ -2260,6 +2275,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) >> case CX23885_BOARD_HAUPPAUGE_HVR1290: >> case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: >> case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID: >> + case CX23885_BOARD_HAUPPAUGE_HVR1200: >> case CX23885_BOARD_HAUPPAUGE_HVR1500: >> case CX23885_BOARD_MPX885: >> case CX23885_BOARD_MYGICA_X8507: >> -- >> 2.9.4 >> >>> Nigel Kettlewell >>> 19 September 2017 12:49 >>> Thank you, yes I think I cribbed too much from the 1500. I think the >>> tuner part is not necessary: I have no analog over-the-air signal so I >>> cannot test it, hence I have removed the tuner element from the patch >>> (below). >>> >>> I have tested DVB-T which works fine. dmesg shows no errors (attached). >>> >>> DISPLAY=xxx:0.0 vlc dvb-t://frequency=498000000:bandwidth=8 >>> --dvb-adapter=0 --programs=8373 >>> >>> >>> /usr/local/bin/v4l2-ctl --set-input 1 >>> /usr/local/bin/v4l2-ctl -s 0x000000f7 >>> cat /dev/video0 > /tmp/svideo.raw >>> >>> ffmpeg -f rawvideo -pix_fmt yuyv422 -r 25 -s:v 720x576 -i >>> /tmp/svideo.raw -vcodec mpeg2video -vb 2000k -y /tmp/svideo.mpg >>> >>> >>> Revised patch: >>> >>> --- >>> drivers/media/pci/cx23885/cx23885-cards.c | 16 ++++++++++++++++ >>> 1 file changed, 16 insertions(+) >>> >>> diff --git a/drivers/media/pci/cx23885/cx23885-cards.c >>> b/drivers/media/pci/cx23885/cx23885-cards.c >>> index 0350f13..1b685f0 100644 >>> --- a/drivers/media/pci/cx23885/cx23885-cards.c >>> +++ b/drivers/media/pci/cx23885/cx23885-cards.c >>> @@ -196,7 +196,22 @@ struct cx23885_board cx23885_boards[] = { >>> }, >>> [CX23885_BOARD_HAUPPAUGE_HVR1200] = { >>> .name = "Hauppauge WinTV-HVR1200", >>> + .porta = CX23885_ANALOG_VIDEO, >>> .portc = CX23885_MPEG_DVB, >>> + .input = {{ >>> + .type = CX23885_VMUX_COMPOSITE1, >>> + .vmux = CX25840_VIN7_CH3 | >>> + CX25840_VIN4_CH2 | >>> + CX25840_VIN6_CH1, >>> + .gpio0 = 0, >>> + }, { >>> + .type = CX23885_VMUX_SVIDEO, >>> + .vmux = CX25840_VIN7_CH3 | >>> + CX25840_VIN4_CH2 | >>> + CX25840_VIN8_CH1 | >>> + CX25840_SVIDEO_ON, >>> + .gpio0 = 0, >>> + } }, >>> }, >>> [CX23885_BOARD_HAUPPAUGE_HVR1700] = { >>> .name = "Hauppauge WinTV-HVR1700", >>> @@ -2260,6 +2275,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) >>> case CX23885_BOARD_HAUPPAUGE_HVR1290: >>> case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: >>> case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID: >>> + case CX23885_BOARD_HAUPPAUGE_HVR1200: >>> case CX23885_BOARD_HAUPPAUGE_HVR1500: >>> case CX23885_BOARD_MPX885: >>> case CX23885_BOARD_MYGICA_X8507: >>> -- >>> 2.9.4 >>> >>> >>> >>> Devin Heitmueller >>> 18 September 2017 13:57 >>> On Sun, Sep 17, 2017 at 5:42 PM, Nigel Kettlewell >>> >>> I'm not confident the tuner config for this board is correct. The >>> HVR-1200 is much closer to the HVR-1250 as opposed to the HVR-1500, >>> and IIRC it didn't have an xc3028. >>> >>> I don't dispute that with the patch in question the composite/s-video >>> are probably working ok, but I wouldn't recommend accepting this patch >>> as-is until the tuner is verified for DVB-T and analog (ideally both). >>> >>> Can you provide the output of dmesg on device load? If it's filled >>> with a bunch of errors showing xc3028 firmware load failures, that >>> would be a smoking gun that it doesn't have the xc3028. >>> >>> Devin >>> >>> Nigel Kettlewell >>> 17 September 2017 22:42 >>> I propose the following patch to support Hauppauge HVR-1200 analog >>> video, nothing more than a clone of HVR-1500. Patch based on Linux 4.9 >>> commit 69973b830859bc6529a7a0468ba0d80ee5117826 >>> >>> I have tested composite and S-Video inputs. >>> >>> With the change, HVR-1200 devices have a /dev/video entry which is >>> accessible in the normal way. >>> >>> Let me know if you need anything more. >>> >>> Nigel Kettlewell >>> >>> >>> >>> --- >>> drivers/media/pci/cx23885/cx23885-cards.c | 24 ++++++++++++++++++++++++ >>> 1 file changed, 24 insertions(+) >>> >>> diff --git a/drivers/media/pci/cx23885/cx23885-cards.c >>> b/drivers/media/pci/cx23885/cx23885-cards.c >>> index 99ba8d6..5be38f1 100644 >>> --- a/drivers/media/pci/cx23885/cx23885-cards.c >>> +++ b/drivers/media/pci/cx23885/cx23885-cards.c >>> @@ -195,7 +195,30 @@ struct cx23885_board cx23885_boards[] = { >>> }, >>> [CX23885_BOARD_HAUPPAUGE_HVR1200] = { >>> .name = "Hauppauge WinTV-HVR1200", >>> + .porta = CX23885_ANALOG_VIDEO, >>> .portc = CX23885_MPEG_DVB, >>> + .tuner_type = TUNER_XC2028, >>> + .tuner_addr = 0x61, /* 0xc2 >> 1 */ >>> + .input = {{ >>> + .type = CX23885_VMUX_TELEVISION, >>> + .vmux = CX25840_VIN7_CH3 | >>> + CX25840_VIN5_CH2 | >>> + CX25840_VIN2_CH1, >>> + .gpio0 = 0, >>> + }, { >>> + .type = CX23885_VMUX_COMPOSITE1, >>> + .vmux = CX25840_VIN7_CH3 | >>> + CX25840_VIN4_CH2 | >>> + CX25840_VIN6_CH1, >>> + .gpio0 = 0, >>> + }, { >>> + .type = CX23885_VMUX_SVIDEO, >>> + .vmux = CX25840_VIN7_CH3 | >>> + CX25840_VIN4_CH2 | >>> + CX25840_VIN8_CH1 | >>> + CX25840_SVIDEO_ON, >>> + .gpio0 = 0, >>> + } }, >>> }, >>> [CX23885_BOARD_HAUPPAUGE_HVR1700] = { >>> .name = "Hauppauge WinTV-HVR1700", >>> @@ -2262,6 +2285,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) >>> case CX23885_BOARD_HAUPPAUGE_HVR1290: >>> case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200: >>> case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID: >>> + case CX23885_BOARD_HAUPPAUGE_HVR1200: >>> case CX23885_BOARD_HAUPPAUGE_HVR1500: >>> case CX23885_BOARD_MPX885: >>> case CX23885_BOARD_MYGICA_X8507: >>> -- >>> 2.9.4 >>> >> >