cron job: media_tree daily build: ERRORS

2015-11-19 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:   Fri Nov 20 04:00:18 CET 2015
git branch: test
git hash:   ca78946853eb23a37260cefc074a5bf86e8b866c
gcc version:i686-linux-gcc (GCC) 5.1.0
sparse version: v0.5.0
smatch version: host hardware:  x86_64
host os:4.2.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.32.27-i686: ERRORS
linux-2.6.33.7-i686: ERRORS
linux-2.6.34.7-i686: ERRORS
linux-2.6.35.9-i686: ERRORS
linux-2.6.36.4-i686: ERRORS
linux-2.6.37.6-i686: ERRORS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: ERRORS
linux-3.0.60-i686: ERRORS
linux-3.1.10-i686: ERRORS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: ERRORS
linux-3.5.7-i686: ERRORS
linux-3.6.11-i686: ERRORS
linux-3.7.4-i686: ERRORS
linux-3.8-i686: ERRORS
linux-3.9.2-i686: ERRORS
linux-3.10.1-i686: ERRORS
linux-3.11.1-i686: ERRORS
linux-3.12.23-i686: ERRORS
linux-3.13.11-i686: ERRORS
linux-3.14.9-i686: ERRORS
linux-3.15.2-i686: ERRORS
linux-3.16.7-i686: ERRORS
linux-3.17.8-i686: ERRORS
linux-3.18.7-i686: ERRORS
linux-3.19-i686: ERRORS
linux-4.0-i686: ERRORS
linux-4.1.1-i686: OK
linux-4.2-i686: OK
linux-4.3-i686: OK
linux-4.4-rc1-i686: OK
linux-2.6.32.27-x86_64: ERRORS
linux-2.6.33.7-x86_64: ERRORS
linux-2.6.34.7-x86_64: ERRORS
linux-2.6.35.9-x86_64: ERRORS
linux-2.6.36.4-x86_64: ERRORS
linux-2.6.37.6-x86_64: ERRORS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: ERRORS
linux-3.0.60-x86_64: ERRORS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: ERRORS
linux-3.5.7-x86_64: ERRORS
linux-3.6.11-x86_64: ERRORS
linux-3.7.4-x86_64: ERRORS
linux-3.8-x86_64: ERRORS
linux-3.9.2-x86_64: ERRORS
linux-3.10.1-x86_64: ERRORS
linux-3.11.1-x86_64: ERRORS
linux-3.12.23-x86_64: ERRORS
linux-3.13.11-x86_64: ERRORS
linux-3.14.9-x86_64: ERRORS
linux-3.15.2-x86_64: ERRORS
linux-3.16.7-x86_64: ERRORS
linux-3.17.8-x86_64: ERRORS
linux-3.18.7-x86_64: ERRORS
linux-3.19-x86_64: ERRORS
linux-4.0-x86_64: ERRORS
linux-4.1.1-x86_64: OK
linux-4.2-x86_64: OK
linux-4.3-x86_64: OK
linux-4.4-rc1-x86_64: OK
apps: WARNINGS
spec-git: OK
sparse: ERRORS
smatch: OK

Detailed results are available here:

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

Full logs are available here:

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

The Media Infrastructure API 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


Loan

2015-11-19 Thread SHELL
Are You In Need Of A Private Or Business Loans from $10,000.00 to 
$10.000.000.00 At 1% Rate For Various Purposes? If Yes;
Contact us Via Email: shell.l...@qq.com

Full Name:
Amount Needed:
Duration:
Country:
Cell No:
Sex:

Best Regards
--
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 6/8] media: rc: treat lirc like any other protocol

2015-11-19 Thread Heiner Kallweit
Am 19.11.2015 um 14:49 schrieb Mauro Carvalho Chehab:
> Hi Heiner,
> 
> Em Mon, 16 Nov 2015 20:53:20 +0100
> Heiner Kallweit  escreveu:
> 
>> Introduce a protocol bit for lirc and treat it like any other protocol.
>> This allows to get rid of all the lirc-specific code.
> 
> LIRC were originally handled like a protocol, but, after some discussions,
> we decided to handle it in separate, as it is actually an API.
> 
> So, I'm not applying this patch.

I missed this discussion, sorry. Found it in the archive.
Exposing lirc as a protocol to the outside world (incl. the kernel outside rc 
core)
I also consider a bad idea, however I hoped that not listing it in the header 
file
would be sufficient to keep it internal. But it's totally fine with me as it is.

Thanks for the quick review of the patches.

Heiner

> Patches 1-5 and patch 7 looks OK, so I'm applying them.
> 
> Regards,
> Mauro
> 
>>
>> Signed-off-by: Heiner Kallweit 
>> ---
>>  drivers/media/rc/ir-lirc-codec.c |  2 +-
>>  drivers/media/rc/rc-core-priv.h  | 16 ++--
>>  drivers/media/rc/rc-ir-raw.c | 13 +
>>  drivers/media/rc/rc-main.c   | 37 -
>>  4 files changed, 8 insertions(+), 60 deletions(-)
>>
>> diff --git a/drivers/media/rc/ir-lirc-codec.c 
>> b/drivers/media/rc/ir-lirc-codec.c
>> index a32659f..40c66c8 100644
>> --- a/drivers/media/rc/ir-lirc-codec.c
>> +++ b/drivers/media/rc/ir-lirc-codec.c
>> @@ -421,7 +421,7 @@ static int ir_lirc_unregister(struct rc_dev *dev)
>>  }
>>  
>>  static struct ir_raw_handler lirc_handler = {
>> -.protocols  = 0,
>> +.protocols  = RC_BIT_LIRC,
>>  .decode = ir_lirc_decode,
>>  .raw_register   = ir_lirc_register,
>>  .raw_unregister = ir_lirc_unregister,
>> diff --git a/drivers/media/rc/rc-core-priv.h 
>> b/drivers/media/rc/rc-core-priv.h
>> index 071651a..74f2f15 100644
>> --- a/drivers/media/rc/rc-core-priv.h
>> +++ b/drivers/media/rc/rc-core-priv.h
>> @@ -20,6 +20,8 @@
>>  #include 
>>  #include 
>>  
>> +#define RC_BIT_LIRC (1ULL << 63)
>> +
>>  struct ir_raw_handler {
>>  struct list_head list;
>>  
>> @@ -160,18 +162,4 @@ int ir_raw_handler_register(struct ir_raw_handler 
>> *ir_raw_handler);
>>  void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
>>  void ir_raw_init(void);
>>  
>> -/*
>> - * Decoder initialization code
>> - *
>> - * Those load logic are called during ir-core init, and automatically
>> - * loads the compiled decoders for their usage with IR raw events
>> - */
>> -
>> -/* from ir-lirc-codec.c */
>> -#ifdef CONFIG_IR_LIRC_CODEC_MODULE
>> -#define load_lirc_codec()   request_module_nowait("ir-lirc-codec")
>> -#else
>> -static inline void load_lirc_codec(void) { }
>> -#endif
>> -
>>  #endif /* _RC_CORE_PRIV */
>> diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
>> index c6433e8..dbd8db5 100644
>> --- a/drivers/media/rc/rc-ir-raw.c
>> +++ b/drivers/media/rc/rc-ir-raw.c
>> @@ -59,8 +59,7 @@ static int ir_raw_event_thread(void *data)
>>  
>>  mutex_lock(&ir_raw_handler_lock);
>>  list_for_each_entry(handler, &ir_raw_handler_list, list)
>> -if (raw->dev->enabled_protocols & handler->protocols ||
>> -!handler->protocols)
>> +if (raw->dev->enabled_protocols & handler->protocols)
>>  handler->decode(raw->dev, ev);
>>  raw->prev_ev = ev;
>>  mutex_unlock(&ir_raw_handler_lock);
>> @@ -360,13 +359,3 @@ void ir_raw_handler_unregister(struct ir_raw_handler 
>> *ir_raw_handler)
>>  mutex_unlock(&ir_raw_handler_lock);
>>  }
>>  EXPORT_SYMBOL(ir_raw_handler_unregister);
>> -
>> -void ir_raw_init(void)
>> -{
>> -/* Load the decoder modules */
>> -load_lirc_codec();
>> -
>> -/* If needed, we may later add some init code. In this case,
>> -   it is needed to change the CONFIG_MODULE test at rc-core.h
>> - */
>> -}
>> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
>> index f2d5c50..d1611f1 100644
>> --- a/drivers/media/rc/rc-main.c
>> +++ b/drivers/media/rc/rc-main.c
>> @@ -802,6 +802,7 @@ static const struct {
>>  { RC_BIT_SHARP, "sharp","ir-sharp-decoder"  },
>>  { RC_BIT_MCE_KBD,   "mce_kbd",  "ir-mce_kbd-decoder"},
>>  { RC_BIT_XMP,   "xmp",  "ir-xmp-decoder"},
>> +{ RC_BIT_LIRC,  "lirc", "ir-lirc-codec" },
>>  };
>>  
>>  /**
>> @@ -829,23 +830,6 @@ struct rc_filter_attribute {
>>  .mask = (_mask),\
>>  }
>>  
>> -static bool lirc_is_present(void)
>> -{
>> -#if defined(CONFIG_LIRC_MODULE)
>> -struct module *lirc;
>> -
>> -mutex_lock(&module_mutex);
>> -lirc = find_module("lirc_dev");
>> -mutex_unlock(&module_mutex);
>> -
>> -return lirc ? true : false;
>> -#elif defined(CONFIG_LIRC)
>> -return true;
>> 

[PATCH 01/10] si2165: rename frontend -> fe

2015-11-19 Thread Matthias Schwarzott
Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index c5d7c0d..d36b36c 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -42,7 +42,7 @@
 struct si2165_state {
struct i2c_adapter *i2c;
 
-   struct dvb_frontend frontend;
+   struct dvb_frontend fe;
 
struct si2165_config config;
 
@@ -988,9 +988,9 @@ struct dvb_frontend *si2165_attach(const struct 
si2165_config *config,
}
 
/* create dvb_frontend */
-   memcpy(&state->frontend.ops, &si2165_ops,
+   memcpy(&state->fe.ops, &si2165_ops,
sizeof(struct dvb_frontend_ops));
-   state->frontend.demodulator_priv = state;
+   state->fe.demodulator_priv = state;
 
/* powerup */
io_ret = si2165_writereg8(state, 0x, state->config.chip_mode);
@@ -1042,20 +1042,20 @@ struct dvb_frontend *si2165_attach(const struct 
si2165_config *config,
KBUILD_MODNAME, chip_name, rev_char, state->chip_type,
state->chip_revcode);
 
-   strlcat(state->frontend.ops.info.name, chip_name,
-   sizeof(state->frontend.ops.info.name));
+   strlcat(state->fe.ops.info.name, chip_name,
+   sizeof(state->fe.ops.info.name));
 
n = 0;
if (state->has_dvbt) {
-   state->frontend.ops.delsys[n++] = SYS_DVBT;
-   strlcat(state->frontend.ops.info.name, " DVB-T",
-   sizeof(state->frontend.ops.info.name));
+   state->fe.ops.delsys[n++] = SYS_DVBT;
+   strlcat(state->fe.ops.info.name, " DVB-T",
+   sizeof(state->fe.ops.info.name));
}
if (state->has_dvbc)
dev_warn(&state->i2c->dev, "%s: DVB-C is not yet supported.\n",
   KBUILD_MODNAME);
 
-   return &state->frontend;
+   return &state->fe;
 
 error:
kfree(state);
-- 
2.6.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


[PATCH 04/10] si2165: only write agc registers after reset before start_syncro

2015-11-19 Thread Matthias Schwarzott
Datasheet says they must be rewritten after reset.
But it only makes sense to write them when trying to tune afterwards.

Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 32 +++-
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index 222d775..07247e3 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -690,23 +690,6 @@ static int si2165_init(struct dvb_frontend *fe)
goto error;
}
 
-   /* write adc values after each reset*/
-   ret = si2165_writereg8(state, 0x012a, 0x46);
-   if (ret < 0)
-   goto error;
-   ret = si2165_writereg8(state, 0x012c, 0x00);
-   if (ret < 0)
-   goto error;
-   ret = si2165_writereg8(state, 0x012e, 0x0a);
-   if (ret < 0)
-   goto error;
-   ret = si2165_writereg8(state, 0x012f, 0xff);
-   if (ret < 0)
-   goto error;
-   ret = si2165_writereg8(state, 0x0123, 0x70);
-   if (ret < 0)
-   goto error;
-
return 0;
 error:
return ret;
@@ -788,6 +771,14 @@ static int si2165_set_if_freq_shift(struct si2165_state 
*state, u32 IF)
return si2165_writereg32(state, 0x00e8, reg_value);
 }
 
