[PATCH] media: em28xx-cards: output regular messages as info

2018-03-23 Thread Chris Mayo
Messages expected during device probe were being marked as errors.

Signed-off-by: Chris Mayo 
---
 drivers/media/usb/em28xx/em28xx-cards.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c 
b/drivers/media/usb/em28xx/em28xx-cards.c
index 6e0e67d23..8977c2be3 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -3736,7 +3736,7 @@ static int em28xx_usb_probe(struct usb_interface *intf,
speed = "unknown";
}
 
-   dev_err(&intf->dev,
+   dev_info(&intf->dev,
"New device %s %s @ %s Mbps (%04x:%04x, interface %d, class 
%d)\n",
udev->manufacturer ? udev->manufacturer : "",
udev->product ? udev->product : "",
@@ -3771,7 +3771,7 @@ static int em28xx_usb_probe(struct usb_interface *intf,
dev->dev_next = NULL;
 
if (has_vendor_audio) {
-   dev_err(&intf->dev,
+   dev_info(&intf->dev,
"Audio interface %i found (Vendor Class)\n", ifnum);
dev->usb_audio_type = EM28XX_USB_AUDIO_VENDOR;
}
@@ -3790,12 +3790,12 @@ static int em28xx_usb_probe(struct usb_interface *intf,
}
 
if (has_video)
-   dev_err(&intf->dev, "Video interface %i found:%s%s\n",
+   dev_info(&intf->dev, "Video interface %i found:%s%s\n",
ifnum,
dev->analog_ep_bulk ? " bulk" : "",
dev->analog_ep_isoc ? " isoc" : "");
if (has_dvb)
-   dev_err(&intf->dev, "DVB interface %i found:%s%s\n",
+   dev_info(&intf->dev, "DVB interface %i found:%s%s\n",
ifnum,
dev->dvb_ep_bulk ? " bulk" : "",
dev->dvb_ep_isoc ? " isoc" : "");
@@ -3837,13 +3837,13 @@ static int em28xx_usb_probe(struct usb_interface *intf,
if (has_video) {
if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk))
dev->analog_xfer_bulk = 1;
-   dev_err(&intf->dev, "analog set to %s mode.\n",
+   dev_info(&intf->dev, "analog set to %s mode.\n",
dev->analog_xfer_bulk ? "bulk" : "isoc");
}
if (has_dvb) {
if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk))
dev->dvb_xfer_bulk = 1;
-   dev_err(&intf->dev, "dvb set to %s mode.\n",
+   dev_info(&intf->dev, "dvb set to %s mode.\n",
dev->dvb_xfer_bulk ? "bulk" : "isoc");
}
 
-- 
2.16.1



[PATCH] [v4l-utils] buildsystem: Fix not reporting if libjpeg is not being used

2018-01-15 Thread Chris Mayo
Signed-off-by: Chris Mayo 
---

If configured --without-jpeg, currently see:

compile time options summary


Host OS: linux-gnu
X11: yes
GL : yes
glu: yes
libjpeg: 

 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index dc1e9cbf5..cfbdffd99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,7 +195,8 @@ AS_IF([test "x$with_jpeg" != xno],
  [have_jpeg=no
   AC_MSG_WARN(cannot find libjpeg (v6 or 
later required))])],
[have_jpeg=no
-AC_MSG_WARN(cannot find libjpeg)])])
+AC_MSG_WARN(cannot find libjpeg)])],
+  [have_jpeg=no])
 
 AM_CONDITIONAL([HAVE_JPEG], [test x$have_jpeg = xyes])
 
-- 
2.13.6



[PATCH] [v4l-utils] sdlcam: Only build if using libjpeg

2018-01-14 Thread Chris Mayo
Signed-off-by: Chris Mayo 
---

Otherwise build fails on linking:

libtool: link: x86_64-pc-linux-gnu-gcc -march=ivybridge -ftree-vectorize -O2 
-pipe -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o pixfmt-test 
pixfmt_test-pixfmt-test.o  -lX11
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: 
sdlcam-sdlcam.o: undefined reference to symbol 'jpeg_set_quality@@LIBJPEG_6.2'
/usr/lib64/libjpeg.so.62: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:558: sdlcam] Error 1

Affects released v4l-utils-1.14.1.

 contrib/test/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am
index 0188fe214..c7c38e7a6 100644
--- a/contrib/test/Makefile.am
+++ b/contrib/test/Makefile.am
@@ -17,8 +17,10 @@ noinst_PROGRAMS += v4l2gl
 endif
 
 if HAVE_SDL
