Re: [PATCH 1/2] media: dvb: convert tuner_info frequencies to Hz

2018-07-05 Thread Michael Büsch
quot;, > > - .frequency_min = 4500, > - .frequency_max = 10, > + .frequency_min_hz = 45 * MHz, > + .frequency_max_hz = 1000 * MHz, > }, > > .release= fc0011_release, Acked

Re: [PATCH 1/4] [media] tw5864, fc0011: better handle WARN_ON()

2017-05-18 Thread Michael Büsch
regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | > FC11_VCOSEL_2); This fall through is intentional, but I guess returning an error is OK, too. This should not happen anyway. I cannot test this, though. Acked-by: Michael Büsch <m...@bues.ch> -- Michael pgpfAl6Qz6id8.pgp Description: OpenPGP digital signature

Re: [PATCH 2/2] drivers: Simplify the return code

2015-05-19 Thread Michael Büsch
On Tue, 19 May 2015 08:05:56 -0400 (EDT) Federico Simoncelli fsimo...@redhat.com wrote: diff --git a/drivers/media/dvb-frontends/lgs8gxx.c b/drivers/media/dvb-frontends/lgs8gxx.c index 3c92f36ea5c7..9b0166cdc7c2 100644 --- a/drivers/media/dvb-frontends/lgs8gxx.c +++

Re: [git:v4l-dvb/for_v3.9] [media] fc0011: Return early, if the frequency is already tuned

2013-02-11 Thread Michael Büsch
Can you please revert this one again? It might cause issues if the dvb device is reset/reinitialized. On Fri, 08 Feb 2013 20:51:36 +0100 Mauro Carvalho Chehab mche...@redhat.com wrote: This is an automatic generated email to let you know that the following patch were queued at the

[PATCH 3/4] fc0011: Add some sanity checks and cleanups

2013-02-07 Thread Michael Büsch
Add some sanity checks to the calculations and make the REG_16 register write consistent with the other ones. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/tuners/fc0011.c === ---

[PATCH 2/4] fc0011: Fix xin value clamping

2013-02-07 Thread Michael Büsch
Fix the xin value clamping and use clamp_t(). Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/tuners/fc0011.c === --- linux.orig/drivers/media/tuners/fc0011.c2012-10-22 16:13:29.140465225 +0200 +++

[PATCH 4/4] fc0011: Return early, if the frequency is already tuned

2013-02-07 Thread Michael Büsch
Return early, if we already tuned to a frequency. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/tuners/fc0011.c === --- linux.orig/drivers/media/tuners/fc0011.c2013-01-01 23:25:40.0 +0100

[PATCH 1/4] fc0011: fp/fa value overflow fix

2013-02-07 Thread Michael Büsch
Assign the maximum instead of masking with the maximum on value overflow. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/tuners/fc0011.c === --- linux.orig/drivers/media/tuners/fc0011.c2012-10-22