+static const struct si2165_reg_value_pair agc_rewrite[] = {
+   { 0x012a, 0x46 },
+   { 0x012c, 0x00 },
+   { 0x012e, 0x0a },
+   { 0x012f, 0xff },
+   { 0x0123, 0x70 }
+};
+
 static int si2165_set_frontend(struct dvb_frontend *fe)
 {
int ret;
@@ -924,6 +915,13 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
ret = si2165_writereg32(state, 0x0384, 0x);
if (ret < 0)
return ret;
+
+   /* write adc values after each reset*/
+   ret = si2165_write_reg_list(state, agc_rewrite,
+   ARRAY_SIZE(agc_rewrite));
+   if (ret < 0)
+   return ret;
+
/* start_synchro */
ret = si2165_writereg8(state, 0x02e0, 0x01);
if (ret < 0)
-- 
2.6.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


[PATCH 03/10] si2165: create function si2165_write_reg_list for writing register lists

2015-11-19 Thread Matthias Schwarzott
Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 21 +
 1 file changed, 21 insertions(+)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index a0e4600..222d775 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -243,6 +243,27 @@ err:
return ret;
 }
 
+#define REG16(reg, val) { (reg), (val) & 0xff }, { (reg)+1, (val)>>8 & 0xff }
+struct si2165_reg_value_pair {
+   u16 reg;
+   u8 val;
+};
+
+static int si2165_write_reg_list(struct si2165_state *state,
+const struct si2165_reg_value_pair *regs,
+int count)
+{
+   int i;
+   int ret;
+
+   for (i = 0; i < count; i++) {
+   ret = si2165_writereg8(state, regs[i].reg, regs[i].val);
+   if (ret < 0)
+   return ret;
+   }
+   return 0;
+}
+
 static int si2165_get_tune_settings(struct dvb_frontend *fe,
struct dvb_frontend_tune_settings *s)
 {
-- 
2.6.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


[PATCH 05/10] si2165: move setting ts config to init

2015-11-19 Thread Matthias Schwarzott
The TS config is fixed, so no need to write it for each tune.

Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 27 ++-
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index 07247e3..0c1f4c4 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -690,6 +690,20 @@ static int si2165_init(struct dvb_frontend *fe)
goto error;
}
 
+   /* ts output config */
+   ret = si2165_writereg8(state, 0x04e4, 0x20);
+   if (ret < 0)
+   return ret;
+   ret = si2165_writereg16(state, 0x04ef, 0x00fe);
+   if (ret < 0)
+   return ret;
+   ret = si2165_writereg24(state, 0x04f4, 0x55);
+   if (ret < 0)
+   return ret;
+   ret = si2165_writereg8(state, 0x04e5, 0x01);
+   if (ret < 0)
+   return ret;
+
return 0;
 error:
return ret;
@@ -824,19 +838,6 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
ret = si2165_writereg8(state, 0x08f8, 0x00);
if (ret < 0)
return ret;
-   /* ts output config */
-   ret = si2165_writereg8(state, 0x04e4, 0x20);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg16(state, 0x04ef, 0x00fe);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg24(state, 0x04f4, 0x55);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg8(state, 0x04e5, 0x01);
-   if (ret < 0)
-   return ret;
/* bandwidth in 10KHz steps */
ret = si2165_writereg16(state, 0x0308, bw10k);
if (ret < 0)
-- 
2.6.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


[PATCH 07/10] si2165: Fix DVB-T bandwidth default

2015-11-19 Thread Matthias Schwarzott
Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index 807a3c9..e97b0e6 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -811,19 +811,18 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
u8 val[3];
u32 dvb_rate = 0;
u16 bw10k;
+   u32 bw_hz = p->bandwidth_hz;
 
dprintk("%s: called\n", __func__);
 
if (!state->has_dvbt)
return -EINVAL;
 
-   if (p->bandwidth_hz > 0) {
-   dvb_rate = p->bandwidth_hz * 8 / 7;
-   bw10k = p->bandwidth_hz / 1;
-   } else {
-   dvb_rate = 8 * 8 / 7;
-   bw10k = 800;
-   }
+   if (bw_hz == 0)
+   bw_hz = 800;
+
+   dvb_rate = bw_hz * 8 / 7;
+   bw10k = bw_hz / 1;
 
/* standard = DVB-T */
ret = si2165_writereg8(state, 0x00ec, 0x01);
-- 
2.6.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


[PATCH 06/10] si2165: Simplify si2165_set_if_freq_shift usage

2015-11-19 Thread Matthias Schwarzott
Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index 0c1f4c4..807a3c9 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -764,12 +764,22 @@ static int si2165_set_oversamp(struct si2165_state 
*state, u32 dvb_rate)
return si2165_writereg32(state, 0x00e4, reg_value);
 }
 
-static int si2165_set_if_freq_shift(struct si2165_state *state, u32 IF)
+static int si2165_set_if_freq_shift(struct si2165_state *state)
 {
+   struct dvb_frontend *fe = &state->fe;
u64 if_freq_shift;
s32 reg_value = 0;
u32 fe_clk = si2165_get_fe_clk(state);
+   u32 IF = 0;
 
+   if (!fe->ops.tuner_ops.get_if_frequency) {
+   dev_err(&state->i2c->dev,
+   "%s: Error: get_if_frequency() not defined at tuner. 
Can't work without it!\n",
+   KBUILD_MODNAME);
+   return -EINVAL;
+   }
+
+   fe->ops.tuner_ops.get_if_frequency(fe, &IF);
if_freq_shift = IF;
if_freq_shift <<= 29;
 
@@ -799,19 +809,11 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct si2165_state *state = fe->demodulator_priv;
u8 val[3];
-   u32 IF;
u32 dvb_rate = 0;
u16 bw10k;
 
dprintk("%s: called\n", __func__);
 
-   if (!fe->ops.tuner_ops.get_if_frequency) {
-   dev_err(&state->i2c->dev,
-   "%s: Error: get_if_frequency() not defined at tuner. 
Can't work without it!\n",
-   KBUILD_MODNAME);
-   return -EINVAL;
-   }
-
if (!state->has_dvbt)
return -EINVAL;
 
@@ -831,8 +833,7 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
if (ret < 0)
return ret;
 
-   fe->ops.tuner_ops.get_if_frequency(fe, &IF);
-   ret = si2165_set_if_freq_shift(state, IF);
+   ret = si2165_set_if_freq_shift(state);
if (ret < 0)
return ret;
ret = si2165_writereg8(state, 0x08f8, 0x00);
@@ -896,8 +897,7 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
fe->ops.tuner_ops.set_params(fe);
 
/* recalc if_freq_shift if IF might has changed */
-   fe->ops.tuner_ops.get_if_frequency(fe, &IF);
-   ret = si2165_set_if_freq_shift(state, IF);
+   ret = si2165_set_if_freq_shift(state);
if (ret < 0)
return ret;
 
-- 
2.6.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


[PATCH 02/10] si2165: rename si2165_set_parameters to si2165_set_frontend

2015-11-19 Thread Matthias Schwarzott
Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index d36b36c..a0e4600 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -767,7 +767,7 @@ static int si2165_set_if_freq_shift(struct si2165_state 
*state, u32 IF)
return si2165_writereg32(state, 0x00e8, reg_value);
 }
 
-static int si2165_set_parameters(struct dvb_frontend *fe)
+static int si2165_set_frontend(struct dvb_frontend *fe)
 {
int ret;
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
@@ -952,7 +952,7 @@ static struct dvb_frontend_ops si2165_ops = {
.init = si2165_init,
.sleep = si2165_sleep,
 
-   .set_frontend  = si2165_set_parameters,
+   .set_frontend  = si2165_set_frontend,
.read_status   = si2165_read_status,
 
.release = si2165_release,
-- 
2.6.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


[PATCH 09/10] si2165: Prepare si2165_set_frontend for splitting

2015-11-19 Thread Matthias Schwarzott
Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 51 ++--
 1 file changed, 37 insertions(+), 14 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index 01c9a19..131aef1 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -760,7 +760,7 @@ static int si2165_set_oversamp(struct si2165_state *state, 
u32 dvb_rate)
do_div(oversamp, dvb_rate);
reg_value = oversamp & 0x3fff;
 
-   /* oversamp, usbdump contained 0x0310; */
+   dprintk("%s: Write oversamp=%#x\n", __func__, reg_value);
return si2165_writereg32(state, 0x00e4, reg_value);
 }
 
@@ -795,14 +795,6 @@ static int si2165_set_if_freq_shift(struct si2165_state 
*state)
return si2165_writereg32(state, 0x00e8, reg_value);
 }
 