+if HAVE_JPEG
 noinst_PROGRAMS += sdlcam
 endif
+endif
 
 driver_test_SOURCES = driver-test.c
 driver_test_LDADD = ../../utils/libv4l2util/libv4l2util.la
-- 
2.13.6



Re: [PATCH 2/2] v4l-utils: fixed dvbv5 vdr format

2016-09-05 Thread Chris Mayo
On 05/09/16 14:25, Mauro Carvalho Chehab wrote:
> Em Mon, 5 Sep 2016 15:13:04 +0200
> Markus Heiser  escreveu:
> 
>> Hi Mauro, (Hi Chris)
>>
>> sorry for my late reply. I test the v4-utils on my HTPC,
>> where I'am not often have time for experimentation ;-)
>>
>> Am 24.08.2016 um 16:52 schrieb Mauro Carvalho Chehab 
>> :
>>
>>> Em Wed, 24 Aug 2016 11:49:27 -0300
>>> Mauro Carvalho Chehab  escreveu:
>>>   
>>>> Hi Markus,
>>>>
>>>> Em Wed, 10 Aug 2016 11:52:19 +0200
>>>> Markus Heiser  escreveu:
>>>>   
>>>>> From: Markus Heiser 
>>>>>
>>>>> From: Heiser, Markus 
>>>>>
>>>>> The vdr format was broken, I got '(null)' entries
>>>>>
>>>>> HD:11494:S1HC23I0M5N1O35:S:(null):22000:5101:5102,5103,5106,5108:0:0:10301:0:0:0:
>>>>> 0-:1:2--:3:4-:
>>>>>
>>>>> refering to the VDR Wikis ...
>>>>>
>>>>> * LinuxTV: 
>>>>> http://www.linuxtv.org/vdrwiki/index.php/Syntax_of_channels.conf
>>>>> * german comunity Wiki: 
>>>>> http://www.vdr-wiki.de/wiki/index.php/Channels.conf#Parameter_ab_VDR-1.7.4
>>>>>
>>>>> There is no field at position 4 / in between "Source" and "SRate" which
>>>>> might have a value. I suppose the '(null):' is the result of pointing
>>>>> to *nothing*.
>>>>>
>>>>> An other mistake is the ending colon (":") at the line. It is not
>>>>> explicit specified but adding an collon to the end of an channel entry
>>>>> will prevent players (like mpv or mplayer) from parsing the line (they
>>>>> will ignore these lines).
>>>>>
>>>>> At least: generating a channel list with
>>>>>
>>>>>  dvbv5-scan --output-format=vdr ...
>>>>>
>>>>> will result in the same defective channel entry, containing "(null):"
>>>>> and the leading collon ":".
>>>>
>>>> Sorry for taking too long to handle that. I usually stop handling
>>>> patches one week before the merge window, returning to merge only
>>>> after -rc1. This time, it took a little more time, due to the Sphinx
>>>> changes, as I was needing some patches to be merged upstream, in order
>>>> to change my handling scripts to work with the new way.
>>>>
>>>> Anyway, with regards to this patch, not sure if you saw, but
>>>> Chris Mayo sent us a different fix for it:
>>>>
>>>>https://patchwork.linuxtv.org/patch/35803/
>>>>
>>>> With is meant to support VDR format as used on version 2.2. Not sure
>>>> if this format is backward-compatible with versions 1.x, but usually
>>>> VDR just adds new parameters to the lines.
>>>>
>>>> So, I'm inclined to merge Chris patch instead of yours.
>>>>
>>>> So, could you please test if his patch does what's needed?  
>>>
>>> PS.: If the formats for v 1.x are not compatible with the ones for
>>> v2.x, then the best would be to change the code to add a new format
>>> for vdr v2.x, while keep supporting vdr v1.x.  
>>
>> Hmm, I'am a bit confused about vdr's channel.conf v1.x and v2.x.
>>
>> I can't find any documentation on this and since there is no
>> version control system for vdr it is hard to dig the history.
> 
> Yeah, I see your pain.
> 
>> As far as I can see, Chris fixes an issue with DVB-T and the
>> issue with the leading ":".
>>
>> My patch fixes an issue with DVB-S/2 entry-location (and the
>> issue with the leading ":").
>>
>> I will give it a try to merge my changes on top of Chris's
>> patch and test DVB-T & DVB-S2 on my HTPC with an vdr server.

Thanks. I can't test DVB-S(2) so I decided to leave that part alone.