Re: [PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-07 Thread Michael Büsch
On Sun, 7 Oct 2012 18:50:31 +0200 (CEST) Julia Lawall julia.law...@lip6.fr wrote: @@ -97,10 +96,8 @@ static int fc0011_readreg(struct fc0011_priv *priv, u8 reg, u8 *val) { u8 dummy; struct i2c_msg msg[2] = { - { .addr = priv-addr, -.flags = 0, .buf =

Re: [PATCH] Add fc0011 tuner driver

2012-05-07 Thread Michael Büsch
On Mon, 07 May 2012 22:02:18 +0300 Antti Palosaari cr...@iki.fi wrote: On 02.04.2012 19:14, Michael Büsch wrote: This adds support for the Fitipower fc0011 DVB-t tuner. Signed-off-by: Michael Bueschm...@bues.ch + unsigned int i, vco_retries; + u32 freq = p-frequency / 1000

Re: [PATCH] fc0011: Reduce number of retries

2012-05-07 Thread Michael Büsch
On Mon, 07 May 2012 21:53:23 +0300 Antti Palosaari cr...@iki.fi wrote: On 03.04.2012 18:33, Michael Büsch wrote: On another thing: The af9035 driver doesn't look multi-device safe. There are lots of static variables around that keep device state. So it looks like this will blow up

Re: [PATCH] Add fc0011 tuner driver

2012-04-03 Thread Michael Büsch
On Tue, 03 Apr 2012 00:52:08 +0300 Antti Palosaari cr...@iki.fi wrote: Well the fc0011 tuner driver still works worse on this af9035 driver than on Hans' driver. I have absolutely no idea why this is the case. I'm almost certain that it is not a timing issue of some sort. I tried a

Re: [PATCH] af9035: fix and enhance I2C adapter

2012-04-03 Thread Michael Büsch
On Tue, 3 Apr 2012 02:32:35 +0300 Antti Palosaari cr...@iki.fi wrote: There was a bug I2C adapter writes and reads one byte too much. As the most I2C clients has auto-increment register addressing this leads next register from the target register overwritten by garbage data. As a change

[PATCH] fc0011: Reduce number of retries

2012-04-03 Thread Michael Büsch
Now that i2c transfers are fixed, 3 retries are enough. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/common/tuners/fc0011.c === --- linux.orig/drivers/media/common/tuners/fc0011.c 2012-04-03

[PATCH] fc0011: use usleep_range()

2012-04-03 Thread Michael Büsch
Use usleep_range() instead of msleep() to improve power saving opportunities. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/common/tuners/fc0011.c === --- linux.orig/drivers/media/common/tuners/fc0011.c

[PATCH] af9035: Use usleep_range() in fc0011 support code

2012-04-03 Thread Michael Büsch
Use usleep_range() instead of msleep() to improve power saving opportunities. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/dvb/dvb-usb/af9035.c === --- linux.orig/drivers/media/dvb/dvb-usb/af9035.c

Re: [PATCH] fc0011: Reduce number of retries

2012-04-03 Thread Michael Büsch
On Tue, 03 Apr 2012 12:58:16 +0300 David Cohen david.a.co...@linux.intel.com wrote: - while (!(vco_cal FC11_VCOCAL_OK) vco_retries 6) { + while (!(vco_cal FC11_VCOCAL_OK) vco_retries 3) { Do we need to retry at all? It is not an i2c retry. It retries the whole device

Re: [PATCH] fc0011: Reduce number of retries

2012-04-03 Thread Michael Büsch
On Tue, 03 Apr 2012 18:24:20 +0300 Antti Palosaari cr...@iki.fi wrote: On 03.04.2012 12:05, Michael Büsch wrote: Now that i2c transfers are fixed, 3 retries are enough. Signed-off-by: Michael Bueschm...@bues.ch Applied, thanks! http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs

[PATCH] Add fc0011 tuner driver

2012-04-02 Thread Michael Büsch
This adds support for the Fitipower fc0011 DVB-t tuner. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/common/tuners/Kconfig === --- linux.orig/drivers/media/common/tuners/Kconfig 2012-04-02

[PATCH] af9035: Add fc0011 tuner support

2012-04-02 Thread Michael Büsch
This adds Fitipower fc0011 tuner support to the af9035 driver. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/dvb/dvb-usb/af9035.c === --- linux.orig/drivers/media/dvb/dvb-usb/af9035.c 2012-04-02

[PATCH] af9035: Add Afatech USB PIDs

2012-04-02 Thread Michael Büsch
Add some generic Afatech USB PIDs used by Cabstone sticks and others. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/dvb/dvb-usb/af9035.c === --- linux.orig/drivers/media/dvb/dvb-usb/af9035.c

Re: [PATCH] Add fc0011 tuner driver

2012-04-02 Thread Michael Büsch
On Mon, 02 Apr 2012 19:56:50 +0300 Antti Palosaari cr...@iki.fi wrote: On 02.04.2012 19:14, Michael Büsch wrote: This adds support for the Fitipower fc0011 DVB-t tuner. Signed-off-by: Michael Bueschm...@bues.ch Applied, thanks! http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs

Re: [PATCH] af9035: Add Afatech USB PIDs

2012-04-02 Thread Michael Büsch
On Mon, 02 Apr 2012 20:04:00 +0300 Antti Palosaari cr...@iki.fi wrote: On 02.04.2012 19:34, Michael Büsch wrote: Add some generic Afatech USB PIDs used by Cabstone sticks and others. Signed-off-by: Michael Bueschm...@bues.ch Applied, but same checkpatch.pl comments as earlier patches

Re: [PATCH] af9035: Add fc0011 tuner support

2012-04-02 Thread Michael Büsch
On Mon, 02 Apr 2012 20:03:08 +0300 Antti Palosaari cr...@iki.fi wrote: On 02.04.2012 19:18, Michael Büsch wrote: This adds Fitipower fc0011 tuner support to the af9035 driver. Signed-off-by: Michael Bueschm...@bues.ch Applied, thanks! http://git.linuxtv.org/anttip/media_tree.git

Re: [PATCH] Add fc0011 tuner driver

2012-04-02 Thread Michael Büsch
On Mon, 02 Apr 2012 20:40:45 +0300 Antti Palosaari cr...@iki.fi wrote: h, I think Mauro will at least complain when I ask he to PULL that master. Personally I would like to see line len something more than 80 chars, but as checkpatch.pl complains it I have shortened lines despite very

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-04-01 Thread Michael Büsch
On Sun, 01 Apr 2012 07:51:33 +0300 Antti Palosaari cr...@iki.fi wrote: I have no clue about the firmware format, so it will probably be easier if you'd dive into that stuff as you already seem to know it. Done. I didn't have neither info, but there was good posting from Daniel Glöckner

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-04-01 Thread Michael Büsch
On Sun, 1 Apr 2012 10:33:15 +0200 Michael Büsch m...@bues.ch wrote: On Sun, 01 Apr 2012 07:51:33 +0300 Antti Palosaari cr...@iki.fi wrote: I have no clue about the firmware format, so it will probably be easier if you'd dive into that stuff as you already seem to know it. Done. I

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-04-01 Thread Michael Büsch
On Sun, 01 Apr 2012 15:29:07 +0300 Antti Palosaari cr...@iki.fi wrote: buf[1] = msg[0].addr 1; Maybe you have given I2C address as a 8bit format? Uhh, the address is leftshifted by one. So I changed the i2c address from 0xC0 to 0x60. The i2c write seems to work now. At least it doesn't

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-04-01 Thread Michael Büsch
On Sun, 1 Apr 2012 16:42:34 +0200 Hans-Frieder Vogt hfv...@gmx.net wrote: [ 3101.940765] i2c i2c-8: Failed to read VCO calibration value (got 20) It doesn't run into this check on the other af903x driver. So I suspect an i2c read issue here. I would first uncomment the i2c read

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-04-01 Thread Michael Büsch
On Sun, 1 Apr 2012 15:11:53 +0200 Michael Büsch m...@bues.ch wrote: [ 3101.940765] i2c i2c-8: Failed to read VCO calibration value (got 20) Ok, it turns out that it doesn't fail all the time, but only sporadically. So increasing the number of retries fixes (or at least works around

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-04-01 Thread Michael Büsch
On Sun, 01 Apr 2012 19:20:21 +0300 Antti Palosaari cr...@iki.fi wrote: On 01.04.2012 19:15, Michael Büsch wrote: On Sun, 1 Apr 2012 15:11:53 +0200 Michael Büschm...@bues.ch wrote: [ 3101.940765] i2c i2c-8: Failed to read VCO calibration value (got 20) Ok, it turns out

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-04-01 Thread Michael Büsch
On Sun, 1 Apr 2012 18:24:09 +0200 Hans-Frieder Vogt hfv...@gmx.net wrote: However, I found the problem: the buffer length needs to be msg[1].len, see below. I spotted this bug, too, but it didn't fix the problem, as len is 1 for both packets in my specific case. So it doesn't make a difference

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-04-01 Thread Michael Büsch
On Sun, 01 Apr 2012 19:39:56 +0300 Antti Palosaari cr...@iki.fi wrote: Well I didn't retry at that level, but at the fc0011 driver level. It does already retry once in fc0011 (with complete tuner reset). I increased it to 6 times (3 was not enough). Maybe some delay is needed in order to

[PATCH] af9035: Add USB read checksumming

2012-04-01 Thread Michael Büsch
This adds USB message read checksumming to protect against device and bus errors. It also adds a read length check to avoid returning garbage from the buffer, if the device truncated the message. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux/drivers/media/dvb/dvb-usb/af9035.c

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-03-31 Thread Michael Büsch
On Sat, 31 Mar 2012 00:14:58 +0200 Michael Büsch m...@bues.ch wrote: On Sat, 31 Mar 2012 01:00:21 +0300 Antti Palosaari cr...@iki.fi wrote: Feel free to do that. Actually, I just tried it about 2 hours ago. But I failed, since there callbacks given as a param for tuner attach

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-03-31 Thread Michael Büsch
On Sat, 31 Mar 2012 17:28:38 +0300 Antti Palosaari cr...@iki.fi wrote: Googling the filename reveals many links, here is one: http://xgazza.altervista.org/Linux/DVB/dvb-usb-af9035-01.fw Hm, on tuner register access I get these errors: [ 9259.080907] af9035_ctrl_msg: command=03 failed fw

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-03-31 Thread Michael Büsch
On Sat, 31 Mar 2012 19:34:23 +0300 Antti Palosaari cr...@iki.fi wrote: On 31.03.2012 19:29, Michael Büsch wrote: On Sat, 31 Mar 2012 17:28:38 +0300 Antti Palosaaricr...@iki.fi wrote: Googling the filename reveals many links, here is one: http://xgazza.altervista.org/Linux/DVB/dvb-usb

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-03-31 Thread Michael Büsch
On Sat, 31 Mar 2012 19:48:34 +0300 Antti Palosaari cr...@iki.fi wrote: And about the new FW downloader, that supports those new firmwares, feel free to implement it if you wish too. I will now goto out of house and will back during few hours. If you wish to do it just reply during 4 hours,

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-03-30 Thread Michael Büsch
On Fri, 30 Mar 2012 15:33:02 +0300 Antti Palosaari cr...@iki.fi wrote: Terve Mauro and all the other hackers, I did some massive rewrite for my old AF9035/AF9033 driver that was never merged. Anyhow, here it is. New drivers here are: Infineon TUA 9001 silicon tuner driver Afatech

Re: [GIT PULL FOR 3.5] AF9035/AF9033/TUA9001 = TerraTec Cinergy T Stick [0ccd:0093]

2012-03-30 Thread Michael Büsch
On Sat, 31 Mar 2012 01:00:21 +0300 Antti Palosaari cr...@iki.fi wrote: Feel free to do that. Actually, I just tried it about 2 hours ago. But I failed, since there callbacks given as a param for tuner attach and it is wrong. There is frontend callback defined just for that. Look example

[PATCH] Add Fitipower fc0011 tuner driver

2012-03-28 Thread Michael Büsch
This adds a driver for the Fitipower fc0011 DVB-t tuner. Signed-off-by: Michael Buesch m...@bues.ch --- The driver is tested with the af903x driver. Mauro Carvalho Chehab, I'm actually aiming on getting this driver merged into the media-tree now. Hans-Frieder Vogt, what are your plans on

Re: [PATCH] Add Fitipower fc0011 tuner driver

2012-03-28 Thread Michael Büsch
On Thu, 29 Mar 2012 02:01:34 +0200 Michael Büsch m...@bues.ch wrote: The driver is tested with the af903x driver. For reference, here goes the af903x/fc0011 glue: Signed-off-by: Michael Buesch m...@bues.ch Index: linux-3.3/drivers/media/dvb/dvb-usb/Kconfig

[PATCH 0/2] Fitipower fc0011 support

2012-03-21 Thread Michael Büsch
This patchset adds support for the Fitipower fc0011 DVB tuner. Version 2 of this patchset fixes several small bugs and adds some descriptive register names. -- Greetings, Michael. PGP encryption is encouraged / 908D8B0E signature.asc Description: PGP signature

[PATCH 2/2] Integrate Fitipower fc0011 into af903x

2012-03-21 Thread Michael Büsch
This adds fc0011 support to the af903x driver. Signed-off-by: Michael Buesch m...@bues.ch --- Index: linux-source-3.2/drivers/media/dvb/dvb-usb/Kconfig === --- linux-source-3.2.orig/drivers/media/dvb/dvb-usb/Kconfig 2012-03-20

Re: [PATCH 1/2] Fitipower fc0011 driver

2012-03-21 Thread Michael Büsch
On Wed, 21 Mar 2012 20:12:03 +0100 Gianluca Gennari gennar...@gmail.com wrote: +#if 0 //TODO 3.3 + struct dtv_frontend_properties *p = fe-dtv_property_cache; + u32 freq = p-frequency / 1000; + u32 delsys = p-delivery_system; The delsys variable is unused, you can delete it.

Re: [PATCH 2/3] Basic AF9035/AF9033 driver

2012-03-20 Thread Michael Büsch
Thank you for working on a af903x driver. I tried to test the driver on a debian 3.2 kernel, after applying a small fix: diff -Nupr a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile --- a/drivers/media/dvb/dvb-usb/Makefile2012-01-22 02:53:17.0 +0100

Re: [PATCH 2/3] Basic AF9035/AF9033 driver

2012-03-20 Thread Michael Büsch
On Tue, 20 Mar 2012 17:27:45 +0100 Gianluca Gennari gennar...@gmail.com wrote: Hi Michael, Il 20/03/2012 14:04, Michael Büsch ha scritto: Thank you for working on a af903x driver. I tried to test the driver on a debian 3.2 kernel, after applying a small fix: It should

Re: [PATCH 2/3] Basic AF9035/AF9033 driver

2012-03-20 Thread Michael Büsch
On Tue, 20 Mar 2012 17:49:51 +0100 Gianluca Gennari gennar...@gmail.com wrote: Here it is: http://www.mail-archive.com/linux-media@vger.kernel.org/msg44169.html Uh thanks. I must have been blinded by the AF903x_SRC driver. ;) -- Greetings, Michael. PGP encryption is encouraged / 908D8B0E

Add fc0011 tuner support (was: [PATCH 2/3] Basic AF9035/AF9033 driver)

2012-03-20 Thread Michael Büsch
Okay, here we go. These patches apply on top of the latest af903x by Hans-Frieder Vogt. This adds support for the fc0011 tuner, which is used on a cabstone stick. (Its USB-id is already in af903x's list). I did some _very_ basic testing on this stuff and it basically seems to work more or less.

Re: [PATCH] v0.3 Support for tuner FC0012

2012-03-20 Thread Michael Büsch
On Tue, 20 Mar 2012 23:14:35 +0100 Hans-Frieder Vogt hfv...@gmx.net wrote: +/* + buf[0] is the first register address + */ Just for me to understand this: How does this work? Does the hardware auto-increment the register address automatically after each received byte? If so, we could