-static const struct si2165_reg_value_pair agc_rewrite[] = {
-   { 0x012a, 0x46 },
-   { 0x012c, 0x00 },
-   { 0x012e, 0x0a },
-   { 0x012f, 0xff },
-   { 0x0123, 0x70 }
-};
-
 static const struct si2165_reg_value_pair dvbt_regs[] = {
/* standard = DVB-T */
{ 0x00ec, 0x01 },
@@ -826,12 +818,11 @@ static const struct si2165_reg_value_pair dvbt_regs[] = {
{ 0x0387, 0x00 }
 };
 
-static int si2165_set_frontend(struct dvb_frontend *fe)
+static int si2165_set_frontend_dvbt(struct dvb_frontend *fe)
 {
int ret;
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct si2165_state *state = fe->demodulator_priv;
-   u8 val[3];
u32 dvb_rate = 0;
u16 bw10k;
u32 bw_hz = p->bandwidth_hz;
@@ -851,9 +842,6 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
if (ret < 0)
return ret;
 
-   ret = si2165_set_if_freq_shift(state);
-   if (ret < 0)
-   return ret;
/* bandwidth in 10KHz steps */
ret = si2165_writereg16(state, 0x0308, bw10k);
if (ret < 0)
@@ -866,6 +854,40 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
if (ret < 0)
return ret;
 
+   return 0;
+}
+
+static const struct si2165_reg_value_pair agc_rewrite[] = {
+   { 0x012a, 0x46 },
+   { 0x012c, 0x00 },
+   { 0x012e, 0x0a },
+   { 0x012f, 0xff },
+   { 0x0123, 0x70 }
+};
+
+static int si2165_set_frontend(struct dvb_frontend *fe)
+{
+   struct si2165_state *state = fe->demodulator_priv;
+   struct dtv_frontend_properties *p = &fe->dtv_property_cache;
+   u32 delsys = p->delivery_system;
+   int ret;
+   u8 val[3];
+
+   /* initial setting of if freq shift */
+   ret = si2165_set_if_freq_shift(state);
+   if (ret < 0)
+   return ret;
+
+   switch (delsys) {
+   case SYS_DVBT:
+   ret = si2165_set_frontend_dvbt(fe);
+   if (ret < 0)
+   return ret;
+   break;
+   default:
+   return -EINVAL;
+   }
+
/* dsp_addr_jump */
ret = si2165_writereg32(state, 0x0348, 0xf400);
if (ret < 0)
@@ -886,6 +908,7 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
ret = si2165_writereg8(state, 0x0341, 0x00);
if (ret < 0)
return ret;
+
/* reset all */
ret = si2165_writereg8(state, 0x00c0, 0x00);
if (ret < 0)
-- 
2.6.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


[PATCH 10/10] si2165: Add DVB-C support for HVR-4400/HVR-5500

2015-11-19 Thread Matthias Schwarzott
It works only for HVR-4400/HVR-5500.
For WinTV-HVR-930C-HD it fails with bad/no reception
for unknown reasons.

Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 86 +---
 1 file changed, 81 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index 131aef1..dd4503a 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -857,6 +857,71 @@ static int si2165_set_frontend_dvbt(struct dvb_frontend 
*fe)
return 0;
 }
 
+static const struct si2165_reg_value_pair dvbc_regs[] = {
+   /* standard = DVB-C */
+   { 0x00ec, 0x05 },
+   { 0x08f8, 0x00 },
+
+   /* agc2 */
+   { 0x016e, 0x50 },
+   { 0x016c, 0x0e },
+   { 0x016d, 0x10 },
+   /* agc */
+   { 0x015b, 0x03 },
+   { 0x0150, 0x68 },
+   /* agc */
+   { 0x01a0, 0x68 },
+   { 0x01c8, 0x50 },
+
+   { 0x0278, 0x0d },
+
+   { 0x023a, 0x05 },
+   { 0x0261, 0x09 },
+   REG16(0x0350, 0x3e80),
+   { 0x02f4, 0x00 },
+
+   { 0x00cb, 0x01 },
+   REG16(0x024c, 0x),
+   REG16(0x027c, 0x),
+   { 0x0232, 0x03 },
+   { 0x02f4, 0x0b },
+   { 0x018b, 0x00 },
+};
+
+static int si2165_set_frontend_dvbc(struct dvb_frontend *fe)
+{
+   struct si2165_state *state = fe->demodulator_priv;
+   int ret;
+   struct dtv_frontend_properties *p = &fe->dtv_property_cache;
+   const u32 dvb_rate = p->symbol_rate;
+   const u32 bw_hz = p->bandwidth_hz;
+
+   if (!state->has_dvbc)
+   return -EINVAL;
+
+   if (dvb_rate == 0)
+   return -EINVAL;
+
+   ret = si2165_adjust_pll_divl(state, 14);
+   if (ret < 0)
+   return ret;
+
+   /* Oversampling */
+   ret = si2165_set_oversamp(state, dvb_rate);
+   if (ret < 0)
+   return ret;
+
+   ret = si2165_writereg32(state, 0x00c4, bw_hz);
+   if (ret < 0)
+   return ret;
+
+   ret = si2165_write_reg_list(state, dvbc_regs, ARRAY_SIZE(dvbc_regs));
+   if (ret < 0)
+   return ret;
+
+   return 0;
+}
+
 static const struct si2165_reg_value_pair agc_rewrite[] = {
{ 0x012a, 0x46 },
{ 0x012c, 0x00 },
@@ -884,6 +949,11 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
if (ret < 0)
return ret;
break;
+   case SYS_DVBC_ANNEX_A:
+   ret = si2165_set_frontend_dvbc(fe);
+   if (ret < 0)
+   return ret;
+   break;
default:
return -EINVAL;
}
@@ -947,7 +1017,12 @@ static void si2165_release(struct dvb_frontend *fe)
 static struct dvb_frontend_ops si2165_ops = {
.info = {
.name = "Silicon Labs ",
-   .caps = FE_CAN_FEC_1_2 |
+/* For DVB-C */
+   .symbol_rate_min = 100,
+   .symbol_rate_max = 720,
+   /* For DVB-T */
+   .frequency_stepsize = 17,
+   .caps = FE_CAN_FEC_1_2 |
FE_CAN_FEC_2_3 |
FE_CAN_FEC_3_4 |
FE_CAN_FEC_5_6 |
@@ -960,7 +1035,6 @@ static struct dvb_frontend_ops si2165_ops = {
FE_CAN_QAM_128 |
FE_CAN_QAM_256 |
FE_CAN_QAM_AUTO |
-   FE_CAN_TRANSMISSION_MODE_AUTO |
FE_CAN_GUARD_INTERVAL_AUTO |
FE_CAN_HIERARCHY_AUTO |
FE_CAN_MUTE_TS |
@@ -1072,9 +1146,11 @@ struct dvb_frontend *si2165_attach(const struct 
si2165_config *config,
strlcat(state->fe.ops.info.name, " DVB-T",
sizeof(state->fe.ops.info.name));
}
-   if (state->has_dvbc)
-   dev_warn(&state->i2c->dev, "%s: DVB-C is not yet supported.\n",
-  KBUILD_MODNAME);
+   if (state->has_dvbc) {
+   state->fe.ops.delsys[n++] = SYS_DVBC_ANNEX_A;
+   strlcat(state->fe.ops.info.name, " DVB-C",
+   sizeof(state->fe.ops.info.name));
+   }
 
return &state->fe;
 
-- 
2.6.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


[PATCH 08/10] si2165: set list of DVB-T registers together

2015-11-19 Thread Matthias Schwarzott
Signed-off-by: Matthias Schwarzott 
---
 drivers/media/dvb-frontends/si2165.c | 73 +---
 1 file changed, 26 insertions(+), 47 deletions(-)

diff --git a/drivers/media/dvb-frontends/si2165.c 
b/drivers/media/dvb-frontends/si2165.c
index e97b0e6..01c9a19 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -803,6 +803,29 @@ static const struct si2165_reg_value_pair agc_rewrite[] = {
{ 0x0123, 0x70 }
 };
 
+static const struct si2165_reg_value_pair dvbt_regs[] = {
+   /* standard = DVB-T */
+   { 0x00ec, 0x01 },
+   { 0x08f8, 0x00 },
+   /* impulsive_noise_remover */
+   { 0x031c, 0x01 },
+   { 0x00cb, 0x00 },
+   /* agc2 */
+   { 0x016e, 0x41 },
+   { 0x016c, 0x0e },
+   { 0x016d, 0x10 },
+   /* agc */
+   { 0x015b, 0x03 },
+   { 0x0150, 0x78 },
+   /* agc */
+   { 0x01a0, 0x78 },
+   { 0x01c8, 0x68 },
+   /* freq_sync_range */
+   REG16(0x030c, 0x0064),
+   /* gp_reg0 */
+   { 0x0387, 0x00 }
+};
+
 static int si2165_set_frontend(struct dvb_frontend *fe)
 {
int ret;
@@ -824,10 +847,6 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
dvb_rate = bw_hz * 8 / 7;
bw10k = bw_hz / 1;
 
-   /* standard = DVB-T */
-   ret = si2165_writereg8(state, 0x00ec, 0x01);
-   if (ret < 0)
-   return ret;
ret = si2165_adjust_pll_divl(state, 12);
if (ret < 0)
return ret;
@@ -835,9 +854,6 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
ret = si2165_set_if_freq_shift(state);
if (ret < 0)
return ret;
-   ret = si2165_writereg8(state, 0x08f8, 0x00);
-   if (ret < 0)
-   return ret;
/* bandwidth in 10KHz steps */
ret = si2165_writereg16(state, 0x0308, bw10k);
if (ret < 0)
@@ -845,48 +861,11 @@ static int si2165_set_frontend(struct dvb_frontend *fe)
ret = si2165_set_oversamp(state, dvb_rate);
if (ret < 0)
return ret;
-   /* impulsive_noise_remover */
-   ret = si2165_writereg8(state, 0x031c, 0x01);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg8(state, 0x00cb, 0x00);
-   if (ret < 0)
-   return ret;
-   /* agc2 */
-   ret = si2165_writereg8(state, 0x016e, 0x41);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg8(state, 0x016c, 0x0e);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg8(state, 0x016d, 0x10);
-   if (ret < 0)
-   return ret;
-   /* agc */
-   ret = si2165_writereg8(state, 0x015b, 0x03);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg8(state, 0x0150, 0x78);
-   if (ret < 0)
-   return ret;
-   /* agc */
-   ret = si2165_writereg8(state, 0x01a0, 0x78);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg8(state, 0x01c8, 0x68);
-   if (ret < 0)
-   return ret;
-   /* freq_sync_range */
-   ret = si2165_writereg16(state, 0x030c, 0x0064);
-   if (ret < 0)
-   return ret;
-   /* gp_reg0 */
-   ret = si2165_readreg8(state, 0x0387, val);
-   if (ret < 0)
-   return ret;
-   ret = si2165_writereg8(state, 0x0387, 0x00);
+
+   ret = si2165_write_reg_list(state, dvbt_regs, ARRAY_SIZE(dvbt_regs));
if (ret < 0)
return ret;
+
/* dsp_addr_jump */
ret = si2165_writereg32(state, 0x0348, 0xf400);
if (ret < 0)
-- 
2.6.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


si2165: Add simple DVB-C support

2015-11-19 Thread Matthias Schwarzott
This series adds simple DVB-C support to the si2165 demod driver.

It works only for HVR-4400/HVR-5500.
For WinTV-HVR-930C-HD it fails with bad/no reception
for unknown reasons.

Regards
Matthias

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


TerraTec Cinergy Hybrid T USB XS with demodulator MT352 is not detect by em28xx - Bug 108061

2015-11-19 Thread giovanni . nervi
Hi, I report this bug from bugzilla, so I hope someone can patch the main tree.

https://bugzilla.kernel.org/show_bug.cgi?id=108061
you can find the patch attached to bugzilla or original from linuxtv

http://linuxtv.org/pipermail/linux-dvb/2014-May/032967.html

Thank you
Giovanni
--
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 v5 2/2] media: v4l: ti-vpe: Document DRA72 CAL h/w module

2015-11-19 Thread Rob Herring
On Wed, Nov 18, 2015 at 02:47:12PM -0600, Benoit Parrot wrote:
> Device Tree bindings for the DRA72 Camera Adaptation Layer (CAL)
> H/W module.
> 
> Signed-off-by: Benoit Parrot 

Acked-by: Rob Herring 

> ---
>  Documentation/devicetree/bindings/media/ti-cal.txt | 72 
> ++
>  1 file changed, 72 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/ti-cal.txt
> 
> diff --git a/Documentation/devicetree/bindings/media/ti-cal.txt 
> b/Documentation/devicetree/bindings/media/ti-cal.txt
> new file mode 100644
> index ..ae9b52f37576
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/ti-cal.txt
> @@ -0,0 +1,72 @@
> +Texas Instruments DRA72x CAMERA ADAPTATION LAYER (CAL)
> +--
> +
> +The Camera Adaptation Layer (CAL) is a key component for image capture
> +applications. The capture module provides the system interface and the
> +processing capability to connect CSI2 image-sensor modules to the
> +DRA72x device.
> +
> +Required properties:
> +- compatible: must be "ti,dra72-cal"
> +- reg:   CAL Top level, Receiver Core #0, Receiver Core #1 and Camera RX
> + control address space
> +- reg-names: cal_top, cal_rx_core0, cal_rx_core1, and camerrx_control
> +  registers
> +- interrupts: should contain IRQ line for the CAL;
> +
> +CAL supports 2 camera port nodes on MIPI bus. Each CSI2 camera port nodes
> +should contain a 'port' child node with child 'endpoint' node. Please
> +refer to the bindings defined in
> +Documentation/devicetree/bindings/media/video-interfaces.txt.
> +
> +Example:
> + cal: cal@4845b000 {
> + compatible = "ti,dra72-cal";
> + ti,hwmods = "cal";
> + reg = <0x4845B000 0x400>,
> +   <0x4845B800 0x40>,
> +   <0x4845B900 0x40>,
> +   <0x4A002e94 0x4>;
> + reg-names = "cal_top",
> + "cal_rx_core0",
> + "cal_rx_core1",
> + "camerrx_control";
> + interrupts = ;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + csi2_0: port@0 {
> + reg = <0>;
> + endpoint {
> + slave-mode;
> + remote-endpoint = <&ar0330_1>;
> + };
> + };
> + csi2_1: port@1 {
> + reg = <1>;
> + };
> + };
> + };
> +
> + i2c5: i2c@4807c000 {
> + ar0330@10 {
> + compatible = "ti,ar0330";
> + reg = <0x10>;
> +
> + port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ar0330_1: endpoint {
> + reg = <0>;
> + clock-lanes = <1>;
> + data-lanes = <0 2 3 4>;
> + remote-endpoint = <&csi2_0>;
> + };
> + };
> + };
> + };
> -- 
> 1.8.5.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" 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


[PATCH 1/3] DocBook: Add a help message for DOCBOOKS env var

2015-11-19 Thread Mauro Carvalho Chehab
Sometimes, it is needed to compile only a subset of the possible
DocBooks. This is supported by the building system, but it is not
docummented. Add a documentation for it.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile | 4 
 1 file changed, 4 insertions(+)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 91f6d89bb19f..bab296c5f565 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -227,6 +227,10 @@ dochelp:
@echo  '  mandocs - man pages'
@echo  '  installmandocs  - install man pages generated by mandocs'
@echo  '  cleandocs   - clean all generated DocBook files'
+   @echo
+   @echo  'make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs 
s1.xml s2.xml'
+   @echo  '  valid values for DOCBOOKS are: $(DOCBOOKS)'
+
 
 ###
 # Temporary files left by various tools
-- 
2.5.0


--
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 3/3] DocBook: make index.html generation less verbose by default

2015-11-19 Thread Mauro Carvalho Chehab
When make htmldocs is called on non-verbose mode, it will still be
verbose with index.html generation for no good reason, printing:

rm -rf Documentation/DocBook/index.html; echo 'Linux Kernel HTML 
Documentation' >> Documentation/DocBook/index.html && echo 'Kernel 
Version: 4.4.0-rc1' >> Documentation/DocBook/index.html && cat 
Documentation/DocBook/iio.html >> Documentation/DocBook/index.html

Instead, use the standard non-verbose mode, using:

  HTMLDocumentation/DocBook/index.html

if not called with V=1.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 5b4176673ada..d70f9b68174e 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -50,7 +50,7 @@ pdfdocs: $(PDF)
 
 HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
 htmldocs: $(HTML)
-   $(call build_main_index)
+   $(call cmd,build_main_index)
$(call install_media_images)
 
 MAN := $(patsubst %.xml, %.9, $(BOOKS))
@@ -138,7 +138,8 @@ quiet_cmd_db2pdf = PDF $@
 
 index = index.html
 main_idx = $(obj)/$(index)
-build_main_index = rm -rf $(main_idx); \
+quiet_cmd_build_main_index = HTML$(main_idx)
+  cmd_build_main_index = rm -rf $(main_idx); \
   echo 'Linux Kernel HTML Documentation' >> 
$(main_idx) && \
   echo 'Kernel Version: $(KERNELVERSION)' >> 
$(main_idx) && \
   cat $(HTML) >> $(main_idx)
-- 
2.5.0


--
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] DocBook: Cleanup: remove an unused $(call) line

