[PATCH 5/9] cxd2820r: wrap legacy DVBv3 statistics via DVBv5 statistics

2016-09-02 Thread Antti Palosaari
Return DVBv5 statistics via legacy DVBv3 API. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/cxd2820r_c.c| 108 drivers/media/dvb-frontends/cxd2820r_core.c | 85 ++ drivers/media/dvb-frontends/cxd2820r_priv.h | 25

[PATCH 6/9] cxd2820r: add I2C driver bindings

2016-09-02 Thread Antti Palosaari
Add I2C driver bindings in order to support proper I2C driver registration with driver core. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/cxd2820r.h | 26 drivers/media/dvb-frontends/cxd2820r_c.c| 6 +- drivers/media/dvb-frontends/cxd2820r_core.c | 190

[PATCH 1/9] cxd2820r: improve IF frequency setting

2016-09-02 Thread Antti Palosaari
Use 64-bit calculation. Return error if tuner does not provide get_if_frequency() callback. All currently used tuners has it. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/cxd2820r_c.c| 26 +++ drivers/media/dvb-frontends/cxd2820r_priv.h | 2

[PATCH 8/9] cxd2820r: improve lock detection

2016-09-02 Thread Antti Palosaari
Check demod and ts locks and report lock status according to those. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/cxd2820r_c.c | 29 drivers/media/dvb-frontends/cxd2820r_t.c | 44 --- drivers/media/dvb-frontends/cxd2820r_t2.c

[PATCH 2/9] cxd2820r: dvbv5 statistics for DVB-T

2016-09-02 Thread Antti Palosaari
Implement dvbv5 statistics for DVB-T. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/cxd2820r_priv.h | 2 + drivers/media/dvb-frontends/cxd2820r_t.c| 88 + 2 files changed, 90 insertions(+) diff --git a/drivers/media/dvb-frontends

[PATCH 7/9] cxd2820r: correct logging

2016-09-02 Thread Antti Palosaari
Use correct device for logging functions as we now have it due to proper I2C client bindings. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/cxd2820r_c.c| 33 +--- drivers/media/dvb-frontends/cxd2820r_core.c | 115 +++- drivers/media/dvb

[PATCH 9/9] cxd2820r: convert to regmap api

2016-09-02 Thread Antti Palosaari
Use regmap for I2C register access. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/Kconfig | 1 + drivers/media/dvb-frontends/cxd2820r_c.c| 56 +++--- drivers/media/dvb-frontends/cxd2820r_core.c | 259 ++-- drivers/media/dvb-frontends

[PATCH 3/9] cxd2820r: dvbv5 statistics for DVB-T2

2016-09-02 Thread Antti Palosaari
Implement dvbv5 statistics for DVB-T2. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/cxd2820r_t2.c | 77 ++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/cxd2820r_t2.c b/drivers/media/dvb-frontends

[PATCH 4/9] cxd2820r: dvbv5 statistics for DVB-C

2016-09-02 Thread Antti Palosaari
Implement dvbv5 statistics for DVB-C. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/cxd2820r_c.c | 104 ++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c b/drivers/media/dvb-frontends

[PATCH] af9035: fix dual tuner detection with PCTV 79e

2016-09-02 Thread Antti Palosaari
el Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/af9035.c | 53 +++ drivers/media/usb/dvb-usb-v2/af9035.h | 2 +- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v

[GIT PULL STABLE 4.6] af9035 regression

2016-09-02 Thread Antti Palosaari
The following changes since commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a: Linux 4.6 (2016-05-15 15:43:13 -0700) are available in the git repository at: git://linuxtv.org/anttip/media_tree.git af9035_fix for you to fetch changes up to 7bb87ff5255defe87916f32cd1fcef163a489339: af9035:

Re: [GIT PULL STABLE 4.6] af9035 regression

2016-09-09 Thread Antti Palosaari
On 09/09/2016 05:49 PM, Mauro Carvalho Chehab wrote: Hi Antti, Em Sat, 3 Sep 2016 02:40:52 +0300 Antti Palosaari escreveu: The following changes since commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a: Linux 4.6 (2016-05-15 15:43:13 -0700) Is this patchset really meant to Kernel 4.6? if

[GIT PULL] cxd2820r improvements

2016-09-10 Thread Antti Palosaari
fetch changes up to 18905adf08ffc82417663539d1a703014505582f: cxd2820r: convert to regmap api (2016-09-03 01:30:22 +0300) Antti Palosaari (9): cxd2820r: improve IF frequency setting cxd2820r: dvbv5 statistics for DVB-T

Re: [PATCH] [media] staging/media/cec: fix coding style error

