Re: [RFCv2 PATCH 4/6] videodev2.h: add frequency band information.

2012-06-23 Thread Hans de Goede

Hi,

On 06/22/2012 06:15 PM, Mauro Carvalho Chehab wrote:

Em 22-06-2012 11:07, Hans Verkuil escreveu:


snip


Reusing G_TUNER/S_TUNER or not, the issue is that a bitfield parameter for
frequency range is not actually able to express what are the supported
ranges. As I said before, the tuner ranges can only be properly expressed
by an array with:
- range low/high;
- modulation (AM, FM, ...);
- sub-carriers (mono, stereo, lang1, lang2);
- properties (RDS, seek caps, ...).


Agreed.

So, in my opinion we still need the band field, but instead of this being a
fixed band it is an index.

In order to enumerate over all bands I propose a new ioctl:

VIDIOC_ENUM_TUNER_BAND

with struct:

struct v4l2_tuner_band {
__u32 tuner;
__u32 index;
char name[32];
__u32 capability;   /* The same as in v4l2_tuner */
__u32 rangelow;
__u32 rangehigh;
__u32 reserved[7];
};

It enumerates the supported bands by the tuner, each with a human readable name,
frequency range and capabilities.

If you change the band using S_TUNER, then G_TUNER will return the frequency 
range
and capabilities from the corresponding v4l2_tuner_band struct.

The only capability that needs to be added is one that tells the application 
that
the tuner has the capability to do band enumeration (V4L2_TUNER_CAP_HAS_BANDS or
something).

I am not 100% certain about the name field: it is very nice for apps, but we do
need some guidelines here.

A similar struct would be needed for modulators if we ever need to add support 
for
modulators with multiple bands.

We could perhaps rename v4l2_tuner_band to just v4l2_band to make it 
tuner/modulator
agnostic.


I've not replied before because I've been thinking about Hans V's proposal for 
a bit,
I've come to the conclusion that Hans V's proposal is better, because it avoids 
a
discrepancy in how tuners work between tv and radio, which is something which 
worried
me about my own proposal. Hans V's proposal also has the benefit that it will 
work fine
for tv-tuners too, so if we ever need bands for tv tuners we can use the *same* 
API.


The above proposal would be great if we were starting to write the radio API 
today, but
your proposal is not backward compatible with the status quo.


Huh? Hans V. is proposing adding a band field to the tuner struct (using one of 
the
reserved fields) and adding a new ioctl to enumerate bands. Old apps will have 
that field
set to 0 on a S_TUNER, selecting band 0, and G_TUNER will give info on the 
current band,
where-as S/G_FREQ will be unmodified (they will work on the current band). I 
don't see how
this breaks current apps...

Anyways both proposals seem workable to me, although I prefer Hans V.'s one. 
Lets just pick
one and get on with this.

Regards,

Hans






Regards,
Mauro



--
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: [PATCH] omap3isp: preview: Add support for non-GRBG Bayer patterns

2012-06-23 Thread Sakari Ailus
Hi Laurent,

On Mon, Jun 18, 2012 at 04:30:53PM +0200, Laurent Pinchart wrote:
 Rearrange the CFA interpolation coefficients table based on the Bayer
 pattern. Modifying the table during streaming isn't supported anymore,
 but didn't make sense in the first place anyway.