2015-11-19 Thread Mauro Carvalho Chehab
There's no build_images function to call. So remove it.

This is just a cleanup patch, with doesn't affect the build.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index bab296c5f565..5b4176673ada 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -51,7 +51,6 @@ pdfdocs: $(PDF)
 HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
 htmldocs: $(HTML)
$(call build_main_index)
-   $(call build_images)
$(call install_media_images)
 
 MAN := $(patsubst %.xml, %.9, $(BOOKS))
-- 
2.5.0


--
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] DocBook: only copy stuff to media_api if media xml is generated

2015-11-19 Thread Sakari Ailus
On Thu, Nov 19, 2015 at 09:53:00AM -0200, Mauro Carvalho Chehab wrote:
> Em Thu, 19 Nov 2015 12:19:43 +0200
> Sakari Ailus  escreveu:
> 
> > Hi Mauro,
> > 
> > On Thu, Nov 19, 2015 at 07:45:13AM -0200, Mauro Carvalho Chehab wrote:
> > > It is possible to use:
> > >   make DOCBOOKS=device-drivers.xml htmldocs
> > > 
> > > To produce just a few docbooks. In such case, the media docs
> > > won't be built, causing the makefile target to return an error.
> > > 
> > > While this is ok for human eyes, if the above is used on an script,
> > > it would cause troubles.
> > > 
> > > Fix it by only creating/filling the media_api directory if the
> > > media_api.xml is found at DOCBOOKS.
> > > 
> > > Signed-off-by: Mauro Carvalho Chehab 
> > > ---
> > >  Documentation/DocBook/media/Makefile | 6 --
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/Documentation/DocBook/media/Makefile 
> > > b/Documentation/DocBook/media/Makefile
> > > index 02848146fc3a..2840ff483d5a 100644
> > > --- a/Documentation/DocBook/media/Makefile
> > > +++ b/Documentation/DocBook/media/Makefile
> > > @@ -199,8 +199,10 @@ DVB_DOCUMENTED = \
> > >  #
> > >  
> > >  install_media_images = \
> > > - $(Q)-mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
> > > - cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg 
> > > $(MEDIA_OBJ_DIR)/media_api
> > > + $(Q)if [ "x$(findstring media_api.xml,$(DOCBOOKS))" != "x" ]; then \
> > > + mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
> > > + cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg 
> > > $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api; \
> > > + fi
> > >  
> > >  $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
> > >   $(Q)base64 -d $< >$@
> > 
> > I'd still copy the files even if the directory was there. It's entirely
> > possible that new files appeared between the make runs, or that the existing
> > files changed. cp will just overwrite the targets in that case.
> > 
> > Albeit one still has to issue "make cleandocs" to get the DocBook rebuilt.
> > Oh well... One thing at a time? :-)
> 
> I guess you misread the patch...
> 
> It unconditionally copy the files even if the media_api directory exists,

Oops. My bad. Feel free to add:

Acked-by: Sakari Ailus 

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
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 8/8] media: rc: define RC_BIT_ALL as ~0

2015-11-19 Thread Mauro Carvalho Chehab
Em Mon, 16 Nov 2015 20:53:52 +0100
Heiner Kallweit  escreveu:

> RC_BIT_ALL explicitely lists each single currently defined protocol bit.
> To simplify the code and make adding a protocol easier set each bit
> no matter whether the respective protocol is defined yet.
> 
> RC_BIT_ALL is only used in checks whether a particular protocol is allowed
> therefore it has no impact if bits for not (yet) defined protocols
> are set.

I guess we used to do that, but we decided to explicitly define all
protocols there. Can't remember why.

So, for now, I'm not applying this one. Also, it depends on patch 6/8,
due to RC_BIT_LIRC.

So, I'm not applying this one.

> 
> Signed-off-by: Heiner Kallweit 
> ---
>  drivers/media/rc/rc-main.c |  1 -
>  include/media/rc-map.h | 10 +-
>  2 files changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index d1611f1..d7055e1 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -1447,7 +1447,6 @@ int rc_register_device(struct rc_dev *dev)
>   kfree(path);
>  
>   if (dev->driver_type == RC_DRIVER_IR_RAW) {
> - dev->allowed_protocols |= RC_BIT_LIRC;
>   /* calls ir_register_device so unlock mutex here*/
>   mutex_unlock(&dev->lock);
>   rc = ir_raw_event_register(dev);
> diff --git a/include/media/rc-map.h b/include/media/rc-map.h
> index 7844e98..27aaf6b 100644
> --- a/include/media/rc-map.h
> +++ b/include/media/rc-map.h
> @@ -54,15 +54,7 @@ enum rc_type {
>  #define RC_BIT_SHARP (1ULL << RC_TYPE_SHARP)
>  #define RC_BIT_XMP   (1ULL << RC_TYPE_XMP)
>  
> -#define RC_BIT_ALL   (RC_BIT_UNKNOWN | RC_BIT_OTHER | \
> -  RC_BIT_RC5 | RC_BIT_RC5X | RC_BIT_RC5_SZ | \
> -  RC_BIT_JVC | \
> -  RC_BIT_SONY12 | RC_BIT_SONY15 | RC_BIT_SONY20 | \
> -  RC_BIT_NEC | RC_BIT_SANYO | RC_BIT_MCE_KBD | \
> -  RC_BIT_RC6_0 | RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 | \
> -  RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE | RC_BIT_SHARP | \
> -  RC_BIT_XMP)
> -
> +#define RC_BIT_ALL   ~RC_BIT_NONE
>  
>  #define RC_SCANCODE_UNKNOWN(x)   (x)
>  #define RC_SCANCODE_OTHER(x) (x)
--
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 6/8] media: rc: treat lirc like any other protocol

2015-11-19 Thread Mauro Carvalho Chehab
Hi Heiner,

Em Mon, 16 Nov 2015 20:53:20 +0100
Heiner Kallweit  escreveu:

> Introduce a protocol bit for lirc and treat it like any other protocol.
> This allows to get rid of all the lirc-specific code.

LIRC were originally handled like a protocol, but, after some discussions,
we decided to handle it in separate, as it is actually an API.

So, I'm not applying this patch.

Patches 1-5 and patch 7 looks OK, so I'm applying them.

Regards,
Mauro