2016-09-11 Thread Antti Palosaari
On 09/11/2016 07:07 PM, Richard wrote: Greetings Linux Kernel Developers, This is Task 10 of the Eudyptula Challenge, i fix few line over 80 characters, hope you will accept this pacth. /Richard For the eudyptula challenge (http://eudyptula-challenge.org/). Simple style fix for few line over 8

Re: [PATCH 00/26] Don't use stack for DMA transers on dvb-usb drivers

2016-10-10 Thread Antti Palosaari
Hello If you use usb buffers from the state you will need add lock in order to protect concurrent access to buffer. There may have multiple concurrent operations from rc-polling/demux/frontend. Lets say you are reading ber and it sets data to buffer (state), then context switch to remote contr

Re: [PATCH] [media] tda18212: fix use-after-free in tda18212_remove()

2017-12-15 Thread Antti Palosaari
4.028991] == [ 154.029006] Disabling lock debugging due to kernel taint Fix this by removing the memcpy and the NULL assign. Cc: Antti Palosaari Signed-off-by: Daniel Scheller --- drivers/media/tuners/tda18212.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/media/tuners/tda1

Re: [PATCH] [media] tda18212: fix use-after-free in tda18212_remove()

2017-12-15 Thread Antti Palosaari
On 12/15/2017 08:00 PM, Daniel Scheller wrote: Hi, On Fri, 15 Dec 2017 19:30:18 +0200 Antti Palosaari wrote: Thanks for your reply. Hello I think shared frontend structure, which is owned by demod driver, should be there and valid on time tuner driver is removed. And thus should not

Re: [PATCH] [media] tda18212: fix use-after-free in tda18212_remove()

2017-12-15 Thread Antti Palosaari
On 12/15/2017 08:40 PM, Daniel Scheller wrote: On Fri, 15 Dec 2017 20:12:18 +0200 Antti Palosaari wrote: On 12/15/2017 08:00 PM, Daniel Scheller wrote: Hi, On Fri, 15 Dec 2017 19:30:18 +0200 Antti Palosaari wrote: Thanks for your reply. Hello I think shared frontend structure

Re: [PATCH 3/7] si2157: Add hybrid tuner support

2018-01-15 Thread Antti Palosaari
_warn(&client->dev, + "media_device_regiser_entity returns %d\n", ret); + media_entity_cleanup(&dev->ent); + goto fail_instance; + } + } +#endif + mutex_unlock(&si2157_

Re: [PATCH 4/7] si2168: Add ts bus coontrol, turn off bus on sleep

2018-01-15 Thread Antti Palosaari
Hello And what is rationale here, is there some use case demod must be active and ts set to tristate (disabled)? Just put demod sleep when you don't use it. regards Antti On 01/12/2018 06:19 PM, Brad Love wrote: Includes a function to set TS MODE property os si2168. The function either disab

Re: [PATCH 6/7] si2168: Announce frontend creation failure

2018-01-15 Thread Antti Palosaari
hmmm, IIRC driver core even prints some error when driver probe fails? After that you could enable module debug logging to see more information. So I don't see point for that change. regards Antti On 01/12/2018 06:19 PM, Brad Love wrote: The driver outputs on success, but is silent on failure

Re: [PATCH 4/7] si2168: Add ts bus coontrol, turn off bus on sleep

2018-01-16 Thread Antti Palosaari
On 01/16/2018 07:31 PM, Brad Love wrote: On 2018-01-15 23:07, Antti Palosaari wrote: Hello And what is rationale here, is there some use case demod must be active and ts set to tristate (disabled)? Just put demod sleep when you don't use it. regards Antti Hello Antti, Perhap

Re: [PATCH 4/7] si2168: Add ts bus coontrol, turn off bus on sleep

2018-01-16 Thread Antti Palosaari
On 01/16/2018 10:14 PM, Brad Love wrote: On 2018-01-16 13:32, Antti Palosaari wrote: On 01/16/2018 07:31 PM, Brad Love wrote: On 2018-01-15 23:07, Antti Palosaari wrote: Hello And what is rationale here, is there some use case demod must be active and ts set to tristate (disabled)? Just put

Re: [PATCH v2 1/2] si2168: Add spectrum inversion property

2018-01-17 Thread Antti Palosaari
On 01/17/2018 11:52 PM, Brad Love wrote: Some tuners produce inverted spectrum, but the si2168 is not currently set up to accept it. This adds an optional parameter to set the frontend up to receive inverted spectrum. Parameter is optional and only boards who enable inversion will utilize this

Re: [PATCH v2 1/2] si2168: Add spectrum inversion property

2018-01-17 Thread Antti Palosaari
On 01/18/2018 03:58 AM, Brad Love wrote: On 2018-01-17 16:08, Brad Love wrote: On 2018-01-17 16:02, Antti Palosaari wrote: On 01/17/2018 11:52 PM, Brad Love wrote: Some tuners produce inverted spectrum, but the si2168 is not currently set up to accept it. This adds an optional parameter to

Re: [PATCH 1/4] si2157: add detection of si2177 tuner

2019-01-09 Thread Antti Palosaari
On 12/20/18 11:57 PM, Brad Love wrote: Works in ATSC and QAM as is, DVB is completely untested. Firmware required. Signed-off-by: Brad Love --- drivers/media/tuners/si2157.c | 6 ++ drivers/media/tuners/si2157_priv.h | 3 ++- #define SI2158_A20_FIRMWARE "dvb-tuner-si2158-a20-0

