Re: [PATCH] Support HVR-1200 analog video as a clone of HVR-1500. Tested, composite and s-video inputs.

2018-01-02 Thread Nigel Kettlewell
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 <hverk...@xs4all.nl> 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=49800:bandwidth=8
>> --dvb-adapter=0 --programs=8373
>> 
>>
>> /usr/local/bin/v4l2-ctl --set-input 1
>> /usr/local/bin/v4l2-ctl -s 0x00f7
>> 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 <mailto:nigel.kettlew...@googlemail.com>
>>> 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=49800:bandwidth=8
>>> --dvb-adapter=0 --programs=8373
>>> 
>>>
>>> /usr/local/bin/v4l2-ctl --set-input 1
>>> /usr/local/bin/v4l2-ctl -s 0x00f7
>>> 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
>

Re: [PATCH] Support HVR-1200 analog video as a clone of HVR-1500. Tested, composite and s-video inputs.

2018-01-02 Thread Nigel Kettlewell
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=49800:bandwidth=8
>> --dvb-adapter=0 --programs=8373
>> 
>>
>> /usr/local/bin/v4l2-ctl --set-input 1
>> /usr/local/bin/v4l2-ctl -s 0x00f7
>> 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 <mailto:nigel.kettlew...@googlemail.com>
>>> 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=49800:bandwidth=8
>>> --dvb-adapter=0 --programs=8373
>>> 
>>>
>>> /usr/local/bin/v4l2-ctl --set-input 1
>>> /usr/local/bin/v4l2-ctl -s 0x00f7
>>> 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
>>&

Re: [PATCH] Support HVR-1200 analog video as a clone of HVR-1500. Tested, composite and s-video inputs.

2017-09-19 Thread Nigel Kettlewell

[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=49800:bandwidth=8 
--dvb-adapter=0 --programs=8373



/usr/local/bin/v4l2-ctl --set-input 1
/usr/local/bin/v4l2-ctl -s 0x00f7
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 <mailto:nigel.kettlew...@googlemail.com>
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=49800:bandwidth=8 
--dvb-adapter=0 --programs=8373



/usr/local/bin/v4l2-ctl --set-input 1
/usr/local/bin/v4l2-ctl -s 0x00f7
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:
  

Re: [PATCH] Support HVR-1200 analog video as a clone of HVR-1500. Tested, composite and s-video inputs.

2017-09-19 Thread Nigel Kettlewell

[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=49800:bandwidth=8 
--dvb-adapter=0 --programs=8373



/usr/local/bin/v4l2-ctl --set-input 1
/usr/local/bin/v4l2-ctl -s 0x00f7
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 <mailto:nigel.kettlew...@googlemail.com>
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=49800:bandwidth=8 
--dvb-adapter=0 --programs=8373



/usr/local/bin/v4l2-ctl --set-input 1
/usr/local/bin/v4l2-ctl -s 0x00f7
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:
  

[PATCH] Fix for hanging si2168 in PCTV 292e, making the code match

2017-09-19 Thread Nigel Kettlewell

[re-sending as plain text]

Fix for hanging si2168 in PCTV 292e USB, making the code match the comment.

Using firmware v4.0.11 the 292e would work once and then hang on 
subsequent attempts to view DVB channels, until physically unplugged and 
plugged back in.


With this patch, the warm state is reset for v4.0.11 and it appears to 
work both on the first attempt and on subsequent attempts.


(Patch basis Linux 4.11.9 f82a53b87594f460f2dd9983eeb851a5840e8df8)

---
 drivers/media/dvb-frontends/si2168.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c

index 680ba06..523acd1 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -582,7 +582,7 @@ static int si2168_sleep(struct dvb_frontend *fe)
dev->active = false;

/* Firmware B 4.0-11 or later loses warm state during sleep */
-   if (dev->version > ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
+   if (dev->version >= ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
dev->warm = false;

memcpy(cmd.args, "\x13", 1);
--
2.9.4



[PATCH] Fix for hanging si2168 in PCTV 292e, making the code match

2017-09-19 Thread Nigel Kettlewell

[re-sending as plain text]

Fix for hanging si2168 in PCTV 292e USB, making the code match the comment.

Using firmware v4.0.11 the 292e would work once and then hang on 
subsequent attempts to view DVB channels, until physically unplugged and 
plugged back in.


With this patch, the warm state is reset for v4.0.11 and it appears to 
work both on the first attempt and on subsequent attempts.


(Patch basis Linux 4.11.9 f82a53b87594f460f2dd9983eeb851a5840e8df8)

---
 drivers/media/dvb-frontends/si2168.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c

index 680ba06..523acd1 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -582,7 +582,7 @@ static int si2168_sleep(struct dvb_frontend *fe)
dev->active = false;

/* Firmware B 4.0-11 or later loses warm state during sleep */
-   if (dev->version > ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
+   if (dev->version >= ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
dev->warm = false;

memcpy(cmd.args, "\x13", 1);
--
2.9.4



[PATCH] Support HVR-1200 analog video as a clone of HVR-1500. Tested, composite and s-video inputs.

2017-09-17 Thread Nigel Kettlewell
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



[PATCH] Support HVR-1200 analog video as a clone of HVR-1500. Tested, composite and s-video inputs.

2017-09-17 Thread Nigel Kettlewell
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