> 
> Signed-off-by: Heiner Kallweit 
> ---
>  drivers/media/rc/ir-lirc-codec.c |  2 +-
>  drivers/media/rc/rc-core-priv.h  | 16 ++--
>  drivers/media/rc/rc-ir-raw.c | 13 +
>  drivers/media/rc/rc-main.c   | 37 -
>  4 files changed, 8 insertions(+), 60 deletions(-)
> 
> diff --git a/drivers/media/rc/ir-lirc-codec.c 
> b/drivers/media/rc/ir-lirc-codec.c
> index a32659f..40c66c8 100644
> --- a/drivers/media/rc/ir-lirc-codec.c
> +++ b/drivers/media/rc/ir-lirc-codec.c
> @@ -421,7 +421,7 @@ static int ir_lirc_unregister(struct rc_dev *dev)
>  }
>  
>  static struct ir_raw_handler lirc_handler = {
> - .protocols  = 0,
> + .protocols  = RC_BIT_LIRC,
>   .decode = ir_lirc_decode,
>   .raw_register   = ir_lirc_register,
>   .raw_unregister = ir_lirc_unregister,
> diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h
> index 071651a..74f2f15 100644
> --- a/drivers/media/rc/rc-core-priv.h
> +++ b/drivers/media/rc/rc-core-priv.h
> @@ -20,6 +20,8 @@
>  #include 
>  #include 
>  
> +#define RC_BIT_LIRC  (1ULL << 63)
> +
>  struct ir_raw_handler {
>   struct list_head list;
>  
> @@ -160,18 +162,4 @@ int ir_raw_handler_register(struct ir_raw_handler 
> *ir_raw_handler);
>  void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
>  void ir_raw_init(void);
>  
> -/*
> - * Decoder initialization code
> - *
> - * Those load logic are called during ir-core init, and automatically
> - * loads the compiled decoders for their usage with IR raw events
> - */
> -
> -/* from ir-lirc-codec.c */
> -#ifdef CONFIG_IR_LIRC_CODEC_MODULE
> -#define load_lirc_codec()request_module_nowait("ir-lirc-codec")
> -#else
> -static inline void load_lirc_codec(void) { }
> -#endif
> -
>  #endif /* _RC_CORE_PRIV */
> diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
> index c6433e8..dbd8db5 100644
> --- a/drivers/media/rc/rc-ir-raw.c
> +++ b/drivers/media/rc/rc-ir-raw.c
> @@ -59,8 +59,7 @@ static int ir_raw_event_thread(void *data)
>  
>   mutex_lock(&ir_raw_handler_lock);
>   list_for_each_entry(handler, &ir_raw_handler_list, list)
> - if (raw->dev->enabled_protocols & handler->protocols ||
> - !handler->protocols)
> + if (raw->dev->enabled_protocols & handler->protocols)
>   handler->decode(raw->dev, ev);
>   raw->prev_ev = ev;
>   mutex_unlock(&ir_raw_handler_lock);
> @@ -360,13 +359,3 @@ void ir_raw_handler_unregister(struct ir_raw_handler 
> *ir_raw_handler)
>   mutex_unlock(&ir_raw_handler_lock);
>  }
>  EXPORT_SYMBOL(ir_raw_handler_unregister);
> -
> -void ir_raw_init(void)
> -{
> - /* Load the decoder modules */
> - load_lirc_codec();
> -
> - /* If needed, we may later add some init code. In this case,
> -it is needed to change the CONFIG_MODULE test at rc-core.h
> -  */
> -}
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index f2d5c50..d1611f1 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -802,6 +802,7 @@ static const struct {
>   { RC_BIT_SHARP, "sharp","ir-sharp-decoder"  },
>   { RC_BIT_MCE_KBD,   "mce_kbd",  "ir-mce_kbd-decoder"},
>   { RC_BIT_XMP,   "xmp",  "ir-xmp-decoder"},
> + { RC_BIT_LIRC,  "lirc", "ir-lirc-codec" },
>  };
>  
>  /**
> @@ -829,23 +830,6 @@ struct rc_filter_attribute {
>   .mask = (_mask),\
>   }
>  
> -static bool lirc_is_present(void)
> -{
> -#if defined(CONFIG_LIRC_MODULE)
> - struct module *lirc;
> -
> - mutex_lock(&module_mutex);
> - lirc = find_module("lirc_dev");
> - mutex_unlock(&module_mutex);
> -
> - return lirc ? true : false;
> -#elif defined(CONFIG_LIRC)
> - return true;
> -#else
> - return false;
> -#endif
> -}
> -
>  /**
>   * show_protocols() - shows the current/wakeup IR protocol(s)
>   * @device:  the device descriptor
> @@ -900,9 +884,6 @@ static ssize_t show_protocols(struct device *device,
>   allowed &= ~proto_names[i].type;
>   }
>  
> - if (dev->driver_type == RC_DRIVER_IR_RAW && lirc_is_present())
> - tmp += sprintf(tmp, "[lirc] ");
> -
>   if (tmp != buf)
>   tmp--;
>   *tmp = '\n';
> @@ -954,12 +935,8 @@ static int p

[PATCH] smsir.h: remove a now duplicated definition (IR_DEFAULT_TIMEOUT)

2015-11-19 Thread Mauro Carvalho Chehab
This macro is now part of the core. Remove from Siano driver.

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/siano/smsir.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/common/siano/smsir.h 
b/drivers/media/common/siano/smsir.h
index fc8b7925c532..d9abd96ef48b 100644
--- a/drivers/media/common/siano/smsir.h
+++ b/drivers/media/common/siano/smsir.h
@@ -30,8 +30,6 @@ along with this program.  If not, see 
.
 #include 
 #include 
 
-#define IR_DEFAULT_TIMEOUT 100
-
 struct smscore_device_t;
 
 struct ir_t {
-- 
2.5.0

--
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] [media] davinci: add i2c Kconfig dependencies

2015-11-19 Thread Lad, Prabhakar
On Thu, Nov 19, 2015 at 12:59 PM, Arnd Bergmann  wrote:
> All the davinci media drivers are using the i2c framework, and
> fail to build if that is ever disabled, e.g.:
>
> media/platform/davinci/vpif_display.c: In function 'vpif_probe':
> media/platform/davinci/vpif_display.c:1298:14: error: implicit declaration of 
> function 'i2c_get_adapter' [-Werror=implicit-function-declaration]
>
> This adds explicit Kconfig dependencies so we don't see the
> driver options if I2C is turned off.
>
> Signed-off-by: Arnd Bergmann 

Acked-by: Lad, Prabhakar 

Cheers,
--Prabhakar Lad
--
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 4/4] si2165: Add DVB-C support for HVR-4400/HVR-5500

2015-11-19 Thread Mauro Carvalho Chehab
Em Fri, 13 Nov 2015 23:54:58 +0100
Matthias Schwarzott  escreveu:

> It works only for HVR-4400/HVR-5500.
> For WinTV-HVR-930C-HD it fails with bad/no reception
> for unknown reasons.

Patch 3/4 of this series is broken. As this one depends on it, please
resend both patches 3 and 4 on your next patch series.

Regards,
Mauro

PS.: patches 1 and 2 are ok and got applied upstream already.


> 
> Signed-off-by: Matthias Schwarzott 
> ---
>  drivers/media/dvb-frontends/si2165.c | 132 
> +++
>  1 file changed, 120 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/media/dvb-frontends/si2165.c 
> b/drivers/media/dvb-frontends/si2165.c
> index c87d927..97a6eac 100644
> --- a/drivers/media/dvb-frontends/si2165.c
> +++ b/drivers/media/dvb-frontends/si2165.c
> @@ -760,7 +760,7 @@ static int si2165_set_oversamp(struct si2165_state 
> *state, u32 dvb_rate)
>   do_div(oversamp, dvb_rate);
>   reg_value = oversamp & 0x3fff;
>  
> - /* oversamp, usbdump contained 0x0310; */
> + dprintk("%s: Write oversamp=%#x\n", __func__, reg_value);
>   return si2165_writereg32(state, 0x00e4, reg_value);
>  }
>  
> @@ -823,7 +823,7 @@ static const struct si2165_reg_value_pair dvbt_regs[] = {
>   { 0x0387, 0x00 }
>  };
>  
> -static int si2165_set_parameters(struct dvb_frontend *fe)
> +static int si2165_set_frontend_dvbt(struct dvb_frontend *fe)
>  {
>   int ret;
>   struct dtv_frontend_properties *p = &fe->dtv_property_cache;
> @@ -851,9 +851,6 @@ static int si2165_set_parameters(struct dvb_frontend *fe)
>   if (ret < 0)
>   return ret;
>  
> - ret = si2165_set_if_freq_shift(state);
> - if (ret < 0)
> - return ret;
>   ret = si2165_writereg8(state, 0x08f8, 0x00);
>   if (ret < 0)
>   return ret;
> @@ -874,6 +871,110 @@ static int si2165_set_parameters(struct dvb_frontend 
> *fe)
>   if (ret < 0)
>   return ret;
>  
> + return 0;
> +}
> +
> +static const struct si2165_reg_value_pair dvbc_regs[] = {
> + /* agc2 */
> + { 0x016e, 0x50 },
> + { 0x016c, 0x0e },
> + { 0x016d, 0x10 },
> + /* agc */
> + { 0x015b, 0x03 },
> + { 0x0150, 0x68 },
> + /* agc */
> + { 0x01a0, 0x68 },
> + { 0x01c8, 0x50 },
> +
> + { 0x0278, 0x0d },
> +
> + { 0x023a, 0x05 },
> + { 0x0261, 0x09 },
> + REG16(0x0350, 0x3e80),
> + { 0x02f4, 0x00 }
> +};
> +
> +static int si2165_set_frontend_dvbc(struct dvb_frontend *fe)
> +{
> + struct si2165_state *state = fe->demodulator_priv;
> + int ret;
> + struct dtv_frontend_properties *p = &fe->dtv_property_cache;
> + const u32 dvb_rate = p->symbol_rate;
> + const u32 bw_hz = p->bandwidth_hz;
> +
> + if (!state->has_dvbc)
> + return -EINVAL;
> +
> + if (dvb_rate == 0)
> + return -EINVAL;
> +
> + /* standard = DVB-C */
> + ret = si2165_writereg8(state, 0x00ec, 0x05);
> + if (ret < 0)
> + return ret;
> + ret = si2165_adjust_pll_divl(state, 14);
> + if (ret < 0)
> + return ret;
> +
> + ret = si2165_writereg8(state, 0x08f8, 0x00);
> + if (ret < 0)
> + return ret;
> +
> + /* Oversampling */
> + ret = si2165_set_oversamp(state, dvb_rate);
> + if (ret < 0)
> + return ret;
> +
> + ret = si2165_write_reg_list(state, dvbc_regs, ARRAY_SIZE(dvbc_regs));
> + if (ret < 0)
> + return ret;
> +
> + /* dsp_addr_jump */
> + ret = si2165_writereg32(state, 0x0348, 0xf400);
> + if (ret < 0)
> + return ret;
> +
> + si2165_writereg32(state, 0x00c4, bw_hz);
> + si2165_writereg8(state, 0x00cb, 0x01);
> + si2165_writereg8(state, 0x00c0, 0x00);
> + si2165_writereg16(state, 0x024c, 0x);
> + si2165_writereg16(state, 0x027c, 0x);
> + si2165_writereg8(state, 0x0232, 0x03);
> + si2165_writereg8(state, 0x02f4, 0x0b);
> + si2165_writereg8(state, 0x00c0, 0x00);
> + si2165_writereg8(state, 0x018b, 0x00);
> +
> + return 0;
> +}
> +
> +static int si2165_set_frontend(struct dvb_frontend *fe)
> +{
> + struct si2165_state *state = fe->demodulator_priv;
> + struct dtv_frontend_properties *p = &fe->dtv_property_cache;
> + u32 delsys = p->delivery_system;
> + int ret;
> + u8 val[3];
> +
> + /* initial setting of if freq shift */
> + ret = si2165_set_if_freq_shift(state);
> + if (ret < 0)
> + return ret;
> +
> + switch (delsys) {
> + case SYS_DVBT:
> + ret = si2165_set_frontend_dvbt(fe);
> + if (ret < 0)
> + return ret;
> + break;
> + case SYS_DVBC_ANNEX_A:
> + ret = si2165_set_frontend_dvbc(fe);
> + if (ret < 0)
> + return ret;
> + break;
> + default:
> + return -EINVAL;
> + }
> +
>   if (fe->ops.tuner_ops.set_params)
>   fe->ops.tuner

[PATCH] [media] davinci: add i2c Kconfig dependencies

2015-11-19 Thread Arnd Bergmann
All the davinci media drivers are using the i2c framework, and
fail to build if that is ever disabled, e.g.:

media/platform/davinci/vpif_display.c: In function 'vpif_probe':
media/platform/davinci/vpif_display.c:1298:14: error: implicit declaration of 
function 'i2c_get_adapter' [-Werror=implicit-function-declaration]

This adds explicit Kconfig dependencies so we don't see the
driver options if I2C is turned off.

Signed-off-by: Arnd Bergmann 
---
This is a very rare randconfig error, normally I2C is enabled for some reason
already.

diff --git a/drivers/media/platform/davinci/Kconfig 
b/drivers/media/platform/davinci/Kconfig
index 469e9d28cec0..554e710de487 100644
--- a/drivers/media/platform/davinci/Kconfig
+++ b/drivers/media/platform/davinci/Kconfig
@@ -3,6 +3,7 @@ config VIDEO_DAVINCI_VPIF_DISPLAY
depends on VIDEO_V4L2
depends on ARCH_DAVINCI || COMPILE_TEST
depends on HAS_DMA
+   depends on I2C
select VIDEOBUF2_DMA_CONTIG
select VIDEO_ADV7343 if MEDIA_SUBDRV_AUTOSELECT
select VIDEO_THS7303 if MEDIA_SUBDRV_AUTOSELECT
@@ -19,6 +20,7 @@ config VIDEO_DAVINCI_VPIF_CAPTURE
depends on VIDEO_V4L2
depends on ARCH_DAVINCI || COMPILE_TEST
depends on HAS_DMA
+   depends on I2C
select VIDEOBUF2_DMA_CONTIG
help
  Enables Davinci VPIF module used for capture devices.
@@ -33,6 +35,7 @@ config VIDEO_DM6446_CCDC
depends on VIDEO_V4L2
depends on ARCH_DAVINCI || COMPILE_TEST
depends on HAS_DMA
+   depends on I2C
select VIDEOBUF_DMA_CONTIG
help
   Enables DaVinci CCD hw module. DaVinci CCDC hw interfaces
@@ -49,6 +52,7 @@ config VIDEO_DM355_CCDC
depends on VIDEO_V4L2
depends on ARCH_DAVINCI || COMPILE_TEST
depends on HAS_DMA
+   depends on I2C
select VIDEOBUF_DMA_CONTIG
help
   Enables DM355 CCD hw module. DM355 CCDC hw interfaces
@@ -64,6 +68,7 @@ config VIDEO_DM365_ISIF
tristate "TI DM365 ISIF video capture driver"
depends on VIDEO_V4L2 && ARCH_DAVINCI
depends on HAS_DMA
+   depends on I2C
select VIDEOBUF_DMA_CONTIG
help
   Enables ISIF hw module. This is the hardware module for
@@ -77,6 +82,7 @@ config VIDEO_DAVINCI_VPBE_DISPLAY
tristate "TI DaVinci VPBE V4L2-Display driver"
depends on VIDEO_V4L2 && ARCH_DAVINCI
depends on HAS_DMA
+   depends on I2C
select VIDEOBUF2_DMA_CONTIG
help
Enables Davinci VPBE module used for display devices.

--
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] DocBook: only copy stuff to media_api if media xml is generated

