[2/3] em28xx-dvb: enable LNA for cxd2820r in DVB-T mode

Message ID 1331832829-4580-3-git-send-email-gennarone@gmail.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Gianluca Gennari March 15, 2012, 5:33 p.m. UTC
  Enable the LNA amplifier also for DVB-T (like for DVB-T2 and DVB-C);
this greatly improves reception of weak signals without affecting the reception
of the strong ones.

Experimental data (collected with the mipsel STB) on the weakest frequencies
available in my area:

LNA OFF:

MUX          level   BER     picture

RAI mux 4    72%     32000   corrupted
TIMB 2       75%     14      OK
TVA Vicenza  68%     32000   corrupted
RAI mux 2    78%     14      OK

LNA ON:

MUX          level   BER     picture

RAI mux 4    73%     1500    OK
TIMB 2       76%     0       OK
TVA Vicenza  69%     0       OK
RAI mux 2    79%     0       OK

Moreover, with LNA enabled, the PCTV 290e was able to pick up 2 new frequencies
matching the integrated tuner of my Panasonic G20 TV, which is really good.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
 drivers/media/video/em28xx/em28xx-dvb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
  

Comments

Antti Palosaari March 23, 2012, 12:55 p.m. UTC | #1
As we speak earlier LNA support is not implemented at all as our API / 
framework. My personal opinion LNA should be always disabled by default 
since it still makes some noise. Current hard coded values are just 
selected what gives better signal for me and thus are not optimal nor 
correct. Anyhow, I would not like to change those as for some user it 
could cause problems. And if I would change those I will disable all :)

So better to left as those are currently until API/DVB core is fixed to 
support LNA.

regards
Antti


On 15.03.2012 19:33, Gianluca Gennari wrote:
> Enable the LNA amplifier also for DVB-T (like for DVB-T2 and DVB-C);
> this greatly improves reception of weak signals without affecting the reception
> of the strong ones.
>
> Experimental data (collected with the mipsel STB) on the weakest frequencies
> available in my area:
>
> LNA OFF:
>
> MUX          level   BER     picture
>
> RAI mux 4    72%     32000   corrupted
> TIMB 2       75%     14      OK
> TVA Vicenza  68%     32000   corrupted
> RAI mux 2    78%     14      OK
>
> LNA ON:
>
> MUX          level   BER     picture
>
> RAI mux 4    73%     1500    OK
> TIMB 2       76%     0       OK
> TVA Vicenza  69%     0       OK
> RAI mux 2    79%     0       OK
>
> Moreover, with LNA enabled, the PCTV 290e was able to pick up 2 new frequencies
> matching the integrated tuner of my Panasonic G20 TV, which is really good.
>
> Signed-off-by: Gianluca Gennari<gennarone@gmail.com>
> ---
>   drivers/media/video/em28xx/em28xx-dvb.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
> index fbd9010..4917b71 100644
> --- a/drivers/media/video/em28xx/em28xx-dvb.c
> +++ b/drivers/media/video/em28xx/em28xx-dvb.c
> @@ -502,7 +502,8 @@ static struct cxd2820r_config em28xx_cxd2820r_config = {
>   	.i2c_address = (0xd8>>  1),
>   	.ts_mode = CXD2820R_TS_SERIAL,
>
> -	/* enable LNA for DVB-T2 and DVB-C */
> +	/* enable LNA for DVB-T, DVB-T2 and DVB-C */
> +	.gpio_dvbt[0] = CXD2820R_GPIO_E | CXD2820R_GPIO_O | CXD2820R_GPIO_L,
>   	.gpio_dvbt2[0] = CXD2820R_GPIO_E | CXD2820R_GPIO_O | CXD2820R_GPIO_L,
>   	.gpio_dvbc[0] = CXD2820R_GPIO_E | CXD2820R_GPIO_O | CXD2820R_GPIO_L,
>   };
  
Mauro Carvalho Chehab March 23, 2012, 2:45 p.m. UTC | #2
Em 23-03-2012 11:30, Gianluca Gennari escreveu:
> 
> 
> On Fri, Mar 23, 2012 at 1:55 PM, Antti Palosaari <crope@iki.fi <mailto:crope@iki.fi>> wrote:
> 
>     As we speak earlier LNA support is not implemented at all as our API / framework. My personal opinion LNA should be always disabled by default since it still makes some noise. Current hard coded values are just selected what gives better signal for me and thus are not optimal nor correct. Anyhow, I would not like to change those as for some user it could cause problems. And if I would change those I will disable all :)
> 
>     So better to left as those are currently until API/DVB core is fixed to support LNA.
> 
>     regards
>     Antti
> 
> 
>  
> Hi Antti,
> my opinion is that, if we have to choose between LNA always ON or always OFF (until we have proper API support), the best option is always ON.

Just add an API for it. It is simple and clean: all you need to do is to add a new DVBv5 props.
Please don't forget to update the DocBook when doing that.

> 
> For sure, an amplifier adds some noise (so it makes SNR a little worse). On the other hand, it make signals stronger and every demodulator needs a minimum signal strength to lock the channel.
> 
> So LNA is helping weak signals with good SNR, while it's damaging strong signals with poor SNR. I believe the first category of signals is far more common (especially if you want to use USB devices with portable antennas).
> 
> A secondary reason to disable LNA could be to reduce power consumption, but i believe this embedded LNA devices consume just a few mA (but I don't have exact figures) so I don't see this as a major issue.
> 
> The cxd2820r itself is a power hog so I think LNA does not make a substantial difference on power consumption.
> 
> Best regards,
> Gianluca

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index fbd9010..4917b71 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -502,7 +502,8 @@  static struct cxd2820r_config em28xx_cxd2820r_config = {
 	.i2c_address = (0xd8 >> 1),
 	.ts_mode = CXD2820R_TS_SERIAL,
 
-	/* enable LNA for DVB-T2 and DVB-C */
+	/* enable LNA for DVB-T, DVB-T2 and DVB-C */
+	.gpio_dvbt[0] = CXD2820R_GPIO_E | CXD2820R_GPIO_O | CXD2820R_GPIO_L,
 	.gpio_dvbt2[0] = CXD2820R_GPIO_E | CXD2820R_GPIO_O | CXD2820R_GPIO_L,
 	.gpio_dvbc[0] = CXD2820R_GPIO_E | CXD2820R_GPIO_O | CXD2820R_GPIO_L,
 };