Re: [PATCH 02/13] si2157: Check error status bit on cmd execute

2019-01-09 Thread Antti Palosaari
On 12/29/18 7:51 PM, Brad Love wrote: Check error status bit on command execute, if error bit is set return -EAGAIN. Ignore -EAGAIN in probe during device check. Signed-off-by: Brad Love --- drivers/media/tuners/si2157.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) dif

Re: [PATCH] media: m88ds3103: serialize reset messages in m88ds3103_set_frontend

2019-01-20 Thread Antti Palosaari
On 1/13/19 11:13 PM, James Hutchinson wrote: Ref: https://bugzilla.kernel.org/show_bug.cgi?id=199323 Users are experiencing problems with the DVBSky S960/S960C USB devices since the following commit: 9d659ae: ("locking/mutex: Add lock handoff to avoid starvation") The device malfunctions after

Re: [PATCH 04/13] si2157: Add clock and pin setup for si2141

2019-01-20 Thread Antti Palosaari
On 12/29/18 7:51 PM, Brad Love wrote: Include some missing setup for si2141 Signed-off-by: Brad Love --- drivers/media/tuners/si2157.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c index f3a60a1..1ad2d42

Re: [PATCH 12/13] si2157: add on-demand rf strength func

2019-01-20 Thread Antti Palosaari
On 12/29/18 7:51 PM, Brad Love wrote: Add get_rf_strength callback to get RSSI from the tuner. DVBv5 stat cache is updated. Signed-off-by: Brad Love --- drivers/media/tuners/si2157.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] media: m88ds3103: serialize reset messages in m88ds3103_set_frontend

2019-01-22 Thread Antti Palosaari
On 1/22/19 1:08 PM, James Hutchinson wrote: On Sun, Jan 20, 2019 at 04:43:08PM +0200, Antti Palosaari wrote: On 1/13/19 11:13 PM, James Hutchinson wrote: Ref: https://bugzilla.kernel.org/show_bug.cgi?id=199323 Users are experiencing problems with the DVBSky S960/S960C USB devices since the

Re: [PATCH] dvb_usb_dvbsky: Mygica T230C2 add support for T230C hw version 2

2019-06-11 Thread Antti Palosaari
On 6/8/19 5:49 AM, JP wrote: I made the Mygica T230c2 work on kernel 5.1.7, but I have no idea how to submit this. http://jpvw.nl/pub/test/dvb/linux-5.1.7-t230c2.patch Please can someone help me out. It looks like the extra code in the demodulator does not effect other drivers that use it. Te

Re: [PATCH] dvb_usb_dvbsky: Mygica T230C2 add support for T230C hw version 2

2019-06-11 Thread Antti Palosaari
On 6/12/19 2:27 AM, JP wrote: On 6/12/19 12:28 AM, Antti Palosaari wrote: On 6/8/19 5:49 AM, JP wrote: I made the Mygica T230c2 work on kernel 5.1.7, but I have no idea how to submit this. http://jpvw.nl/pub/test/dvb/linux-5.1.7-t230c2.patch Please can someone help me out. It looks

Re: [PATCH] dvb_usb_dvbsky: Mygica T230C2 add support for T230C hw version 2

2019-06-11 Thread Antti Palosaari
On 6/12/19 2:49 AM, Antti Palosaari wrote: +    /* set ts clock freq to 10Mhz */ +       memcpy(cmd.args, "\x14\x00\x0d\x10\xe8\x03", 6); +    cmd.wlen = 6; +    cmd.rlen = 4; +    ret = si2168_cmd_execute(client, &cmd); +    if (ret) return ret; + 0x03e8 is 1000 and value us

Re: [PATCH] dvb_usb_dvbsky: Mygica T230C2 add support for T230C hw version 2

2019-06-13 Thread Antti Palosaari
On 6/13/19 4:15 AM, JP wrote: And according to old usb sniffs from pctv 292e [Si2168B] default manual ts clock is set to 7.2MHz, which means 57.6Mbit/s datarate, it should be quite optimal for DVB-T2 max. In theory it could be a little higher only when 10MHz channel bandwidth and most less erro

Re: [PATCH] dvb_usb_dvbsky: Mygica T230C2 add support for T230C hw version 2

2019-06-13 Thread Antti Palosaari
On 6/12/19 11:07 PM, Frantisek Rysanek wrote: On 12 Jun 2019 at 1:28, Antti Palosaari wrote: [...] What is that T230C2 stick? JP has already explained the details, how that name was arrived at. As previously suggested, I can call it T230C v2 in the descriptive texts. I'd suggest ke

Re: si2168 gapped clock

2019-06-24 Thread Antti Palosaari
Hello, On 6/18/19 7:47 PM, Marc Gonzalez wrote: Hello, In the qcom SoC, the TS interface has two modes of operation. - with 3 signals (clk, valid, data) - with 4 signals (clk, valid, data, sync) In the si2168 short datasheet, I can see a diagram with these 4 signals. My question is: how do w