2015-11-19 Thread Mauro Carvalho Chehab
Em Thu, 19 Nov 2015 12:19:43 +0200
Sakari Ailus  escreveu:

> Hi Mauro,
> 
> On Thu, Nov 19, 2015 at 07:45:13AM -0200, Mauro Carvalho Chehab wrote:
> > It is possible to use:
> > make DOCBOOKS=device-drivers.xml htmldocs
> > 
> > To produce just a few docbooks. In such case, the media docs
> > won't be built, causing the makefile target to return an error.
> > 
> > While this is ok for human eyes, if the above is used on an script,
> > it would cause troubles.
> > 
> > Fix it by only creating/filling the media_api directory if the
> > media_api.xml is found at DOCBOOKS.
> > 
> > Signed-off-by: Mauro Carvalho Chehab 
> > ---
> >  Documentation/DocBook/media/Makefile | 6 --
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/DocBook/media/Makefile 
> > b/Documentation/DocBook/media/Makefile
> > index 02848146fc3a..2840ff483d5a 100644
> > --- a/Documentation/DocBook/media/Makefile
> > +++ b/Documentation/DocBook/media/Makefile
> > @@ -199,8 +199,10 @@ DVB_DOCUMENTED = \
> >  #
> >  
> >  install_media_images = \
> > -   $(Q)-mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
> > -   cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg 
> > $(MEDIA_OBJ_DIR)/media_api
> > +   $(Q)if [ "x$(findstring media_api.xml,$(DOCBOOKS))" != "x" ]; then \
> > +   mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
> > +   cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg 
> > $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api; \
> > +   fi
> >  
> >  $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
> > $(Q)base64 -d $< >$@
> 
> I'd still copy the files even if the directory was there. It's entirely
> possible that new files appeared between the make runs, or that the existing
> files changed. cp will just overwrite the targets in that case.
> 
> Albeit one still has to issue "make cleandocs" to get the DocBook rebuilt.
> Oh well... One thing at a time? :-)

I guess you misread the patch...

It unconditionally copy the files even if the media_api directory exists,
if make is called with:
make htmldocs

or with:
make DOCBOOKS=media_api.xml htmldocs

It will only suppress the copy and dir make if someone wants to build
some other html file, with something like:

make DOCBOOKS=device-drivers.xml htmldocs

Please notice that I use internally a script that detects when a patch
is merged on my tree. In such case, it builds the Kernel and the
documentation, if it is affected, with this logic:

cat Documentation/DocBook/device-drivers.tmpl |perl -ne 
'print "$1\n" if (m/^\!I(.*media.*)/)' >$TMPFILE
if [ "`git show $TAG|diffstat -p1 -l|grep -f $TMPFILE`" 
]; then
rm $TMPFILE
make DOCBOOKS=device-drivers.xml htmldocs 
2>&1|grep /media/
if [ "$?" != "0" ]; then
play ~/sounds/pipe.wav 2>/dev/null 
>/dev/null
fi
else
rm $TMPFILE
fi

Without this patch, it beeps all the times it runs, because 
cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg 
$(MEDIA_OBJ_DIR)/media_api; 

will fail, as no OBJIMGFILES would be produced.

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 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()

2015-11-19 Thread Arnd Bergmann
On Thursday 19 November 2015 12:34:22 Peter Ujfalusi wrote:
> 
> I think we can go with a single API, but I don't really like that:
> dma_request_channel(dev, name, *mask, fn, fn_param);
> 
> This would cover all current uses being legacy, DT/ACPI, compat, etc:
> dma_request_channel(NULL, NULL, &mask, fn, fn_param); /* Legacy slave */
> dma_request_channel(NULL, NULL, &mask, NULL, NULL); /* memcpy. etc */
> dma_request_channel(dev, name, NULL, NULL, NULL); /* DT/ACPI, current slave */
> dma_request_channel(dev, name, &mask, fn, fn_param); /* current compat */
> 
> Note, that we need "const dma_cap_mask_t *mask" to be able to make the mask
> optional.

Right, that would work, but I also don't really like it.

> If we have two main APIs, one to request slave channels and one to get any
> channel with given capability
> dma_request_slave_channel(NULL, NULL, &mask, fn, fn_param); /* Legacy slave */
> dma_request_slave_channel(dev, name, NULL, NULL, NULL); /* DT/ACPI, current
>slave */
> dma_request_slave_channel(dev, name, &mask, fn, fn_param); /* current compat*/
> 
> This way we can omit the mask also in cases when the client only want to get
> DMA_SLAVE, we can just build up the mask within the function. If the mask is
> provided we would copy the bits from the provided mask, so for example if you
> want to have DMA_SLAVE+DMA_CYCLIC, the driver only needs to pass DMA_CYCLIC,
> the DMA_SLAVE is going to be set anyways.

I think it's more logical here to have mask=NULL mean that we want DMA_SLAVE,
but otherwise pass the full mask as DMA_SLAVE|DMA_CYCLIC etc.

> dma_request_channel(mask); /* memcpy. etc, non slave mostly */
> 
> Not sure how to name this as reusing existing (good, descriptive) function
> names would mean changes all over the kernel to start off this.
> 
> Not used and
> request_dma_channel(); /* as _irq/_mem_region/_resource, etc */
> request_dma();
> dma_channel_request();

dma_request_slavechan();
dma_request_slave();
dma_request_mask();

> All in all, not sure which way would be better...

I think I would prefer the simplest API to have only the dev+name
arguments, as we tend to move that way for all platforms anyway, and it
seems silly to have all drivers pass three NULL arguments all the time.
At the moment, there are 139 references to dma_request_slave_channel_*
in the kernel, and only 46 of them are dma_request_slave_channel_compat.
Out of those 46, a couple can already be converted back to use
dma_request_slave_channel() because the platform now only supports
devicetree based boots and will not go back to platform data.

How about something like

extern struct dma_chan *
__dma_request_chan(struct device *dev, const char *name,
const dma_cap_mask_t *mask, dma_filter_fn fn, void 
*fn_param);

static inline struct dma_chan *
dma_request_slavechan(struct device *dev, const char *name)
{
return __dma_request_chan(dev, name, NULL, NULL, NULL);
}

static inline struct dma_chan *
dma_request_chan(const dma_cap_mask_t *mask)
{
return __dma_request_chan(NULL, NULL, mask, NULL, NULL);
}

That way the vast majority of drivers can use one of the two nice interfaces
and the rest can be converted to use __dma_request_chan().

On a related topic, we had in the past considered providing a way for
platform code to register a lookup table of some sort, to associate
a device/name pair with a configuration. That would let us use the
simplified dma_request_slavechan(dev, name) pair everywhere. We could
use the same method that we have for clk_register_clkdevs() or
pinctrl_register_map().

Something like either

static struct dma_chan_map myplatform_dma_map[] = {
{ .devname = "omap-aes0", .slave = "tx", .filter = omap_dma_filter_fn, 
.arg = (void *)65, },
{ .devname = "omap-aes0", .slave = "rx", .filter = omap_dma_filter_fn, 
.arg = (void *)66, },
};

or

static struct dma_chan_map myplatform_dma_map[] = {
{ .devname = "omap-aes0", .slave = "tx", .master = "omap-dma-engine0", 
.req = 65, },
{ .devname = "omap-aes0", .slave = "rx", .master = "omap-dma-engine0", 
.req = 66, },
};

we could even allow a combination of the two, so the simple case just specifies
master and req number, which requires changes to the dmaengine driver, but we 
could
also do a mass-conversion to the .filter/.arg variant.

Arnd
--
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 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()

2015-11-19 Thread Peter Ujfalusi
On 11/18/2015 05:46 PM, Andy Shevchenko wrote:
> On Wed, Nov 18, 2015 at 4:21 PM, Peter Ujfalusi  wrote:
>> Hi Vinod,
>>
>> bringing this old thread back to life as I just started to work on this.
> 
> What I remember we need to convert drivers to use new API meanwhile it
> is good to keep old one to avoid patch storm which does nothing useful
> (IIRC Russel's opinion).

I tend to agree. But we need to start converting the users at some point
either way.
Another issue is the fact that the current dmaengine API is using all the good
names I can think of ;)