Why not? I could imagine someone might want to change the table while
streaming to change the white balance, for example. Gamma tables or the SRGB
matrix can be used to do mostly the same but we should leave the decision
which one to use to the user space.

 Support for non-Bayer CFA patterns is dropped as they were not correctly
 supported, and have never been tested.
 
 Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
 ---
  drivers/media/video/omap3isp/isppreview.c |  118 
  1 files changed, 67 insertions(+), 51 deletions(-)
 
 Jean-Philippe,
 
 Could you please test this patch on your hardware ?
 
 diff --git a/drivers/media/video/omap3isp/isppreview.c 
 b/drivers/media/video/omap3isp/isppreview.c
 index 8a4935e..bfa3107 100644
 --- a/drivers/media/video/omap3isp/isppreview.c
 +++ b/drivers/media/video/omap3isp/isppreview.c
 @@ -309,36 +309,6 @@ preview_config_dcor(struct isp_prev_device *prev, const 
 void *prev_dcor)
  }
  
  /*
 - * preview_config_cfa - Configures the CFA Interpolation parameters.
 - * @prev_cfa: Structure containing the CFA interpolation table, CFA format
 - *in the image, vertical and horizontal gradient threshold.
 - */
 -static void
 -preview_config_cfa(struct isp_prev_device *prev, const void *prev_cfa)
 -{
 - struct isp_device *isp = to_isp_device(prev);
 - const struct omap3isp_prev_cfa *cfa = prev_cfa;
 - unsigned int i;
 -
 - isp_reg_clr_set(isp, OMAP3_ISP_IOMEM_PREV, ISPPRV_PCR,
 - ISPPRV_PCR_CFAFMT_MASK,
 - cfa-format  ISPPRV_PCR_CFAFMT_SHIFT);
 -
 - isp_reg_writel(isp,
 - (cfa-gradthrs_vert  ISPPRV_CFA_GRADTH_VER_SHIFT) |
 - (cfa-gradthrs_horz  ISPPRV_CFA_GRADTH_HOR_SHIFT),
 - OMAP3_ISP_IOMEM_PREV, ISPPRV_CFA);
 -
 - isp_reg_writel(isp, ISPPRV_CFA_TABLE_ADDR,
 -OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_ADDR);
 -
 - for (i = 0; i  OMAP3ISP_PREV_CFA_TBL_SIZE; i++) {
 - isp_reg_writel(isp, cfa-table[i],
 -OMAP3_ISP_IOMEM_PREV, ISPPRV_SET_TBL_DATA);
 - }
 -}
 -
 -/*
   * preview_config_gammacorrn - Configures the Gamma Correction table values
   * @gtable: Structure containing the table for red, blue, green gamma table.
   */
 @@ -813,7 +783,7 @@ static const struct preview_update update_attrs[] = {
   FIELD_SIZEOF(struct prev_params, hmed),
   offsetof(struct omap3isp_prev_update_config, hmed),
   }, /* OMAP3ISP_PREV_CFA */ {
 - preview_config_cfa,
 + NULL,
   NULL,
   offsetof(struct prev_params, cfa),
   FIELD_SIZEOF(struct prev_params, cfa),
 @@ -1043,42 +1013,88 @@ preview_config_ycpos(struct isp_prev_device *prev,
  static void preview_config_averager(struct isp_prev_device *prev, u8 average)
  {
   struct isp_device *isp = to_isp_device(prev);
 - struct prev_params *params;
 - int reg = 0;
  
 - params = (prev-params.active  OMAP3ISP_PREV_CFA)
 -? prev-params.params[0] : prev-params.params[1];
 -
 - if (params-cfa.format == OMAP3ISP_CFAFMT_BAYER)
 - reg = ISPPRV_AVE_EVENDIST_2  ISPPRV_AVE_EVENDIST_SHIFT |
 -   ISPPRV_AVE_ODDDIST_2  ISPPRV_AVE_ODDDIST_SHIFT |
 -   average;
 - else if (params-cfa.format == OMAP3ISP_CFAFMT_RGBFOVEON)
 - reg = ISPPRV_AVE_EVENDIST_3  ISPPRV_AVE_EVENDIST_SHIFT |
 -   ISPPRV_AVE_ODDDIST_3  ISPPRV_AVE_ODDDIST_SHIFT |
 -   average;
 - isp_reg_writel(isp, reg, OMAP3_ISP_IOMEM_PREV, ISPPRV_AVE);
 + isp_reg_writel(isp, ISPPRV_AVE_EVENDIST_2  ISPPRV_AVE_EVENDIST_SHIFT |
 +ISPPRV_AVE_ODDDIST_2  ISPPRV_AVE_ODDDIST_SHIFT |
 +average, OMAP3_ISP_IOMEM_PREV, ISPPRV_AVE);
  }
  
 +
 +#define OMAP3ISP_PREV_CFA_BLK_SIZE   (OMAP3ISP_PREV_CFA_TBL_SIZE / 4)
 +
  /*
   * preview_config_input_format - Configure the input format
   * @prev: The preview engine
   * @format: Format on the preview engine sink pad
   *
 - * Enable CFA interpolation for Bayer formats and disable it for greyscale
 - * formats.
 + * Enable and configure CFA interpolation for Bayer formats and disable it 
 for
 + * greyscale formats.
 + *
 + * The CFA table is organised in four blocks, one per Bayer component. The
 + * hardware expects blocks to follow the Bayer order of the input data, while
 + * the driver stores the table in GRBG order in memory. The blocks need to be
 + * reordered to support non-GRBG Bayer patterns.
   */
  static void preview_config_input_format(struct isp_prev_device *prev,
   const 

Re: [git:v4l-dvb/for_v3.6] [media] radio: Add Sanyo LM7000 tuner driver

2012-06-23 Thread Hans Verkuil
Hi Mauro,

You accidentally merged the wrong first version of the lm7000 patch series.

These are the correct second version patches:

http://patchwork.linuxtv.org/patch/11689/
http://patchwork.linuxtv.org/patch/11690/
http://patchwork.linuxtv.org/patch/11691/

The second version is much simpler and doesn't require the creation of a whole
new driver.

Can you revert the old version and apply the correct one?

Thanks!

Hans

On Thu June 21 2012 17:12:03 Mauro Carvalho Chehab wrote:
 This is an automatic generated email to let you know that the following patch 
 were queued at the 
 http://git.linuxtv.org/media_tree.git tree:
 
 Subject: [media] radio: Add Sanyo LM7000 tuner driver
 Author:  Ondrej Zary li...@rainbow-software.org
 Date:Tue Jun 12 14:37:54 2012 -0300
 
 Add very simple driver for Sanyo LM7000 AM/FM tuner chip. Only FM is supported
 as there is no known HW with AM implemented.
 
 This will be used by radio-aimslab and radio-sf16fmi.
 
 Signed-off-by: Ondrej Zary li...@rainbow-software.org
 Acked-by: Hans Verkuil hans.verk...@cisco.com
 Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com
 
  drivers/media/radio/Kconfig  |3 ++
  drivers/media/radio/Makefile |1 +
  drivers/media/radio/lm7000.c |   52 
 ++
  drivers/media/radio/lm7000.h |   32 +
  4 files changed, 88 insertions(+), 0 deletions(-)
 
 ---
 
 http://git.linuxtv.org/media_tree.git?a=commitdiff;h=4ecbb69414c61af3594209e081d6e834ea68a16d
 
 diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
 index c257da1..5bcce12 100644
 --- a/drivers/media/radio/Kconfig
 +++ b/drivers/media/radio/Kconfig
 @@ -191,6 +191,9 @@ config RADIO_CADET
 To compile this driver as a module, choose M here: the
 module will be called radio-cadet.
  
 +config RADIO_LM7000
 + tristate
 +
  config RADIO_RTRACK
   tristate AIMSlab RadioTrack (aka RadioReveal) support
   depends on ISA  VIDEO_V4L2
 diff --git a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile
 index ca8c7d1..7f6aa63 100644
 --- a/drivers/media/radio/Makefile
 +++ b/drivers/media/radio/Makefile
 @@ -28,5 +28,6 @@ obj-$(CONFIG_RADIO_TEF6862) += tef6862.o
  obj-$(CONFIG_RADIO_TIMBERDALE) += radio-timb.o
  obj-$(CONFIG_RADIO_WL1273) += radio-wl1273.o
  obj-$(CONFIG_RADIO_WL128X) += wl128x/
 +obj-$(CONFIG_RADIO_LM7000) += lm7000.o
  
  ccflags-y += -Isound
 diff --git a/drivers/media/radio/lm7000.c b/drivers/media/radio/lm7000.c
 new file mode 100644
 index 000..681f3af
 --- /dev/null
 +++ b/drivers/media/radio/lm7000.c
 @@ -0,0 +1,52 @@
 +/* Sanyo LM7000 tuner chip driver
 + *
 + * Copyright 2012 Ondrej Zary li...@rainbow-software.org
 + * based on radio-aimslab.c by M. Kirkwood
 + * and radio-sf16fmi.c by M. Kirkwood and Petr Vandrovec
 + */
 +
 +#include linux/delay.h
 +#include linux/module.h
 +#include lm7000.h
 +
 +MODULE_AUTHOR(Ondrej Zary li...@rainbow-software.org);
 +MODULE_DESCRIPTION(Routines for Sanyo LM7000 AM/FM radio tuner chip);
 +MODULE_LICENSE(GPL);
 +
 +/* write the 24-bit register, starting with LSB */
 +static void lm7000_write(struct lm7000 *lm, u32 val)
 +{
 + int i;
 + u8 data;
 +
 + for (i = 0; i  24; i++) {
 + data = val  (1  i) ? LM7000_DATA : 0;
 + lm-set_pins(lm, data | LM7000_CE);
 + udelay(2);
 + lm-set_pins(lm, data | LM7000_CE | LM7000_CLK);
 + udelay(2);
 + lm-set_pins(lm, data | LM7000_CE);
 + udelay(2);
 + }
 + lm-set_pins(lm, 0);
 +}
 +
 +void lm7000_set_freq(struct lm7000 *lm, u32 freq)
 +{
 + freq += 171200; /* Add 10.7 MHz IF */
 + freq /= 400;/* Convert to 25 kHz units */
 + lm7000_write(lm, freq | LM7000_FM_25 | LM7000_BIT_FM);
 +}
 +EXPORT_SYMBOL(lm7000_set_freq);
 +
 +static int __init lm7000_module_init(void)
 +{
 + return 0;
 +}
 +
 +static void __exit lm7000_module_exit(void)
 +{
 +}
 +
 +module_init(lm7000_module_init)
 +module_exit(lm7000_module_exit)
 diff --git a/drivers/media/radio/lm7000.h b/drivers/media/radio/lm7000.h
 new file mode 100644
 index 000..a5bc7d6
 --- /dev/null
 +++ b/drivers/media/radio/lm7000.h
 @@ -0,0 +1,32 @@
 +#ifndef __LM7000_H
 +#define __LM7000_H
 +
 +#define LM7000_DATA  (1  0)
 +#define LM7000_CLK   (1  1)
 +#define LM7000_CE(1  2)
 +
 +#define LM7000_FREQ_MASK 0x3fff
 +#define LM7000_BIT_T0(1  14)
 +#define LM7000_BIT_T1(1  15)
 +#define LM7000_BIT_B0(1  16)
 +#define LM7000_BIT_B1(1  17)
 +#define LM7000_BIT_B2(1  18)
 +#define LM7000_BIT_TB(1  19)
 +#define LM7000_FM_100(0  20)
 +#define LM7000_FM_50 (1  20)
 +#define LM7000_FM_25 (2  20)
 +#define LM7000_AM_5  (3  20)
 +#define LM7000_AM_10 (4  20)
 +#define LM7000_AM_9  (5  20)
 +#define LM7000_AM_1  (6  20)
 +#define LM7000_AM_5_ (7  20)
 +#define LM7000_BIT_FM(1  23)
 +
 +
 +struct lm7000 {
 + void 

Re: [PATCH] [media] videobuf-dma-contig: restore buffer mapping for uncached bufers

2012-06-23 Thread Hans Verkuil
On Fri June 22 2012 18:53:27 Federico Vaga wrote:
 In data venerdì 22 giugno 2012 18:45:31, Hans Verkuil ha scritto:
  On Fri June 22 2012 17:28:04 Federico Vaga wrote:
from commit a8f3c203e19b702fa5e8e83a9b6fb3c5a6d1cce4
restore the mapping scheme for uncached buffers,
which was changed in a common scheme for cached and uncached.
This apparently was wrong, and was probably intended only for
cached
buffers. the fix fixes the crash observed while mapping uncached
buffers.

Signed-off-by: Lad, Prabhakar prabhakar@ti.com
Signed-off-by: Hadli, Manjunath manjunath.ha...@ti.com
   
   Acked-by: Federico Vaga federico.v...@gmail.com
   
   I tested the patch on the STA2X11 board.
  
  Was this patch ever posted on linux-media? I didn't see it on the
  mailinglist, nor in my personal inbox.
  
  Perhaps something went wrong?
 
 I recived the email as CC and linux-media was the main destination.
 Davinci list was also added as CC and you can find the patch there:
 
 http://www.mail-archive.com/davinci-linux-open-
 sou...@linux.davincidsp.com/msg22998.html
 
 Something went wrong.

Weird, it never ended up at the linux-media mailinglist (not just me, it's
not in the linux-media archives either).

Anyway, I'll test this on Monday and if it works fine for me as well I'll Ack 
it.

Regards,

Hans
--
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: Skystar HD2 / mantis status?

2012-06-23 Thread Bernhard Stegmaier
Hi,

I'm also running a stock 3.2 kernel with mythtv and a SkyStar HD2.
It is fine for both DVB-S and DVB-S2 (on Astra).

Only thing I had to do is to increase lock timeouts quite a bit.
Default mythtv values were too small so I got no locks.


Regards,
Bernhard
 
On 23.06.2012, at 01:54, Andrew Hakman wrote:

 What is the status of the Skystar HD2 / Mantis driver? I am running
 kernel 3.2-4, and the card tunes DVB-S fine, but gives a transport
 stream with a ton of errors when tuning DVB-S2. Is there a driver that
 actually works with this card properly, or is the card just useless
 for DVB-S2 in linux?
 --
 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

--
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: Skystar HD2 / mantis status?

2012-06-23 Thread walou
Hi,
i have problems with this card too.
Im on ubuntu 10.04 with kernel 2.6.35 and im using the last linux-media build.
Pictures are constantly saccaded.
On vdr 1.7.22 dvb-s works little bit better than dvb-s2 but saccades are still 
there. And strangely, the signal is always on 0%.
Any idea about that ?--
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


[PATCH] dvb-core: Release semaphore on error path dvb_register_device().

2012-06-23 Thread santosh nayak
From: Santosh Nayak santoshprasadna...@gmail.com

There is a missing up_write() here. Semaphore should be released
before returning error value.

Signed-off-by: Santosh Nayak santoshprasadna...@gmail.com
---
Destination tree linux-next

 drivers/media/dvb/dvb-core/dvbdev.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvbdev.c 
b/drivers/media/dvb/dvb-core/dvbdev.c
index 00a6732..39eab73 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -243,6 +243,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct 
dvb_device **pdvbdev,
if (minor == MAX_DVB_MINORS) {
kfree(dvbdevfops);
kfree(dvbdev);
+   up_write(minor_rwsem);
mutex_unlock(dvbdev_register_lock);
return -EINVAL;
}
-- 
1.7.4.4

--
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: stk1160 linux driver

2012-06-23 Thread Ezequiel Garcia
Hi Gianluca,

On Fri, Jun 22, 2012 at 9:00 AM, Gianluca Bergamo
gianluca.berg...@gmail.com wrote:

 I've patched my kernel 3.0.8 and it compiles without problems.
 I've compiled it NOT as a module but directly built in in the kernel.


I just patched a vanilla 3.0.8 (taken from stable repository) with
stk1160 driver
patch and I believe this kernel is too old.

Are you using stock kernel 3.0.8? Are you sure it compiled without any
warnings and/or errors?
I got some missing symbol warnings here when compiling the driver.
This symbols are needed so the driver won't work.

Is it possible for you to try with a 3.3 (or above) kernel?

Thanks,
Ezequiel.
--
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: hdpvr lockup with audio dropouts

2012-06-23 Thread sitten74490
On 2012-06-09 10:31:36 -0400, sitten74...@mypacks.net wrote:
 
 On Thu, Jun 7, 2012 at 7:53 PM,  sitten74...@mypacks.net wrote:
  Apparently there is a known issue where the HD-PVR cannot handle the loss
  of audio signal over SPDIF while recording.  If this happens, the unit
  locks up requiring it to be power cycled before it can be used again. This
  behavior can easily be reproduced by pulling the SPDIF cable during
  recording.  My question is this:  are there any changes that could be made
  to the hdpvr driver that would make it more tolerant of brief audio
  dropouts?
 
 Does it do this under Windows?  If it does, then call Hauppauge and get them
 to fix it (and if that results in a firmware fix, then it will help Linux
 too).  If it works under Windows, then we know it's some sort of driver
 issue which would be needed.
 
 It's always good when it's readily reproducible.  :-)
 
 
 Well, I tested it in Windows and no, the HD-PVR does not lock up when the
 audio signal is lost.  It does pause, but when the signal comes back it
 resumes playing normally.  So if I understand you correctly, this would most
 likely be a Linux driver bug rather than a firmware problem.

Yes, it's a driver bug (although iirc the device locked up when I wrote
the driver). If you have usb traffic logs from the windows driver I'll
look at them. If not I'll try to set my hdpvr up in the next days.

Janne

Here's a link to a USB traffic capture I made with USBlyzer 
(http://www.usblyzer.com/):

https://dl.dropbox.com/u/5664816/hdpvr.ulz

I disconnected the SPDIF cable several seconds into the capture and then 
reconnected several seconds later.
If you need the capture in a different format, please let me know.  Thanks for 
your help.

Jonathan



--
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: stk1160 linux driver

2012-06-23 Thread Ezequiel Garcia
On Sat, Jun 23, 2012 at 10:51 AM, Gianluca Bergamo
gianluca.berg...@gmail.com wrote:

 I've found the problem. Your module is lacking the init and exit module
 functions.
 You are using :

 module_usb_driver(stk1160_usb_driver);

Indeed.


 That has been introduced in kernel 3.3 and so in my kernel 3.0.8 it does not
 give compiler error (I don't know why) but the probe method is never called.

That's weird, I got a bunch of warnings. Compilers are sometimes crazy :-)

 I've added the init and exit methods by myself and the probe now works.


Great! Keep in mind I wrote this driver on newer kernels so I don't know
what other kinds of trouble you may bump into.

 My problem now is that I got out of memory errors when testing it with
 yavta.
 BTW, I'm using this driver on an Android 4 ARM device.

What kind of out of memory errors? dmesg?
How many memory do you have on your device?

Currently stk1160 dallocate memory for usb transfer buffers on every stop
and has to reallocate on every start.

This approach is not very smart, as fragments memory without reason.
You can take a look at a similar problem on em28xx driver and a patch proposed:

http://patchwork.linuxtv.org/patch/9875/

I'm not telling you this is your problem, but could be.
Anyway, feel free to:
* provide more info
* ask me questions
* ask for patches

 Now I don't have the patch I've made in my hand...but on monday I will send
 it to you.


Okey. I guess I could start a github repo to host a 3.0.8 tree with
the stk1160 driver
if that helps you.

Regards,
Ezequiel.
--
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: stk1160 linux driver

2012-06-23 Thread Ezequiel Garcia
On Sat, Jun 23, 2012 at 11:11 AM, Gianluca Bergamo
gianluca.berg...@gmail.com wrote:
 I think you can simply make a patch to make it work also with kernels  3.3.
 Let's talk about this on monday...now I don't have my development pc with me
 so I can't see the code and the dbg messages.

Okey, let's talk on monday.

Regards,
Ezequiel.
--
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: stk1160 linux driver

2012-06-23 Thread Ezequiel Garcia
Hi Gianluca,

On Sat, Jun 23, 2012 at 10:51 AM, Gianluca Bergamo
gianluca.berg...@gmail.com wrote:
 You are using :

 module_usb_driver(stk1160_usb_driver);

 That has been introduced in kernel 3.3 and so in my kernel 3.0.8 it does not
 give compiler error (I don't know why) but the probe method is never called.
 I've added the init and exit methods by myself and the probe now works.


I think you might want to take a look to media_build:

http://git.linuxtv.org/media_build.git
http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

This allows latest drivers to be built against old kernels.

A backward-compatible solution for stk1160 wouldn't be accepted mainline,
but feel free to use (in a personal fashion)
your patched driver and/or ask me to review your patch.

Unfortunately, you'll have to patch yourself each time I release a new
driver version,
so you may wan to try media_build as I previously suggested.

Hope this helps,
Ezequiel.
--
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


[PATCH 0/3] ir-keytable: Smarter keytable location handling

2012-06-23 Thread Gregor Jasny
Hello,

this patchset will improve the keytable location handling of
ir-keytable. In controst to the default install location
(/etc/rc_keymaps) Debian and Ubuntu installed the shipped
keymaps into /lib/udev/rc_keymaps (just like keyboard keymaps
are installed into /lib/udev/keymaps). If a keymap needs to
be modified it's supposed to go into /etc/rc_keymaps.

The current ir-keytable program knows only about a single default
keytable directory. This patchset makes ir-keytable aware of a
system and user keytable directory. The user directory is searched
first, followed by a the system directory if no file was found.

Mauro, are you OK with committing?

Thanks,
Gregor

Gregor Jasny (3):
  keytable: Make udev rules dir configurable
  keytable: Preinstall keytables relative to sysconfdir
  keytable: first search table in userdir, then in systemdir

 configure.ac   |   15 +++
 utils/keytable/Makefile.am |8 
 utils/keytable/keytable.c  |   30 +-
 3 files changed, 36 insertions(+), 17 deletions(-)

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


[PATCH 1/3] keytable: Make udev rules dir configurable

2012-06-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 configure.ac   |7 +--
 utils/keytable/Makefile.am |1 -
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8e166b1..1a12abd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,13 +145,16 @@ AC_ARG_WITH(libv4l2subdir, 
AS_HELP_STRING(--with-libv4l2subdir=DIR,set libv4l2 l
 AC_ARG_WITH(libv4lconvertsubdir, 
AS_HELP_STRING(--with-libv4lconvertsubdir=DIR,set libv4lconvert library subdir 
[default=libv4l]),
libv4lconvertsubdir=$withval, libv4lconvertsubdir=libv4l)
 
+AC_ARG_WITH(udevdir, AS_HELP_STRING(--with-udevdir=DIR,set udev directory 
[default=/lib/udev]),
+   udevdir=$withval, udevdir=/lib/udev)
+
 libv4l1privdir=$libdir/$libv4l1subdir
 libv4l2privdir=$libdir/$libv4l2subdir
 libv4l2plugindir=$libv4l2privdir/plugins
 libv4lconvertprivdir=$libdir/$libv4lconvertsubdir
 
 rootetcdir=/etc
-rootlibdir=/lib
+udevrulesdir=$udevdir/rules.d
 pkgconfigdir=$libdir/pkgconfig
 
 AC_SUBST(libv4l1privdir)
@@ -159,7 +162,7 @@ AC_SUBST(libv4l2privdir)
 AC_SUBST(libv4l2plugindir)
 AC_SUBST(libv4lconvertprivdir)
 AC_SUBST(rootetcdir)
-AC_SUBST(rootlibdir)
+AC_SUBST(udevrulesdir)
 AC_SUBST(pkgconfigdir)
 
 AC_DEFINE_UNQUOTED([V4L_UTILS_VERSION], [$PACKAGE_VERSION], [v4l-utils 
version string])
diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am
index 0321a57..3d510e0 100644
--- a/utils/keytable/Makefile.am
+++ b/utils/keytable/Makefile.am
@@ -1,4 +1,3 @@
-udevrulesdir=/lib/udev/rules.d
 rootetcdir=/etc
 
 bin_PROGRAMS = ir-keytable
-- 
1.7.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


[PATCH 2/3] keytable: Preinstall keytables relative to sysconfdir

2012-06-23 Thread Gregor Jasny
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 configure.ac   |5 +++--
 utils/keytable/Makefile.am |5 ++---
 utils/keytable/keytable.c  |7 ++-
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1a12abd..661eb20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,7 +153,7 @@ libv4l2privdir=$libdir/$libv4l2subdir
 libv4l2plugindir=$libv4l2privdir/plugins
 libv4lconvertprivdir=$libdir/$libv4lconvertsubdir
 
-rootetcdir=/etc
+keytablesystemdir=$sysconfdir/rc_keymaps
 udevrulesdir=$udevdir/rules.d
 pkgconfigdir=$libdir/pkgconfig
 
@@ -161,7 +161,7 @@ AC_SUBST(libv4l1privdir)
 AC_SUBST(libv4l2privdir)
 AC_SUBST(libv4l2plugindir)
 AC_SUBST(libv4lconvertprivdir)
-AC_SUBST(rootetcdir)
+AC_SUBST(keytablesystemdir)
 AC_SUBST(udevrulesdir)
 AC_SUBST(pkgconfigdir)
 
@@ -170,6 +170,7 @@ AC_DEFINE_DIR([LIBV4L1_PRIV_DIR], [libv4l1privdir], 
[libv4l1 private lib directo
 AC_DEFINE_DIR([LIBV4L2_PRIV_DIR], [libv4l2privdir], [libv4l2 private lib 
directory])
 AC_DEFINE_DIR([LIBV4L2_PLUGIN_DIR], [libv4l2plugindir], [libv4l2 plugin 
directory])
 AC_DEFINE_DIR([LIBV4LCONVERT_PRIV_DIR], [libv4lconvertprivdir], [libv4lconvert 
private lib directory])
+AC_DEFINE_DIR([IR_KEYTABLE_SYSTEM_DIR], [keytablesystemdir], [ir-keytable 
preinstalled tables directory])
 
 # options
 
diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am
index 3d510e0..4505fc1 100644
--- a/utils/keytable/Makefile.am
+++ b/utils/keytable/Makefile.am
@@ -1,8 +1,7 @@
-rootetcdir=/etc
-
 bin_PROGRAMS = ir-keytable
 man_MANS = ir-keytable.1
-nobase_rootetc_DATA = rc_maps.cfg $(srcdir)/rc_keymaps/*
+sysconf_DATA = rc_maps.cfg
+keytablesystem_DATA = $(srcdir)/rc_keymaps/*
 udevrules_DATA = 70-infrared.rules
 
 ir_keytable_SOURCES = keytable.c parse.h
diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
index fbf9c03..31376f3 100644
--- a/utils/keytable/keytable.c
+++ b/utils/keytable/keytable.c
@@ -28,9 +28,6 @@
 
 #include parse.h
 
-/* Default place where the keymaps will be stored */
-#define CFGDIR /etc/rc_keymaps
-
 struct input_keymap_entry_v2 {
 #define KEYMAP_BY_INDEX(1  0)
u_int8_t  flags;
@@ -1516,8 +1513,8 @@ int main(int argc, char *argv[])
if (cur-fname[0] == '/' || ((cur-fname[0] == '.')  
strchr(cur-fname, '/'))) {
fname = cur-fname;
} else {
-   fname = malloc(strlen(cur-fname) + strlen(CFGDIR) + 2);
-   strcpy(fname, CFGDIR);
+   fname = malloc(strlen(cur-fname) + 
strlen(IR_KEYTABLE_SYSTEM_DIR) + 2);
+   strcpy(fname, IR_KEYTABLE_SYSTEM_DIR);
strcat(fname, /);
strcat(fname, cur-fname);
}
-- 
1.7.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: [PATCH] dvb-core: Release semaphore on error path dvb_register_device().

2012-06-23 Thread Nikolaus Schulz
CC'ing sta...@kernel.org, this bugfix applies to all kernels  2.6.28.

The patch should also be tagged accordingly.

On Sat, Jun 23, 2012 at 05:29:54PM +0530, santosh nayak wrote:
 From: Santosh Nayak santoshprasadna...@gmail.com
 
 There is a missing up_write() here. Semaphore should be released
 before returning error value.
 
 Signed-off-by: Santosh Nayak santoshprasadna...@gmail.com
 ---
 Destination tree linux-next
 
  drivers/media/dvb/dvb-core/dvbdev.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/media/dvb/dvb-core/dvbdev.c 
 b/drivers/media/dvb/dvb-core/dvbdev.c
 index 00a6732..39eab73 100644
 --- a/drivers/media/dvb/dvb-core/dvbdev.c
 +++ b/drivers/media/dvb/dvb-core/dvbdev.c
 @@ -243,6 +243,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct 
 dvb_device **pdvbdev,
   if (minor == MAX_DVB_MINORS) {
   kfree(dvbdevfops);
   kfree(dvbdev);
 + up_write(minor_rwsem);
   mutex_unlock(dvbdev_register_lock);
   return -EINVAL;
   }
 -- 
 1.7.4.4
--
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


cron job: media_tree daily build: ERRORS

2012-06-23 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:Sat Jun 23 19:00:20 CEST 2012
git hash:5472d3f17845c4398c6a510b46855820920c2181
gcc version:  i686-linux-gcc (GCC) 4.7.1
host hardware:x86_64
host os:  3.4.07-marune

linux-git-arm-eabi-davinci: WARNINGS
linux-git-arm-eabi-exynos: WARNINGS
linux-git-arm-eabi-omap: WARNINGS
linux-git-i686: WARNINGS
linux-git-m32r: WARNINGS
linux-git-mips: WARNINGS
linux-git-powerpc64: WARNINGS
linux-git-x86_64: WARNINGS
linux-2.6.31.12-x86_64: WARNINGS
linux-2.6.32.6-x86_64: WARNINGS
linux-2.6.33-x86_64: WARNINGS
linux-2.6.34-x86_64: WARNINGS
linux-2.6.35.3-x86_64: WARNINGS
linux-2.6.36-x86_64: WARNINGS
linux-2.6.37-x86_64: WARNINGS
linux-2.6.38.2-x86_64: WARNINGS
linux-2.6.39.1-x86_64: WARNINGS
linux-3.0-x86_64: WARNINGS
linux-3.1-x86_64: WARNINGS
linux-3.2.1-x86_64: WARNINGS
linux-3.3-x86_64: WARNINGS
linux-3.4-x86_64: WARNINGS
linux-2.6.31.12-i686: WARNINGS
linux-2.6.32.6-i686: WARNINGS
linux-2.6.33-i686: WARNINGS
linux-2.6.34-i686: WARNINGS
linux-2.6.35.3-i686: WARNINGS
linux-2.6.36-i686: WARNINGS
linux-2.6.37-i686: WARNINGS
linux-2.6.38.2-i686: WARNINGS
linux-2.6.39.1-i686: WARNINGS
linux-3.0-i686: WARNINGS
linux-3.1-i686: WARNINGS
linux-3.2.1-i686: WARNINGS
linux-3.3-i686: WARNINGS
linux-3.4-i686: WARNINGS
apps: ERRORS
spec-git: WARNINGS
sparse: ERRORS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.tar.bz2

The V4L-DVB specification from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
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: DiBcom adapter problems

2012-06-23 Thread Choi Wing Chan
the patch correct the error about no support system, however, my card
still can not scan any channels.

[ 2458.524854] set_delivery_system() Using delivery system 13 emulated
as if it were a 3
[ 2458.524855] change delivery system on cache to 13
[ 2458.524857] dvbv3_type : delivery_system = 13
[ 2458.524858] dtv_property_cache_sync() Preparing OFDM req
[ 2458.524859] dvbv3_type : delivery_system = 13
[ 2458.524860] dtv_property_legacy_params_sync() Preparing OFDM req
[ 2458.524861] dvb_frontend_add_event
[ 2458.524896] dvb_frontend_swzigzag_autotune: drift:0 inversion:0
auto_step:0 auto_sub_step:0 started_auto_step:0
[ 2458.524899] lgs8gxx: lgs8gxx_set_fe
[ 2458.525608] xc5000: delivery system is not supported!
[ 2458.525610] lgs8gxx: lgs8gxx_auto_detect
[ 2458.527558] lgs8gxx: try GI 945
[ 2458.724898] dvb_frontend_ioctl (69)
[ 2460.670065] lgs8gxx: try GI 945
[ 2462.812594] lgs8gxx: try GI 420
[ 2464.955133] lgs8gxx: try GI 420
[ 2467.097660] lgs8gxx: try GI 595
[ 2469.240181] lgs8gxx: try GI 945
[ 2471.382719] lgs8gxx: try GI 945
[ 2473.525253] lgs8gxx: try GI 420
[ 2475.667781] lgs8gxx: try GI 420
[ 2477.810317] lgs8gxx: try GI 595
[ 2479.952853] lgs8gxx: lgs8gxx_auto_detect failed
[ 2480.067822] lgs8gxx: lgs8gxx_read_status
[ 2480.069688] lgs8gxx: AFC = 5469 kHz
[ 2480.070629] lgs8gxx: Reg 0x4B: 0x02
[ 2480.070630] lgs8gxx: lgs8gxx_read_status: fe_status=0x0
[ 2480.270678] dvb_frontend_ioctl (69)
[ 2480.270680] lgs8gxx: lgs8gxx_read_status
[ 2480.272562] lgs8gxx: AFC = 5649 kHz
[ 2480.273504] lgs8gxx: Reg 0x4B: 0x02
[ 2480.273505] lgs8gxx: lgs8gxx_read_status: fe_status=0x0
[ 2480.473548] dvb_frontend_ioctl (69)
[ 2480.473553] lgs8gxx: lgs8gxx_read_status
[ 2480.475438] lgs8gxx: AFC = 5579 kHz
[ 2480.476379] lgs8gxx: Reg 0x4B: 0x02
[ 2480.476380] lgs8gxx: lgs8gxx_read_status: fe_status=0x0


may be an error in the driver, or an error in the frontend.c. have to
compare both logs from 3.2 and 3.4.
-- 
http://chanchoiwing.blogspot.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: SkyStar HD2 tv playback runs jerky - Subsystem: Device 1ae4:0003

2012-06-23 Thread walou
I have the same card and exactly the same problem.
Did u found a solution to that ?
Or anyone can help us pls.
--
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


SkyStar HD2 tv playback runs jerky - Subsystem: Device 1ae4:0003

2012-06-23 Thread walou
I have the same card and exactly the same problem.
Did anyone found a solution to that problem pls ?
Pls help us.
--
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