Re: [PATCH 1/2] dvbsky: add support for "Mygica T230C v2"

2019-06-25 Thread Antti Palosaari
needed in the si2168 demodulator driver, and a USB device ID in dvb-usb-ids.h . This is v3.3 of the proposed patch, based on feedback from Sean Young and Antti Palosaari. Tested by patch author on a T230C v2. Tested by Frank Rysanek on a T230C v2: can tune into locally available DVB-T and DVB-T2 mu

Re: [PATCH] media: tm6000: Spelling s/diconencted/diconnected/

2019-07-31 Thread Antti Palosaari
On 7/31/19 4:41 PM, Geert Uytterhoeven wrote: Signed-off-by: Geert Uytterhoeven --- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/tm6000/tm6000-cards.c b/drivers/media/usb/tm6000/tm6000-cards.c index 23df50aa0a4a

Re: [PATCH v4] dvb-usb/friio, dvb-usb-v2/gl861: decompose friio and merge with gl861

2018-03-27 Thread Antti Palosaari
On 03/27/2018 08:47 PM, tsk...@gmail.com wrote: From: Akihiro Tsukada Friio device contains "gl861" bridge and "tc90522" demod, for which the separate drivers are already in the kernel. But friio driver was monolithic and did not use them, practically copying those features. This patch decompos

Re: [PATCH v3 1/5] dvb-frontends/dvb-pll: add i2c driver support

2018-03-27 Thread Antti Palosaari
On 03/26/2018 09:06 PM, tsk...@gmail.com wrote: From: Akihiro Tsukada registers the module as an i2c driver, but keeps dvb_pll_attach() untouched for compatibility. Signed-off-by: Akihiro Tsukada --- drivers/media/dvb-frontends/dvb-pll.c | 49 +++ drivers/me

Re: [PATCH v4] dvb-usb/friio, dvb-usb-v2/gl861: decompose friio and merge with gl861

2018-03-28 Thread Antti Palosaari
On 03/28/2018 03:37 PM, Akihiro TSUKADA wrote: Hi, thanks for the comment. You should implement i2c adapter to demod driver and not add such glue to that USB-bridge. I mean that "relayed" stuff, i2c communication to tuner via demod. I2C-mux may not work I think as there is no gate-style multi

Re: [PATCH v4 1/5] dvb-frontends/dvb-pll: add i2c driver support

2018-03-28 Thread Antti Palosaari
On 03/28/2018 08:00 PM, tsk...@gmail.com wrote: From: Akihiro Tsukada registers the module as an i2c driver, but keeps dvb_pll_attach() untouched for compatibility. Signed-off-by: Akihiro Tsukada --- Changes since v3: - use standard i2c_device_id instead of dvb_pll_config drivers/media/dvb

Re: [PATCH v4] dvb-usb/friio, dvb-usb-v2/gl861: decompose friio and merge with gl861

2018-03-30 Thread Antti Palosaari
On 03/30/2018 04:21 PM, Akihiro TSUKADA wrote: I simply cannot see why it cannot work. Just add i2c adapter and suitable logic there. Transaction on your example is simply and there is no problem to implement that kind of logic to demod i2c adapter. I might be totally wrong, but... i2c trans

Re: Regression: DVBSky S960 USB tuner doesn't work in 4.10 or newer

2018-04-18 Thread Antti Palosaari
On 04/18/2018 07:49 AM, Olli Salonen wrote: Thank you for your response Peter! Indeed, it seems strange. dvbsky.c driver seems to use mutex_lock in very much the same way as many other drivers. I've now confirmed that I can get a 4.10 kernel with working DVBSky S960 by reverting the following 4

[PATCH] msi2500: assign SPI bus number dynamically

2019-08-16 Thread Antti Palosaari
SPI bus number must be assigned dynamically for each device, otherwise it will crash when multiple devices are plugged to system. Cc: sta...@vger.kernel.org Reported-and-tested-by: syzbot+c60ddb60b685777d9...@syzkaller.appspotmail.com Signed-off-by: Antti Palosaari --- drivers/media/usb/msi2500

Re: [PATCH] dvb-usb-v2/gl861: fix wrong memcpy

2019-08-21 Thread Antti Palosaari
On 8/17/19 4:22 PM, Akihiro TSUKADA wrote: Could you please test the patch and check if the return results are now consistent and that it won't break anything? I have tested the patch and it worked without problems. Testd-by: Akihiro Tsukada I could not noticed the bug because the device w

Re: [PATCH] dvb-usb-v2/gl861: fix wrong memcpy