> On the other hand there are a lot of drivers that are used on the set
> of platforms starting from legacy and abandoned ones (like AVR32) to
> relatively new and newest.
> 
> And I'm not a fan of those thousands of API calls either.
> 

-- 
Péter
--
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 02/13] dmaengine: Introduce dma_request_slave_channel_compat_reason()

2015-11-19 Thread Peter Ujfalusi
On 11/18/2015 05:07 PM, Arnd Bergmann wrote:
> On Wednesday 18 November 2015 16:41:35 Peter Ujfalusi wrote:
>> On 11/18/2015 04:29 PM, Arnd Bergmann wrote:
>>> On Wednesday 18 November 2015 16:21:26 Peter Ujfalusi wrote:
 2. non slave channel requests, where only the functionality matters, like
 memcpy, interleaved, memset, etc.
 We could have a simple:
 dma_request_channel(mask);

 But looking at the drivers using dmaengine legacy dma_request_channel() 
 API:
 Some sets DMA_INTERRUPT or DMA_PRIVATE or DMA_SG along with DMA_SLAVE:
 drivers/misc/carma/carma-fpga.c 
 DMA_INTERRUPT|DMA_SLAVE|DMA_SG
 drivers/misc/carma/carma-fpga-program.c DMA_MEMCPY|DMA_SLAVE|DMA_SG
 drivers/media/platform/soc_camera/mx3_camera.c  DMA_SLAVE|DMA_PRIVATE
 sound/soc/intel/common/sst-firmware.c   DMA_SLAVE|DMA_MEMCPY

 as examples.
 Not sure how valid are these...
> 
> I just had a look myself. carma has been removed fortunately in linux-next,
> so we don't have to worry about that any more.
> 
> I assume that the sst-firmware.c case is a mistake, it should just use a
> plain DMA_SLAVE and not DMA_MEMCPY.
> 
> Aside from these, everyone else uses either DMA_CYCLIC in addition to
> DMA_SLAVE, which seems valid, or they use DMA_PRIVATE, which I think is
> redundant in slave drivers and can be removed.

Yep, CYCLIC. How could I forgot that ;)

>>> It's usually not much harder to separate out the legacy case from
>>> the normal dma_request_slave_channel_reason(), so those drivers don't
>>> really need to use the unified compat API.
>>
>> The current dma_request_slave_channel()/_reason() is not the 'legacy' API.
>> Currently there is no way to get the reason why the dma channel request fails
>> when using the _compat() version of the API, which is used by drivers which
>> can be used in DT or in legacy mode as well. Sure, they all could have local
>> if(){}else{} for handling this, but it is not a nice thing.
>>
>> As it was discussed instead of adding the _reason() version for the _compat
>> call, we should simplify the dmaengine API for getting the channel and at the
>> same time we will have ERR_PTR returned instead of NULL.
> 
> What I meant was that we don't need to handle them with the unified
> simple interface. The users of DMA_CYCLIC can just keep using
> an internal helper that only deals with the legacy case, or use
> dma_request_slave() or whatever is the new API for the DT case.

I think we can go with a single API, but I don't really like that:
dma_request_channel(dev, name, *mask, fn, fn_param);

This would cover all current uses being legacy, DT/ACPI, compat, etc:
dma_request_channel(NULL, NULL, &mask, fn, fn_param); /* Legacy slave */
dma_request_channel(NULL, NULL, &mask, NULL, NULL); /* memcpy. etc */
dma_request_channel(dev, name, NULL, NULL, NULL); /* DT/ACPI, current slave */
dma_request_channel(dev, name, &mask, fn, fn_param); /* current compat */

Note, that we need "const dma_cap_mask_t *mask" to be able to make the mask
optional.

If we have two main APIs, one to request slave channels and one to get any
channel with given capability
dma_request_slave_channel(NULL, NULL, &mask, fn, fn_param); /* Legacy slave */
dma_request_slave_channel(dev, name, NULL, NULL, NULL); /* DT/ACPI, current
   slave */
dma_request_slave_channel(dev, name, &mask, fn, fn_param); /* current compat*/

This way we can omit the mask also in cases when the client only want to get
DMA_SLAVE, we can just build up the mask within the function. If the mask is
provided we would copy the bits from the provided mask, so for example if you
want to have DMA_SLAVE+DMA_CYCLIC, the driver only needs to pass DMA_CYCLIC,
the DMA_SLAVE is going to be set anyways.

dma_request_channel(mask); /* memcpy. etc, non slave mostly */

Not sure how to name this as reusing existing (good, descriptive) function
names would mean changes all over the kernel to start off this.

Not used and
request_dma_channel(); /* as _irq/_mem_region/_resource, etc */
request_dma();
dma_channel_request();

All in all, not sure which way would be better...

-- 
Péter
--
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] DocBook: only copy stuff to media_api if media xml is generated

2015-11-19 Thread Sakari Ailus
Hi Mauro,

On Thu, Nov 19, 2015 at 07:45:13AM -0200, Mauro Carvalho Chehab wrote:
> It is possible to use:
>   make DOCBOOKS=device-drivers.xml htmldocs
> 
> To produce just a few docbooks. In such case, the media docs
> won't be built, causing the makefile target to return an error.
> 
> While this is ok for human eyes, if the above is used on an script,
> it would cause troubles.
> 
> Fix it by only creating/filling the media_api directory if the
> media_api.xml is found at DOCBOOKS.
> 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  Documentation/DocBook/media/Makefile | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/DocBook/media/Makefile 
> b/Documentation/DocBook/media/Makefile
> index 02848146fc3a..2840ff483d5a 100644
> --- a/Documentation/DocBook/media/Makefile
> +++ b/Documentation/DocBook/media/Makefile
> @@ -199,8 +199,10 @@ DVB_DOCUMENTED = \
>  #
>  
>  install_media_images = \
> - $(Q)-mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
> - cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg 
> $(MEDIA_OBJ_DIR)/media_api
> + $(Q)if [ "x$(findstring media_api.xml,$(DOCBOOKS))" != "x" ]; then \
> + mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
> + cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg 
> $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api; \
> + fi
>  
>  $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
>   $(Q)base64 -d $< >$@

I'd still copy the files even if the directory was there. It's entirely
possible that new files appeared between the make runs, or that the existing
files changed. cp will just overwrite the targets in that case.

Albeit one still has to issue "make cleandocs" to get the DocBook rebuilt.
Oh well... One thing at a time? :-)

-- 
Cheers,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
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] DocBook: only copy stuff to media_api if media xml is generated

2015-11-19 Thread Mauro Carvalho Chehab
It is possible to use:
make DOCBOOKS=device-drivers.xml htmldocs

To produce just a few docbooks. In such case, the media docs
won't be built, causing the makefile target to return an error.

While this is ok for human eyes, if the above is used on an script,
it would cause troubles.

Fix it by only creating/filling the media_api directory if the
media_api.xml is found at DOCBOOKS.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/DocBook/media/Makefile | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/DocBook/media/Makefile 
b/Documentation/DocBook/media/Makefile
index 02848146fc3a..2840ff483d5a 100644
--- a/Documentation/DocBook/media/Makefile
+++ b/Documentation/DocBook/media/Makefile
@@ -199,8 +199,10 @@ DVB_DOCUMENTED = \
 #
 
 install_media_images = \
-   $(Q)-mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
-   cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg 
$(MEDIA_OBJ_DIR)/media_api
+   $(Q)if [ "x$(findstring media_api.xml,$(DOCBOOKS))" != "x" ]; then \
+   mkdir -p $(MEDIA_OBJ_DIR)/media_api; \
+   cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg 
$(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api; \
+   fi
 
 $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
$(Q)base64 -d $< >$@
-- 
2.5.0


--
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: [BUG] TechniSat SkyStar S2 - problem tuning DVB-S2 channels

2015-11-19 Thread Jemma Denson

Hi Robert,

On 18/11/15 19:08, Robert wrote:

Normally i'm using kaffeine, but i have tried dvbv5-scan now.
Unfortunately it segfaults. I have attached the full output including
the backtrace [1]



I can't help with the segfault I'm afraid, but looking at that log it is 
definitely not managing to lock to any of the DVB-S2 transponders. The 
driver does work fine on S2 for me, but I am only able to test on 28.2E. 
Patrick did some testing on 19.2E so I'm going to cc him into this to 
confirm it does work there on S2.


In the meantime it might be worth checking that it is being tuned with 
the right parameters - I included some dynamic debug output to see what 
it was being asked to do when tuning:


echo 'file cx24120.c func cx24120_set_frontend +pf' > 
/sys/kernel/debug/dynamic_debug/control


This should output something like this in dmesg:

[2995692.044792] cx24120_set_frontend: i2c i2c-9: DVB-S2
[2995692.044799] cx24120_set_frontend: i2c i2c-9: delsys  = 6
[2995692.044802] cx24120_set_frontend: i2c i2c-9: modulation  = 9
[2995692.044805] cx24120_set_frontend: i2c i2c-9: frequency   = 1097000
[2995692.044808] cx24120_set_frontend: i2c i2c-9: pilot   = 0 (val = 
0x40)
[2995692.044811] cx24120_set_frontend: i2c i2c-9: symbol_rate = 2300 
(clkdiv/ratediv = 0x03/0x06)
[2995692.044814] cx24120_set_frontend: i2c i2c-9: FEC = 2 
(mask/val = 0x00/0x0d)
[2995692.044817] cx24120_set_frontend: i2c i2c-9: Inversion   = 2 (val = 
0x0c)


Hopefully from there it should be possible to see if it's being sent the 
correct parameters.


Regards,

Jemma.
--
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 2/9] [media] tvp5150: add userspace subdev API

2015-11-19 Thread Mauro Carvalho Chehab
Em Thu, 19 Nov 2015 09:59:15 +0100
Lucas Stach  escreveu:

> Am Donnerstag, den 19.11.2015, 01:06 +0800 schrieb kbuild test robot:
> > Hi Philipp,
> > 
> > [auto build test ERROR on: v4.4-rc1]
> > [also build test ERROR on: next-20151118]
> > [cannot apply to: linuxtv-media/master]
> > 
> > url:
> > https://github.com/0day-ci/linux/commits/Lucas-Stach/tvp5150-convert-register-access-to-regmap/20151119-005732
> > config: x86_64-randconfig-x018-11181928 (attached as .config)
> > reproduce:
> > # save the attached .config to linux build tree
> > make ARCH=x86_64 
> > 
> > All error/warnings (new ones prefixed by >>):
> > 
> >drivers/media/i2c/tvp5150.c: In function 'tvp5150_get_pad_format':
> > >> drivers/media/i2c/tvp5150.c:1062:10: error: implicit declaration of 
> > >> function 'v4l2_subdev_get_try_format' 
> > >> [-Werror=implicit-function-declaration]
> >   return v4l2_subdev_get_try_format(sd, cfg, pad);
> >  ^
> > >> drivers/media/i2c/tvp5150.c:1062:10: warning: return makes pointer from 
> > >> integer without a cast [-Wint-conversion]
> >drivers/media/i2c/tvp5150.c: In function 'tvp5150_get_pad_crop':
> > >> drivers/media/i2c/tvp5150.c:1077:10: error: implicit declaration of 
> > >> function 'v4l2_subdev_get_try_crop' 
> > >> [-Werror=implicit-function-declaration]
> >   return v4l2_subdev_get_try_crop(sd, cfg, pad);
> >  ^
> >drivers/media/i2c/tvp5150.c:1077:10: warning: return makes pointer from 
> > integer without a cast [-Wint-conversion]
> >drivers/media/i2c/tvp5150.c: In function 'tvp5150_open':
> > >> drivers/media/i2c/tvp5150.c:1180:27: warning: passing argument 2 of 
> > >> 'tvp5150_set_default' makes pointer from integer without a cast 
> > >> [-Wint-conversion]
> >  tvp5150_set_default(std, v4l2_subdev_get_try_crop(fh, 0),
> >   ^
> >drivers/media/i2c/tvp5150.c:1152:13: note: expected 'struct v4l2_rect *' 
> > but argument is of type 'int'
> > static void tvp5150_set_default(v4l2_std_id std, struct v4l2_rect *crop,
> > ^
> >drivers/media/i2c/tvp5150.c:1181:6: warning: passing argument 3 of 
> > 'tvp5150_set_default' makes pointer from integer without a cast 
> > [-Wint-conversion]
> >  v4l2_subdev_get_try_format(fh, 0));
> >  ^
> >drivers/media/i2c/tvp5150.c:1152:13: note: expected 'struct 
> > v4l2_mbus_framefmt *' but argument is of type 'int'
> > static void tvp5150_set_default(v4l2_std_id std, struct v4l2_rect *crop,
> > ^
> >drivers/media/i2c/tvp5150.c: In function 'tvp5150_probe':
> > >> drivers/media/i2c/tvp5150.c:1340:4: error: 'struct v4l2_subdev' has no 
> > >> member named 'entity'
> >  sd->entity.flags |= MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
> >^
> >drivers/media/i2c/tvp5150.c:1342:29: error: 'struct v4l2_subdev' has no 
> > member named 'entity'
> >  res = media_entity_init(&sd->entity, 1, &core->pad, 0);
> > ^
> >cc1: some warnings being treated as errors
> 
> Ok, this is just a missing depends on VIDEO_V4L2_SUBDEV_API. I'll wait
> for other feedback before resending with that fixed.

Lucas,

Please notice that tvp5150 is used by drivers that doesn't need nor
want VIDEO_V4L2_SUBDEV_API. So, you should be sure that the driver
will compile fine without subdev API, and will keep working properly
for those devices, no matter if subdev API was compiled or not.

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 2/9] [media] tvp5150: add userspace subdev API

2015-11-19 Thread Lucas Stach
Am Donnerstag, den 19.11.2015, 01:06 +0800 schrieb kbuild test robot:
> Hi Philipp,
> 
> [auto build test ERROR on: v4.4-rc1]
> [also build test ERROR on: next-20151118]
> [cannot apply to: linuxtv-media/master]
> 
> url:
> https://github.com/0day-ci/linux/commits/Lucas-Stach/tvp5150-convert-register-access-to-regmap/20151119-005732
> config: x86_64-randconfig-x018-11181928 (attached as .config)
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64 
> 
> All error/warnings (new ones prefixed by >>):
> 
>drivers/media/i2c/tvp5150.c: In function 'tvp5150_get_pad_format':
> >> drivers/media/i2c/tvp5150.c:1062:10: error: implicit declaration of 
> >> function 'v4l2_subdev_get_try_format' 
> >> [-Werror=implicit-function-declaration]
>   return v4l2_subdev_get_try_format(sd, cfg, pad);
>  ^
> >> drivers/media/i2c/tvp5150.c:1062:10: warning: return makes pointer from 
> >> integer without a cast [-Wint-conversion]
>drivers/media/i2c/tvp5150.c: In function 'tvp5150_get_pad_crop':
> >> drivers/media/i2c/tvp5150.c:1077:10: error: implicit declaration of 
> >> function 'v4l2_subdev_get_try_crop' [-Werror=implicit-function-declaration]
>   return v4l2_subdev_get_try_crop(sd, cfg, pad);
>  ^
>drivers/media/i2c/tvp5150.c:1077:10: warning: return makes pointer from 
> integer without a cast [-Wint-conversion]
>drivers/media/i2c/tvp5150.c: In function 'tvp5150_open':
> >> drivers/media/i2c/tvp5150.c:1180:27: warning: passing argument 2 of 
> >> 'tvp5150_set_default' makes pointer from integer without a cast 
> >> [-Wint-conversion]
>  tvp5150_set_default(std, v4l2_subdev_get_try_crop(fh, 0),
>   ^
>drivers/media/i2c/tvp5150.c:1152:13: note: expected 'struct v4l2_rect *' 
> but argument is of type 'int'
> static void tvp5150_set_default(v4l2_std_id std, struct v4l2_rect *crop,
> ^
>drivers/media/i2c/tvp5150.c:1181:6: warning: passing argument 3 of 
> 'tvp5150_set_default' makes pointer from integer without a cast 
> [-Wint-conversion]
>  v4l2_subdev_get_try_format(fh, 0));
>  ^
>drivers/media/i2c/tvp5150.c:1152:13: note: expected 'struct 
> v4l2_mbus_framefmt *' but argument is of type 'int'
> static void tvp5150_set_default(v4l2_std_id std, struct v4l2_rect *crop,
> ^
>drivers/media/i2c/tvp5150.c: In function 'tvp5150_probe':
> >> drivers/media/i2c/tvp5150.c:1340:4: error: 'struct v4l2_subdev' has no 
> >> member named 'entity'
>  sd->entity.flags |= MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
>^
>drivers/media/i2c/tvp5150.c:1342:29: error: 'struct v4l2_subdev' has no 
> member named 'entity'
>  res = media_entity_init(&sd->entity, 1, &core->pad, 0);
> ^
>cc1: some warnings being treated as errors

Ok, this is just a missing depends on VIDEO_V4L2_SUBDEV_API. I'll wait
for other feedback before resending with that fixed.

Regards,
Lucas

-- 
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions   | http://www.pengutronix.de/  |

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


Fw: [PATCH] [media] tda10023: fix wrong register assignment

2015-11-19 Thread Mauro Carvalho Chehab
Antti,

Could you please review this patch?

Thanks!
Mauro

Forwarded message:

Date: Tue, 8 Sep 2015 09:43:04 +0200
From: Manuel Kampert 
To: linux-media@vger.kernel.org
Subject: [PATCH] [media] tda10023: fix wrong register assignment


Register INTP1 (0x12) Bit POCLKP (bit 0) sets the output clock polarity 
of tda10023 . However, the driver tries to set the parallel output mode 
in this register which is not correct.

Parallel output mode is set on register INTP2 (0x20) INTPSEL (bit 1/0) .

Drivers affected by this patch are the anysee devices.

Signed-off-by: Manuel Kampert 
---
diff --git a/drivers/media/dvb-frontends/tda10023.c 
b/drivers/media/dvb-frontends/tda10023.c

--- a/drivers/media/dvb-frontends/tda10023.c
+++ b/drivers/media/dvb-frontends/tda10023.c
@@ -269,10 +269,9 @@ static int tda10023_init (struct dvb_frontend *fe)
/* 084 */ 0x02, 0xff, 0x93, /* AGCCONF1 IFS=1 KAGCIF=2 KAGCTUN=3 */
/* 087 */ 0x2d, 0xff, 0xf6, /* SWEEP SWPOS=1 SWDYN=7 SWSTEP=1 SWLEN=2 */
/* 090 */ 0x04, 0x10, 0x00, /* SWRAMP=1 */
-/* 093 */ 0x12, 0xff, TDA10023_OUTPUT_MODE_PARALLEL_B, /*
- INTP1 POCLKP=1 FEL=1 MFS=0 */
+/* 093 */ 0x12, 0xff, 0xa1, /* POCLKP=1 */
/* 096 */ 0x2b, 0x01, 0xa1, /* INTS1 */
-/* 099 */ 0x20, 0xff, 0x04, /* INTP2 SWAPP=? MSBFIRSTP=? INTPSEL=? */
+/* 099 */ 0x20, 0xff, TDA10023_OUTPUT_MODE_PARALLEL_B, /* INTPSEL=? */
/* 102 */ 0x2c, 0xff, 0x0d, /* INTP/S TRIP=0 TRIS=0 */
/* 105 */ 0xc4, 0xff, 0x00,
/* 108 */ 0xc3, 0x30, 0x00,
@@ -291,7 +290,7 @@ static int tda10023_init (struct dvb_frontend *fe)
}

if (state->config->output_mode)
- tda10023_inittab[95] = state->config->output_mode;
+ tda10023_inittab[101] = state->config->output_mode;

tda10023_writetab(state, tda10023_inittab);

diff --git a/drivers/media/dvb-frontends/tda1002x.h 
b/drivers/media/dvb-frontends/tda1002x.h
index 0d33461..dc7258f 100644
--- a/drivers/media/dvb-frontends/tda1002x.h
+++ b/drivers/media/dvb-frontends/tda1002x.h
@@ -33,9 +33,9 @@ struct tda1002x_config {
};

enum tda10023_output_mode {
- TDA10023_OUTPUT_MODE_PARALLEL_A = 0xe0,
- TDA10023_OUTPUT_MODE_PARALLEL_B = 0xa1,
- TDA10023_OUTPUT_MODE_PARALLEL_C = 0xa0,
+ TDA10023_OUTPUT_MODE_PARALLEL_A = 0x04,
+ TDA10023_OUTPUT_MODE_PARALLEL_B = 0x05,
+ TDA10023_OUTPUT_MODE_PARALLEL_C = 0x06,
TDA10023_OUTPUT_MODE_SERIAL, /* TODO: not implemented */
};

diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c 
b/drivers/media/usb/dvb-usb-v2/anysee.c
index ae917c0..698a1d2 100644
--- a/drivers/media/usb/dvb-usb-v2/anysee.c
+++ b/drivers/media/usb/dvb-usb-v2/anysee.c
@@ -291,7 +291,6 @@ static struct tda10023_config anysee_tda10023_config = {
.pll_m = 11,
.pll_p = 3,
.pll_n = 1,
- .output_mode = TDA10023_OUTPUT_MODE_PARALLEL_C,
.deltaf = 0xfeeb,
};

@@ -327,7 +326,6 @@ static struct tda10023_config 
anysee_tda10023_tda18212_config = {
.pll_m = 12,
.pll_p = 3,
.pll_n = 1,
- .output_mode = TDA10023_OUTPUT_MODE_PARALLEL_B,
.deltaf = 0xba02,
};

@@ -781,6 +779,11 @@ static int anysee_frontend_attach(struct 
dvb_usb_adapter *adap)
adap->fe[0] = dvb_attach(tda10023_attach,
&anysee_tda10023_config, &d->i2c_adap, 0x48);

+ /* output clock polarity */
+ ret = anysee_write_reg(d, 0x12, 0xa0);
+ if (ret)
+ goto error;
+
break;
case ANYSEE_HW_507SI: /* 11 */
/* E30 S2 Plus */
@@ -846,6 +849,11 @@ static int anysee_frontend_attach(struct 
dvb_usb_adapter *adap)
adap->fe[0] = dvb_attach(tda10023_attach,
&anysee_tda10023_config,
&d->i2c_adap, 0x48);
+
+ /* output clock polarity */
+ ret = anysee_write_reg(d, 0x12, 0xa0);
+ if (ret)
+ goto error;
}

/* break out if first frontend attaching fails */
--
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