> 
> Ok, that would be great! it would also be good if either of you could
> take a look on how to allow libdvbv5 to support both VDR versions 1.x and
> 2.x. I don't use VDR here (afaikt, it doesn't support ISDB-T - and nowadays
> I only have DVB/ATSC via my RF test generators), but, IMHO, being able to
> provide output on both formats can be useful for other VDR users.
> 

Is supporting vdr v1.x necessary?

I believe v1.7.x were developer releases leading up to v2.0.
Last stable v1.x was 2012-02-14: Version 1.6.0-3. With v1.6.0 being from 2008!

Looks like v2.2.0 added parameters N, Q and X for S2 and T2. But libdvbv5 does
not currently appear to output these (at least Q and X for T2).

Chris


--
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


[v4l-utils PATCH v2] libdvbv5: Improve vdr format output for DVB-T(2)

2016-07-30 Thread Chris Mayo
Before (1.10.1):
BBC TWO:498000:S0B8C23D12I999M64T8G32Y0:T:27500:201:202,206:0:0:4287:0:0:0:
BBC TWO 
HD:474167:S1B8C23D999I999M256T32G128Y0:T:27500:101:102,106:0:0:17472:0:0:0:
After:
BBC TWO:498000:B8C23D12G32I999M64S0T8Y0:T:0:201:202,206:0:0:4287:0:0:0
BBC TWO 
HD:474167:B8C23D999G128I999M256S1T32Y0:T:27500:101:102,106:0:0:17472:0:0:0

channels.conf (vdr 2.2.0):
BBC 
TWO:49800:B8C23D12G32M64S0T8Y0:T:0:201=2:202=eng@3,206=eng@3:0;205=eng:0:4287:9018:4163:0
BBC TWO 
HD:474166670:C23G128M256P0Q16436S1T32X1Y0:T:27500:101=27:102=eng@17,106=eng@17:0;105=eng:0:17472:9018:16515:0

Signed-off-by: Chris Mayo 
---
 lib/libdvbv5/dvb-vdr-format.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/libdvbv5/dvb-vdr-format.c b/lib/libdvbv5/dvb-vdr-format.c