2019-08-21 Thread Antti Palosaari
On 8/22/19 5:00 AM, Akihiro TSUKADA wrote: Hi, I suspect all whole friio_reset() function is not needed as it has worked even I/O has been broken. It worked because the old driver (that I rmmod'ed before installing the testing driver) properly init'ed the device. If I re-plug it (or reboot

[PATCH] gl861: re-implement i2c adapter logic

2019-08-21 Thread Antti Palosaari
TSUKADA Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/gl861.c | 206 +++ 1 file changed, 149 insertions(+), 57 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/gl861.c b/drivers/media/usb/dvb-usb-v2/gl861.c index b784d9da1a82..b8358cd2e4b7 100644 --- a

Re: [PATCH] gl861: re-implement i2c adapter logic

2019-08-21 Thread Antti Palosaari
On 8/22/19 8:34 AM, Antti Palosaari wrote: Device I2C adapter is capable of writing and reading large messages. For I2C writes there is 2 methods: simple for max 2 byte messages and usb_control_msg() with payload data for larger I2C messages. Add I2C adapter logic which selects suitable method

Re: [PATCH] gl861: re-implement i2c adapter logic

2019-08-23 Thread Antti Palosaari
On 8/23/19 8:28 PM, Akihiro TSUKADA wrote: Hi, thanks for the example patch. Here is debug log I tested multibyte i2c writes using zl10353 demod. All returned bytes are not same, but it due to write only register bits I think. dvb_usb_gl861 1-13:1.0: 1 | c0 02 00 1e 50 00 01 00 <<< 03 dvb_u

[PATCH v2] gl861: re-implement I2C adapter logic

2019-08-23 Thread Antti Palosaari
for plain I2C read. Cc: Akihiro TSUKADA Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/gl861.c | 216 --- 1 file changed, 159 insertions(+), 57 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/gl861.c b/drivers/media/usb/dvb-usb-v2/gl861.c index

Re: [PATCH] gl861: re-implement i2c adapter logic

2019-08-23 Thread Antti Palosaari
On 8/24/19 2:33 AM, Antti Palosaari wrote: On 8/23/19 8:28 PM, Akihiro TSUKADA wrote: Hi, thanks for the example patch. Here is debug log I tested multibyte i2c writes using zl10353 demod. All returned bytes are not same, but it due to write only register bits I think. dvb_usb_gl861 1

Re: Logilink VG0022A firmware/si2157 probe

2019-10-17 Thread Antti Palosaari
e still be buggy i2c... regards Antti -- http://palosaari.fi/ #!/usr/bin/env python # Silicon Labs Si2168 firmware extractor. # Copyright (C) 2015 Antti Palosaari # Usage: si2168_extract_firmware.py binary_driver_name.sys import sys import struct import md5 fread = file(sys.argv[1], &#

Re: Logilink VG0022A firmware/si2157 probe

2019-10-17 Thread Antti Palosaari
On 10/17/19 4:46 PM, JP wrote: Hi there, On 10/17/19 2:15 PM, Antti Palosaari wrote: Hello, On 10/17/19 12:08 PM, Sean Young wrote: Hi Antti, I have a Logilink VG0022A device which is an af9035.c type device (with ITE 9xxx frontned). The probe of the si2146 tuner fails and returns 0xffs

Re: [PATCH 1/3] rtl2832: add support for slave ts pid filter

2015-12-20 Thread Antti Palosaari
Patch looks acceptable, but it is broken in a mean it does not apply :( $ wget -O - https://patchwork.linuxtv.org/patch/32030/mbox/ | git am -3 -s --2015-12-21 04:40:46-- https://patchwork.linuxtv.org/patch/32030/mbox/ Resolving patchwork.linuxtv.org (patchwork.linuxtv.org)... 130.149.80.248 Con

Re: [PATCH 2/3] mn88472: add work around for failing firmware loading

2015-12-20 Thread Antti Palosaari
Hello I am not sure if problem is I2C adapter/bus or that demodulator I2C slave. If it is demod, then that workaround is correct place, but if it is not, then that is wrong and I2C adapter repeating logic should be used. I did some testing again... Loading mn88472 firmware 1000 times, it faile

[GIT PULL 4.5] rtl2832u changes

2015-12-20 Thread Antti Palosaari
to bbed859d68218c043fa88ccdd9785d9567d8fb5d: rtl2832: do not filter out slave TS null packets (2015-12-20 04:57:20 +0200) Antti Palosaari (3): rtl28xxu: return demod reg page from driver cache rtl2832: print reg

[PATCH] si2168: use i2c controlled mux interface

2016-01-05 Thread Antti Palosaari
Recent i2c mux locking update offers support for i2c controlled i2c muxes. Use it and get the rid of homemade hackish i2c adapter locking code. Cc: Peter Rosin Cc: Peter Rosin Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/si2168.c | 61 1

Re: [PATCH] si2168: use i2c controlled mux interface

2016-01-06 Thread Antti Palosaari
Moikka! On 01/06/2016 09:14 AM, Peter Rosin wrote: Hi Antti, On 2016-01-06 06:42, Antti Palosaari wrote: Recent i2c mux locking update offers support for i2c controlled i2c muxes. Use it and get the rid of homemade hackish i2c adapter locking code. That looks good on a first glance, and I&#

Re: [PATCH v2 0/8] i2c mux cleanup and locking update

2016-01-06 Thread Antti Palosaari
On 01/05/2016 05:57 PM, Peter Rosin wrote: From: Peter Rosin Hi! I have a pair of boards with this i2c topology: GPIO ---| -- BAT1 | v / I2C -+--B---+ MUX | \ EEPROM

[PATCH] rtl28xxu: retry failed i2c messages

2016-01-07 Thread Antti Palosaari
issue by repeating failed message. Another solution which also works is to add ~100us delay between i2c messages - but repeating sounds more elegant and does not cause any extra delay for success cases. Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 8 1

[GIT PULL] mn88473: move out of staging

2016-03-03 Thread Antti Palosaari
/media_tree.git mn88473_pull for you to fetch changes up to 05886118dd140b4d96cf4de5c76b4fb6155316f5: rtl2832: move stats polling to read status (2016-02-14 04:29:33 +0200) Antti Palosaari (4): mn88473: move out of staging

[PATCH] si2168: add lock to cmd execute

2016-03-15 Thread Antti Palosaari
which did the same job. Cc: Peter Rosin Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/si2168.c | 21 ++--- drivers/media/dvb-frontends/si2168_priv.h | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/media/dvb-frontends/si2168.c b

Re: [PATCH v4 00/18] i2c mux cleanup and locking update

2016-03-15 Thread Antti Palosaari
lare that the i2c gate is self-locked b52f766 [media] si2168: convert to use an explicit i2c mux core 4ba9115 [media] rtl2832: convert to use an explicit i2c mux core 3f1778b [media] rtl2830: convert to use an explicit i2c mux core 5c8bfc8 [media] m88ds3103: convert to use an explicit i2c mux core

Re: [PATCH] si2168: use i2c controlled mux interface

2016-04-05 Thread Antti Palosaari
On 03/23/2016 06:58 PM, Peter Rosin wrote: On 2016-01-06 06:42, Antti Palosaari wrote: Recent i2c mux locking update offers support for i2c controlled i2c muxes. Use it and get the rid of homemade hackish i2c adapter locking code. [actual patch elided] I had a 2nd look and it seems that the

Re: AVerMedia HD Volar (A867) AF9035 + MXL5007T driver issues

2016-04-05 Thread Antti Palosaari
On 04/02/2016 01:44 PM, Alessandro Radicati wrote: Hi, In trying to understand why my DVB USB tuner doesn't work with stock kernel drivers (4.2.0), I decided to pull out my logic analyser and sniff the I2C bus between the AF9035 and MXL5007T. I seem to have uncovered a couple of issues: 1) Atta

Re: AVerMedia HD Volar (A867) AF9035 + MXL5007T driver issues

2016-04-05 Thread Antti Palosaari
I found one stick having AF9035 + MXL5007T. It is HP branded A867, so it should be similar. It seems to work all three 12.13.15.0 6.20.15.0 firmwares: http://palosaari.fi/linux/v4l-dvb/firmware/af9035/ mxl5007t 5-0060: creating new instance mxl5007t_get_chip_id: unknown rev (3f) mxl5007t_get_ch

Re: AVerMedia HD Volar (A867) AF9035 + MXL5007T driver issues

2016-04-08 Thread Antti Palosaari
I'll try to push through a patch for just "no_probe". Thanks, Alessandro On Sat, Apr 9, 2016 at 1:13 AM, Jose Alberto Reguero wrote: I made a patch long time ago, but it was not accepted. https://patchwork.linuxtv.org/patch/16242/ Jose Alberto El 06/04/2016 01:00, Alessandro Radi

Re: AVerMedia HD Volar (A867) AF9035 + MXL5007T driver issues

2016-04-08 Thread Antti Palosaari
on I2C bus? If it starts working then have to find out way to fix it properly so that any earlier device didn't broke. regards Antti On 04/09/2016 03:50 AM, Antti Palosaari wrote: uh, how it could be so hard? I just made few tests and found 3 ways to read it. OK, one is that Aless

Re: AVerMedia HD Volar (A867) AF9035 + MXL5007T driver issues

2016-04-08 Thread Antti Palosaari
On 04/09/2016 04:52 AM, Alessandro Radicati wrote: On Sat, Apr 9, 2016 at 3:22 AM, Antti Palosaari wrote: Here is patches to test: http://git.linuxtv.org/anttip/media_tree.git/log/?h=af9035 I've done this already in my testing, and it works for getting a correct chip_id response, but

Re: AVerMedia HD Volar (A867) AF9035 + MXL5007T driver issues

2016-04-09 Thread Antti Palosaari
On 04/09/2016 11:13 AM, Alessandro Radicati wrote: On Sat, Apr 9, 2016 at 4:17 AM, Antti Palosaari wrote: On 04/09/2016 04:52 AM, Alessandro Radicati wrote: On Sat, Apr 9, 2016 at 3:22 AM, Antti Palosaari wrote: Here is patches to test: http://git.linuxtv.org/anttip/media_tree.git/log/?h

Re: AVerMedia HD Volar (A867) AF9035 + MXL5007T driver issues

2016-04-09 Thread Antti Palosaari
On 04/09/2016 07:11 PM, Alessandro Radicati wrote: On Sat, Apr 9, 2016 at 4:25 PM, Antti Palosaari wrote: On 04/09/2016 11:13 AM, Alessandro Radicati wrote: On Sat, Apr 9, 2016 at 4:17 AM, Antti Palosaari wrote: On 04/09/2016 04:52 AM, Alessandro Radicati wrote: On Sat, Apr 9, 2016

[GIT PULL 4.6] m88ds3103 fix

2016-04-10 Thread Antti Palosaari
That is actually bug fix for 3.19+, but according to my tests its effect is very minor, so no need for stable. It fixes demod carrier offset calculation. The following changes since commit da470473c9cf9c4ebb40d046b306c76427b6df94: [media] media: au0828 fix to clear enable/disable/change sou

Fwd: [Bug 116551] media_gobj_create NULL pointer dereference

2016-04-17 Thread Antti Palosaari
Can you look that bug as I think it is media controller related. regards Antti Forwarded Message Subject: [Bug 116551] media_gobj_create NULL pointer dereference Date: Sat, 16 Apr 2016 20:40:18 + From: bugzilla-dae...@bugzilla.kernel.org To: cr...@iki.fi https://bugzilla.

Re: [PATCH] [media] af9035: fix for MXL5007T devices with I2C read issues

2016-04-19 Thread Antti Palosaari
Hello I am not happy with that new module parameter as I cannot see real need for it. So get rid of it. Better to compare both VID and PID when enabling that work-around. Driver supports currently quite many different USB IDs and there is still small risk duplicate PID will exists at some poi

Re: [PATCH] [media] af9035: fix for MXL5007T devices with I2C read issues

2016-04-20 Thread Antti Palosaari
On 04/20/2016 12:13 PM, Alex Rad wrote: On Wed, Apr 20, 2016 at 1:02 AM, Antti Palosaari wrote: Hello I am not happy with that new module parameter as I cannot see real need for it. So get rid of it. My reasoning for this is: 1) We know of just two devices which may have the issue, but there

Re: [PATCH v7 00/24] i2c mux cleanup and locking update

2016-04-20 Thread Antti Palosaari
On 04/20/2016 06:17 PM, Peter Rosin wrote: Retested all the previously tested + now I tested also cx231xx with Hauppauge 930C HD device having eeprom other mux port and demod on the other port. [media] si2168: change the i2c gate to be mux-locked [media] m88ds3103: convert to use an ex

[PATCH] af9035: correct eeprom offsets

2016-04-27 Thread Antti Palosaari
Used memory mapped eeprom offsets were off-by 8 bytes. Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/af9035.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h b/drivers/media/usb/dvb-usb-v2

Re: [media-af9013] question about return value in function af9013_wr_regs()

2017-06-09 Thread Antti Palosaari
Gustavo A. R. Silva kirjoitti 2017-06-09 00:51: Hello everybody, While looking into Coverity ID 1227035 I ran into the following piece of code at drivers/media/dvb-frontends/af9013.c:595: The issue here is that the value stored in variable _ret_ at line 608, is not being evaluated as it happ

Re: [PATCH] dvb-usb-af9035: load HID table

2017-06-10 Thread Antti Palosaari
Hello Jaroslav Škarvada kirjoitti 2017-06-09 20:46: Automatically load sniffed HID table from Windows driver if USB_VID_ITETECH:USB_PID_ITETECH_IT9135_9006 device is present (e.g. Evolveo Mars) or if module parameter force_hid_tab_load is set. There is few issues I don't like this approach.

[PATCH 04/15] af9033: use kernel 64-bit division

2017-06-14 Thread Antti Palosaari
Replace own binary division with 64-bit multiply and division. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 34 +++ drivers/media/dvb-frontends/af9013_priv.h | 1 + 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a

[PATCH 06/15] af9013: convert to regmap api

2017-06-14 Thread Antti Palosaari
Use regmap for register access. Own low level i2c read and write routines for regmap is still needed because chip uses single command byte in addition to typical i2c register access. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/Kconfig | 1 + drivers/media/dvb

[PATCH 12/15] af9013: remove unneeded register writes

2017-06-14 Thread Antti Palosaari
Removed register writes are already chip defaults, are not required, are set later or belong to AF9015 USB interface. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 42 1 file changed, 42 deletions(-) diff --git a/drivers/media

[PATCH 09/15] af9015: fix and refactor i2c adapter algo logic

2017-06-14 Thread Antti Palosaari
* fix write+read when write has more than one byte * remove lock, not needed on that case * remove useless i2c msg send loop, as we support only write, read and write+read as one go and nothing more Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/af9015.c | 153

[PATCH 08/15] af9013: add dvbv5 cnr

2017-06-14 Thread Antti Palosaari
Add support for DVBv5 CNR. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c index a6b88ae..68091f2 100644 --- a/drivers/media/dvb

[PATCH 05/15] af9013: fix logging

2017-06-14 Thread Antti Palosaari
We can simplify logging as we now have a proper i2c client to pass for kernel dev_* logging functions. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 202 +-- 1 file changed, 100 insertions(+), 102 deletions(-) diff --git a/drivers

[PATCH 15/15] af9013: refactor power control

2017-06-14 Thread Antti Palosaari
Move power-up and power-down functionality to init/sleep ops and get rid of old function. Fixes and simplifies power-up functionality slightly. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 93 ++-- 1 file changed, 36 insertions

[PATCH 02/15] af9013: move config values directly under driver state

2017-06-14 Thread Antti Palosaari
It shorten, as typed chars, access to config values as there is one pointer less. Also, when config/platform data is passed to driver there could be some values that are not relevant to store state as such or not needed to store at all. Signed-off-by: Antti Palosaari --- drivers/media/dvb

[PATCH 14/15] af9013: refactor firmware download routine

2017-06-14 Thread Antti Palosaari
Refactor firmware download routine. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 65 +--- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/drivers/media/dvb-frontends/af9013.c b/drivers/media/dvb-frontends/af9013.c

[PATCH 01/15] af9015: use correct 7-bit i2c addresses

2017-06-14 Thread Antti Palosaari
Driver was using wrong "8-bit" i2c addresses for demods and tuners. Internal demod i2c address was not set at all. These are needed to be fixed before proper i2c client binding is used. Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/af9

[PATCH 10/15] af9015: enable 2nd TS flow control when dual mode

2017-06-14 Thread Antti Palosaari
It needs to be enabled in order to get stream from slave af9013 demod. Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/af9015.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/af9015.c b/drivers/media/usb/dvb-usb

[PATCH 07/15] af9013: fix error handling

2017-06-14 Thread Antti Palosaari
Use typical (return 0/goto err/return err) error handling everywhere. Add missing error handling where missing. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 86 +--- 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a

[PATCH 13/15] af9015: move 2nd demod power-up wait different location

2017-06-14 Thread Antti Palosaari
We need to wait 2nd demod power-up before download firmware. Move that wait to more correct location. Signed-off-by: Antti Palosaari --- drivers/media/usb/dvb-usb-v2/af9015.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/af9015.c b

[PATCH 11/15] af9013: add configurable TS output pin

2017-06-14 Thread Antti Palosaari
On serial TS mode output pin could be selected from D0 or D7. Add configuration option to for it. Rename TS mode config option prefix from AF9013_TS_ to AF9013_TS_MODE_. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 27 ++- drivers/media/dvb

[PATCH 03/15] af9013: add i2c client bindings

2017-06-14 Thread Antti Palosaari
Add kernel i2c driver bindings. That allows dev_* logging, regmap and more. Signed-off-by: Antti Palosaari --- drivers/media/dvb-frontends/af9013.c | 321 ++- drivers/media/dvb-frontends/af9013.h | 84 + 2 files changed, 241 insertions(+), 164 deletions

[GIT PULL 4.13] af9015/af9013 changes

2017-06-20 Thread Antti Palosaari
2a32db020ab01e3ac99febad90a42112aa28b2ee: af9013: refactor power control (2017-06-18 05:42:25 +0300) Antti Palosaari (15): af9015: use correct 7-bit i2c addresses af9013: move config values directly under driver state

Re: [PATCH] [media] ddbridge: use pr_* macros in favor of printk

2017-06-20 Thread Antti Palosaari
On 06/20/2017 08:44 PM, Daniel Scheller wrote: From: Daniel Scheller Side effect: KERN_DEBUG messages aren't written to the kernel log anymore. This also improves the tda18212_ping reporting a bit so users know that if pinging wasn't successful, bad things might happen. It is device, not libr

Re: [PATCH 1/4] [media] dvb-frontends/stv0367: initial DDB DVBv5 stats, implement ucblocks

2017-06-20 Thread Antti Palosaari
On 06/20/2017 08:45 PM, Daniel Scheller wrote: From: Daniel Scheller This adds the basics to stv0367ddb_get_frontend() to be able to properly provide signal statistics in DVBv5 format. Also adds UCB readout and provides those values. Signed-off-by: Daniel Scheller --- drivers/media/dvb-fr

Re: [PATCH 3/4] [media] dvb-frontends/stv0367: SNR DVBv5 statistics for DVB-C and T

2017-06-20 Thread Antti Palosaari
On 06/20/2017 08:45 PM, Daniel Scheller wrote: From: Daniel Scheller Add signal-to-noise-ratio as provided by the demodulator in decibel scale. QAM/DVB-C needs some intlog calculation to have usable dB values, OFDM/ DVB-T values from the demod look alright already and are provided as-is. Sig

  1   2   3   4   5   6   7   8   9   10   >