Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-04 Thread Mauro Carvalho Chehab
Em Fri, 4 Oct 2019 15:50:18 +0200 JP escreveu: > On 10/4/19 2:08 PM, Mauro Carvalho Chehab wrote: > > Em Fri, 4 Oct 2019 13:50:43 +0200 > > JP escreveu: > > > >> On 10/3/19 10:03 PM, Mauro Carvalho Chehab wrote: > >>> Em Thu, 3 Oct 2019 21:51:35 +0200 > >>> Gonsolo escreveu: > >>> > >>

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-04 Thread JP
On 10/4/19 2:08 PM, Mauro Carvalho Chehab wrote: Em Fri, 4 Oct 2019 13:50:43 +0200 JP escreveu: On 10/3/19 10:03 PM, Mauro Carvalho Chehab wrote: Em Thu, 3 Oct 2019 21:51:35 +0200 Gonsolo escreveu: 1) The firmware file is likely at the Windows driver for this device (probably using a

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-04 Thread Mauro Carvalho Chehab
Em Fri, 4 Oct 2019 13:50:43 +0200 JP escreveu: > On 10/3/19 10:03 PM, Mauro Carvalho Chehab wrote: > > Em Thu, 3 Oct 2019 21:51:35 +0200 > > Gonsolo escreveu: > > > >>> 1) The firmware file is likely at the Windows driver for this device > >>> (probably using a different format). It should be

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-04 Thread JP
On 10/3/19 10:03 PM, Mauro Carvalho Chehab wrote: Em Thu, 3 Oct 2019 21:51:35 +0200 Gonsolo escreveu: 1) The firmware file is likely at the Windows driver for this device (probably using a different format). It should be possible to get it from there. If you tell me how I'm willing to do t

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> I don't know. I was not the one that extracted the firmware. I guess > Antti did it. Ok. > That's a really bad solution. Returning 0xff is what happens when > things go wrong during I2C transfers. Several problems can cause it, > including device misfunction. Every time someone comes with a pat

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 21:51:35 +0200 Gonsolo escreveu: > > 1) The firmware file is likely at the Windows driver for this device > > (probably using a different format). It should be possible to get > > it from there. > > If you tell me how I'm willing to do this. :) I don't know. I was not the o

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> Huh? are you using the upstream Kernel? the above code is at line 215! > Please always use the upstream code when sending patches. Sorry, I was confused by my vi line: "drivers/media/dvb-frontends/si2168.c" 808 lines --26%-- 212,1-8 25%" Twelve hou

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 21:40:28 +0200 Gonsolo escreveu: > From si2168.c:808: >/* Sometimes firmware returns bogus value */ > if (utmp1 == 0x) > utmp1 = 0; Huh? are you using the upstream Kernel? the above code is at line 215! Please always

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> 1) The firmware file is likely at the Windows driver for this device > (probably using a different format). It should be possible to get > it from there. If you tell me how I'm willing to do this. :) > 2) Another possibility would be to add a way to tell the si2168 driver > to not try to load a

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 16:39:14 -0300 Mauro Carvalho Chehab escreveu: > Em Thu, 3 Oct 2019 21:19:16 +0200 > Gonsolo escreveu: > > > > try other firmware? > > > http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/ > > > > I tried all of them. No difference. > > Maybe the vendor of this device

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
>From si2168.c:808: /* Sometimes firmware returns bogus value */ if (utmp1 == 0x) utmp1 = 0; Maybe we can include my "bogus" hack to get at least Logilink running. Maybe with an info message to tell users what is going on. g

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 21:19:16 +0200 Gonsolo escreveu: > > try other firmware? > > http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/ > > I tried all of them. No difference. Maybe the vendor of this device wrote a different firmware. That happens. Thanks, Mauro

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> try other firmware? > http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/ I tried all of them. No difference. -- g

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
I also tried to add a msleep(1000) after the si2168 firmware upload; no difference. g

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> try other firmware? > http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/ I already downloaded version 4.0.25 from there. -rw-r--r-- 1 rootroot6,8K Apr 5 2018 /lib/firmware/dvb-demod-si2168-b40-01.fw.gonzo -rw-rw-r-- 1 gonsolo gonsolo 16K Okt 3 13:08 /lib/firmware/dvb-demod-si2168-b4

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread JP
On 10/3/19 8:32 PM, Gon Solo wrote: You could also try to disable the firmware upload at si2168 and see if the si2157 reads will succeed. I disabled the upload and while vlc wasn't working anymore I got the following messages: [ 168.196656] si2157 2-0063: found a 'Silicon Labs Si2147-A30' [

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gon Solo
> You could also try to disable the firmware upload at si2168 and see > if the si2157 reads will succeed. I disabled the upload and while vlc wasn't working anymore I got the following messages: [ 168.196656] si2157 2-0063: found a 'Silicon Labs Si2147-A30' [ 168.223009] si2157 2-0063: firmware

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> Weird... it sounds that, after si2168 has its firmware updated, it > starts interfering at si2157. Perhaps there's a bug at si2168 I2C > gate mux logic. Are you using a new Kernel like 5.2? Everything is based on git://linuxtv.org/media_tree.git which is at 5.4-rc1 right now. > I guess the best

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 18:23:26 +0200 Gon Solo escreveu: > > No, I mean with the first patch you sent to the ML, with the powerup > > hack. > > Boot time: > > [4.653257] si2168 1-0067: Silicon Labs Si2168-B40 successfully identified > [4.653259] si2168 1-0067: firmware version: B 4.0.2 >

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gon Solo
> No, I mean with the first patch you sent to the ML, with the powerup > hack. Boot time: [4.653257] si2168 1-0067: Silicon Labs Si2168-B40 successfully identified [4.653259] si2168 1-0067: firmware version: B 4.0.2 [4.653279] usb 2-1: DVB: registering adapter 0 frontend 0 (Silicon La

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 18:03:36 +0200 Gon Solo escreveu: > > With the original patch you proposed, what are the logs? > > With the following patch applied to media_tree master: > > diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c > index e87040d6eca7..4c1ab0b6876a 100644

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gon Solo
> With the original patch you proposed, what are the logs? With the following patch applied to media_tree master: diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c index e87040d6eca7..4c1ab0b6876a 100644 --- a/drivers/media/tuners/si2157.c +++ b/drivers/media/tuners/si215

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> With the original patch you proposed, what are the logs? Which one do you mean? That one: + case SI_BOGUS: + dev_info(&client->dev, "Bogus chip version, trying with no firmware\n"); + fw_name = NULL; + break; With this patch VLC is running but th

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 17:00:08 +0200 Gonsolo escreveu: > > So, I would add a msleep() somewhere after the firmware update. > > I tried that to no avail: > > release_firmware(fw); > + msleep(1000); > > [ 107.903918] si2157 2-0063: firmware version: \xff.\xff.255 > [ 107.903920] s

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> So, I would add a msleep() somewhere after the firmware update. I tried that to no avail: release_firmware(fw); + msleep(1000); [ 107.903918] si2157 2-0063: firmware version: \xff.\xff.255 [ 107.903920] si2157 2-0063: querying chip revision... [ 107.906970] si2157 2-0063: chip

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
> Try to reduce the bus speed to 10kbps Nope: #define I2C_SPEED_REGISTER 260 // ~10k [ 117.860961] si2168 1-0067: downloading firmware from file 'dvb-demod-si2168-b40-01.fw' [ 118.958355] si2168 1-0067: firmware version: B 4.0.25 [ 118.968882] si2157 2-0063: Bogus chip version, trying with n

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 15:53:30 +0200 Gonsolo escreveu: > Hi! > > I tried downloading a new firmware via > >case SI_BOGUS: > - dev_info(&client->dev, "Bogus chip version, trying > with no firmware\n"); > - fw_name = NULL; > + dev_info(&client->dev,

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
Hi! I tried downloading a new firmware via case SI_BOGUS: - dev_info(&client->dev, "Bogus chip version, trying with no firmware\n"); - fw_name = NULL; + dev_info(&client->dev, "Bogus chip version, trying with new firmware\n"); + fw_na

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gon Solo
> Maybe something like this would make it work? Nope. :( [ 47.371022] si2168 1-0067: downloading firmware from file 'dvb-demod-si2168-b40-01.fw' [ 48.632824] si2168 1-0067: firmware version: B 4.0.25 [ 48.671268] si2157 2-0063: unknown chip version Si21255-\xff\xff\xff g

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 09:49:04 -0300 Mauro Carvalho Chehab escreveu: > Em Thu, 3 Oct 2019 13:41:23 +0200 > Gonsolo escreveu: > > > Hi! > > > > > It means that there's a firmware stored at the device's eeprom > > > (version 4.0.2). When the driver starts, it downloads a newer firmware > > > from

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 13:41:23 +0200 Gonsolo escreveu: > Hi! > > > It means that there's a firmware stored at the device's eeprom > > (version 4.0.2). When the driver starts, it downloads a newer firmware > > from the file dvb-demod-si2168-b40-01.fw. > > Thanks for the explanation. > > > Btw, c

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gon Solo
> well, you could try to increase the timeout - although 100 ms seems a lot > of time to me. I tried 5s, still no change. Would it be possible to include my patch, possibly with a warning like "bogus chip version, trying with no firmware"? g

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 14:01:43 +0200 Gon Solo escreveu: > Hi! > > > > Btw, could you please try the enclosed hack and post the results? > > [ 210.178948] si2168 1-0067: downloading firmware from file > 'dvb-demod-si2168-b40-01.fw' > [ 212.404011] si2168 1-0067: firmware version: B 4.0.25 >

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gon Solo
Hi! > Btw, could you please try the enclosed hack and post the results? [ 210.178948] si2168 1-0067: downloading firmware from file 'dvb-demod-si2168-b40-01.fw' [ 212.404011] si2168 1-0067: firmware version: B 4.0.25 [ 212.656467] si2157 2-0063: Needed to wait 100 ms to get chip version [

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
Hi! > It means that there's a firmware stored at the device's eeprom > (version 4.0.2). When the driver starts, it downloads a newer firmware > from the file dvb-demod-si2168-b40-01.fw. Thanks for the explanation. > Btw, could you please try the enclosed hack and post the results? Will do in a

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 12:57:50 +0200 Gonsolo escreveu: > Hi! > > Boot time: > > > [5.380991] si2168 1-0067: firmware version: B 4.0.2 > > When starting VLC: > > > [ 457.677363] si2168 1-0067: downloading firmware from file > > 'dvb-demod-si2168-b40-01.fw' > > [ 458.631034] si2168 1-0067:

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Mauro Carvalho Chehab
Em Thu, 3 Oct 2019 12:13:33 +0200 Gonsolo escreveu: > Hi! > > > Could you please test the enclosing patch and see if, with that, you > > can remove the hacks you added for the tuner probe to work? > > I tested again on a vanilla media_tree with Mauro's patch attached. > Doesn't work. Dmesg ou

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
Hi! Boot time: > [5.380991] si2168 1-0067: firmware version: B 4.0.2 When starting VLC: > [ 457.677363] si2168 1-0067: downloading firmware from file > 'dvb-demod-si2168-b40-01.fw' > [ 458.631034] si2168 1-0067: firmware version: B 4.0.11 > [ 458.650309] si2157 2-0063: unknown chip versi

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-03 Thread Gonsolo
Hi! > Could you please test the enclosing patch and see if, with that, you > can remove the hacks you added for the tuner probe to work? I tested again on a vanilla media_tree with Mauro's patch attached. Doesn't work. Dmesg output: [0.788387] kernel: usb 1-1: new high-speed USB device numbe

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-02 Thread Mauro Carvalho Chehab
Em Wed, 2 Oct 2019 19:23:02 +0200 JP escreveu: > Hi all. > > On 10/2/19 5:21 PM, Gonsolo wrote: > > Hi! > > > >> Antti has some great suggestions in that thread: > >> https://lkml.org/lkml/2017/5/24/245 > >> > >> Also note https://lkml.org/lkml/2017/5/26/357 if you have access to a >

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-02 Thread JP
Hi all. On 10/2/19 5:21 PM, Gonsolo wrote: Hi! Antti has some great suggestions in that thread: https://lkml.org/lkml/2017/5/24/245 Also note https://lkml.org/lkml/2017/5/26/357 if you have access to a logic analyser. I read that thread. Unfortunately I'm not a hardware engineer nor

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-02 Thread Gonsolo
Hi! > Antti has some great suggestions in that thread: > https://lkml.org/lkml/2017/5/24/245 > > Also note https://lkml.org/lkml/2017/5/26/357 if you have access to a > logic analyser. I read that thread. Unfortunately I'm not a hardware engineer nor do I have access to a logic analyser,

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-02 Thread Sean Young
On Wed, Oct 02, 2019 at 04:44:24PM +0200, Gonsolo wrote: > Hi! > > > You need a message and a Signed-off-by: here. > > Ok, I'll try to get that right the next time. > > > > + ret = si2157_power_up(dev, client); > > > + if (ret) > > > + goto err; > > > + /* query chip revi

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-02 Thread Mauro Carvalho Chehab
Em Wed, 2 Oct 2019 16:13:59 +0200 Gon Solo escreveu: All patches should have a description at the beginning of the e-mail body, even the trivial ones. You also forgot to add your Signed-off-by. > --- > drivers/media/tuners/si2157.c | 68 +-- > drivers/media/t

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-02 Thread Gonsolo
Hi! > You need a message and a Signed-off-by: here. Ok, I'll try to get that right the next time. > > + ret = si2157_power_up(dev, client); > > + if (ret) > > + goto err; > > + /* query chip revision */ > > + /* hack: do it here because after the si2168 gets 0101, com

Re: [PATCH] si2157: Add support for Logilink VG0022A.

2019-10-02 Thread Sean Young
On Wed, Oct 02, 2019 at 04:13:59PM +0200, Gon Solo wrote: You need a message and a Signed-off-by: here. > --- > drivers/media/tuners/si2157.c | 68 +-- > drivers/media/tuners/si2157_priv.h| 1 + > drivers/media/usb/dvb-usb-v2/af9035.c | 47 ++