index a4bd26b..4377c81 100644
--- a/lib/libdvbv5/dvb-vdr-format.c
+++ b/lib/libdvbv5/dvb-vdr-format.c
@@ -198,26 +198,26 @@ static const struct dvb_parse_table sys_dvbs2_table[] = {
 };
 
 static const struct dvb_parse_table sys_dvbt_table[] = {
-   { DTV_DELIVERY_SYSTEM, PTABLE(vdr_parse_delivery_system) },
{ DTV_BANDWIDTH_HZ, PTABLE(vdr_parse_bandwidth) },
{ DTV_CODE_RATE_HP, PTABLE(vdr_parse_code_rate_hp) },
{ DTV_CODE_RATE_LP, PTABLE(vdr_parse_code_rate_lp) },
+   { DTV_GUARD_INTERVAL, PTABLE(vdr_parse_guard_interval) },
{ DTV_INVERSION, PTABLE(vdr_parse_inversion) },
{ DTV_MODULATION, PTABLE(vdr_parse_modulation) },
+   { DTV_DELIVERY_SYSTEM, PTABLE(vdr_parse_delivery_system) },
{ DTV_TRANSMISSION_MODE, PTABLE(vdr_parse_trans_mode) },
-   { DTV_GUARD_INTERVAL, PTABLE(vdr_parse_guard_interval) },
{ DTV_HIERARCHY, PTABLE(vdr_parse_hierarchy) },
 };
 
 static const struct dvb_parse_table sys_dvbt2_table[] = {
-   { DTV_DELIVERY_SYSTEM, PTABLE(vdr_parse_delivery_system) },
{ DTV_BANDWIDTH_HZ, PTABLE(vdr_parse_bandwidth) },
{ DTV_CODE_RATE_HP, PTABLE(vdr_parse_code_rate_hp) },
{ DTV_CODE_RATE_LP, PTABLE(vdr_parse_code_rate_lp) },
+   { DTV_GUARD_INTERVAL, PTABLE(vdr_parse_guard_interval) },
{ DTV_INVERSION, PTABLE(vdr_parse_inversion) },
{ DTV_MODULATION, PTABLE(vdr_parse_modulation) },
+   { DTV_DELIVERY_SYSTEM, PTABLE(vdr_parse_delivery_system) },
{ DTV_TRANSMISSION_MODE, PTABLE(vdr_parse_trans_mode) },
-   { DTV_GUARD_INTERVAL, PTABLE(vdr_parse_guard_interval) },
{ DTV_HIERARCHY, PTABLE(vdr_parse_hierarchy) },
/* DVB-T2 specifics */
{ DTV_STREAM_ID, NULL, },
@@ -367,6 +367,9 @@ int dvb_write_format_vdr(const char *fname,
/* Output symbol rate */
srate = 2750;
switch(delsys) {
+   case SYS_DVBT:
+   srate = 0;
+   break;
case SYS_DVBS:
case SYS_DVBS2:
case SYS_DVBC_ANNEX_A:
@@ -407,8 +410,8 @@ int dvb_write_format_vdr(const char *fname,
/* Output Service ID */
fprintf(fp, "%d:", entry->service_id);
 
-   /* Output SID, NID, TID and RID */
-   fprintf(fp, "0:0:0:");
+   /* Output NID, TID and RID */
+   fprintf(fp, "0:0:0");
 
fprintf(fp, "\n");
line++;
-- 
2.7.3

--
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


[v4l-utils PATCH] libdvbv5: Improve vdr format output for DVB-T(2)

2016-07-30 Thread Chris Mayo
Before (1.10.1):
BBC TWO:498000:S0B8C23D12I999M64T8G32Y0:T:27500:201:202,206:0:0:4287:0:0:0:
BBC TWO 
HD:474167:S1B8C23D999I999M256T32G128Y0:T:27500:101:102,106:0:0:17472:0:0:0:
After:
BBC TWO:498000:B8C23D12G32I999M64S0T8Y0:T:0:201:202,206:0:0:4287:0:0:0
BBC TWO 
HD:474167:B8C23D999G128I999M256S1T32Y0:T:27500:101:102,106:0:0:17472:0:0:0

channels.conf (vdr 2.2.0):
BBC 
TWO:49800:B8C23D12G32M64S0T8Y0:T:0:201=2:202=eng@3,206=eng@3:0;205=eng:0:4287:9018:4163:0
BBC TWO 
HD:474166670:C23G128M256P0Q16436S1T32X1Y0:T:27500:101=27:102=eng@17,106=eng@17:0;105=eng:0:17472:9018:16515:0

Signed-off-by: Chris Mayo 
---
 lib/libdvbv5/dvb-vdr-format.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/libdvbv5/dvb-vdr-format.c b/lib/libdvbv5/dvb-vdr-format.c
index a4bd26b..4377c81 100644
--- a/lib/libdvbv5/dvb-vdr-format.c
+++ b/lib/libdvbv5/dvb-vdr-format.c
@@ -198,26 +198,26 @@ static const struct dvb_parse_table sys_dvbs2_table[] = {
 };

 static const struct dvb_parse_table sys_dvbt_table[] = {
- { DTV_DELIVERY_SYSTEM, PTABLE(vdr_parse_delivery_system) },
  { DTV_BANDWIDTH_HZ, PTABLE(vdr_parse_bandwidth) },
  { DTV_CODE_RATE_HP, PTABLE(vdr_parse_code_rate_hp) },
  { DTV_CODE_RATE_LP, PTABLE(vdr_parse_code_rate_lp) },
+ { DTV_GUARD_INTERVAL, PTABLE(vdr_parse_guard_interval) },
  { DTV_INVERSION, PTABLE(vdr_parse_inversion) },
  { DTV_MODULATION, PTABLE(vdr_parse_modulation) },
+ { DTV_DELIVERY_SYSTEM, PTABLE(vdr_parse_delivery_system) },
  { DTV_TRANSMISSION_MODE, PTABLE(vdr_parse_trans_mode) },
- { DTV_GUARD_INTERVAL, PTABLE(vdr_parse_guard_interval) },
  { DTV_HIERARCHY, PTABLE(vdr_parse_hierarchy) },
 };

 static const struct dvb_parse_table sys_dvbt2_table[] = {
- { DTV_DELIVERY_SYSTEM, PTABLE(vdr_parse_delivery_system) },
  { DTV_BANDWIDTH_HZ, PTABLE(vdr_parse_bandwidth) },
  { DTV_CODE_RATE_HP, PTABLE(vdr_parse_code_rate_hp) },
  { DTV_CODE_RATE_LP, PTABLE(vdr_parse_code_rate_lp) },
+ { DTV_GUARD_INTERVAL, PTABLE(vdr_parse_guard_interval) },
  { DTV_INVERSION, PTABLE(vdr_parse_inversion) },
  { DTV_MODULATION, PTABLE(vdr_parse_modulation) },
+ { DTV_DELIVERY_SYSTEM, PTABLE(vdr_parse_delivery_system) },
  { DTV_TRANSMISSION_MODE, PTABLE(vdr_parse_trans_mode) },
- { DTV_GUARD_INTERVAL, PTABLE(vdr_parse_guard_interval) },
  { DTV_HIERARCHY, PTABLE(vdr_parse_hierarchy) },
  /* DVB-T2 specifics */
  { DTV_STREAM_ID, NULL, },
@@ -367,6 +367,9 @@ int dvb_write_format_vdr(const char *fname,
  /* Output symbol rate */
  srate = 2750;
  switch(delsys) {
+ case SYS_DVBT:
+ srate = 0;
+ break;
  case SYS_DVBS:
  case SYS_DVBS2:
  case SYS_DVBC_ANNEX_A:
@@ -407,8 +410,8 @@ int dvb_write_format_vdr(const char *fname,
  /* Output Service ID */
  fprintf(fp, "%d:", entry->service_id);

- /* Output SID, NID, TID and RID */
- fprintf(fp, "0:0:0:");
+ /* Output NID, TID and RID */
+ fprintf(fp, "0:0:0");

  fprintf(fp, "\n");
  line++;
-- 
2.7.3
--
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


[v4l-utils PATCH] man: Fix typos in dvbv5-scan dvbv5-zap pages

2015-12-27 Thread Chris Mayo
Signed-off-by: Chris Mayo 
---
 utils/dvb/dvbv5-scan.1.in | 2 +-
 utils/dvb/dvbv5-zap.1.in  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/dvb/dvbv5-scan.1.in b/utils/dvb/dvbv5-scan.1.in
index 8958ceb..e6fe3ee 100644
--- a/utils/dvb/dvbv5-scan.1.in
+++ b/utils/dvb/dvbv5-scan.1.in
@@ -172,7 +172,7 @@ New transponder/channel found: #39: 50700
 .fi
 .PP
 The scan process will then scan the other 38 discovered new transponders,
-and generate a dvb_channel.com with several entries with will have not only
+and generate a dvb_channel.conf with several entries with will have not only
 the physical channel/transponder info, but also the Service ID, and the
 corresponding audio/video/other program IDs (PID), like:
 .PP
diff --git a/utils/dvb/dvbv5-zap.1.in b/utils/dvb/dvbv5-zap.1.in
index 9bf2687..2445593 100644
--- a/utils/dvb/dvbv5-zap.1.in
+++ b/utils/dvb/dvbv5-zap.1.in
@@ -167,7 +167,7 @@ DVR interface '/dev/dvb/adapter0/dvr0' can now be opened
 The channel can be watched by playing the contents of the DVR interface,
 with some player that recognizes the MPEG\-TS format.
 .PP
-For example, this audio-only channel can be playew with mplayer:
+For example, this audio-only channel can be played with mplayer:
 .PP
 .nf
 $ \fBmplayer \-cache 800 /dev/dvb/adapter0/dvr0\fR
-- 
2.4.10

--
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: [linux-dvb] general protection fault: 0000 [1] SMP with 2.6.27 and 2.6.28

2009-02-02 Thread Chris Mayo
Andy Walls wrote:
> On Sun, 2009-02-01 at 23:38 +0100, Oliver Endriss wrote:
>> Andy Walls wrote:
>>> On Sat, 2009-01-31 at 15:01 +, Chris Mayo wrote:
> 
>>> So tuner_addr is non-NULL and is not a valid pointer either.
>>>
>>> It looks like linux/drivers/media/dvb/ttpci/budget.c:frontend_init() is
>>> setting the pointer up properly.  So something else is trashing the
>>> struct dvb_frontend structure pointed to by the variable fe.  Finding
>>> what's doing that will be difficult.
>>>
>>> Without a device nor steps to reliably reproduce, that's about all I can
>>> help with.
>>>
>>> Regards,
>>> Andy
>> Afaik this bug was fixed in changeset
>> http://linuxtv.org/hg/v4l-dvb/rev/f4d7d0b84940
>>
>> CU
>> Oliver
> 
> Thanks.  I didn't realize the initialization to NULL was a recent fix.
> I was looking at very recent v4l-dvb source code with that change in
> place (which is why I thought tracking down the problem would be hard).
> 
> I agree that that change likely fixes the problem, if Chris doesn't have
> it in place.
> 
> Regards,
> Andy
> 

I didn't have the patch (and hadn't seen it so seems a good advert for
merging the lists). Have applied it to 2.6.28 and OK so far. Thanks for
pointing it out and the investigation.

Chris
--
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