* [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters
@ 2015-01-16 12:35 Olli Salonen
2015-01-16 12:35 ` [PATCH 2/2] si2168: add support for 1.7MHz bandwidth Olli Salonen
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Olli Salonen @ 2015-01-16 12:35 UTC (permalink / raw)
To: linux-media; +Cc: Olli Salonen
This patch should is based on Antti's silabs branch.
According to dvb-frontend.h set_frontend may be called with bandwidth_hz set to 0 if automatic bandwidth is required. Si2168 does not support automatic bandwidth and does not declare FE_CAN_BANDWIDTH_AUTO in caps.
This patch will change the behaviour in a way that EINVAL is returned if bandwidth_hz is 0.
Cc-to: Antti Palosaari <crope@iki.fi>
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
drivers/media/dvb-frontends/si2168.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
index 7f966f3..7fef5ab 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -180,7 +180,12 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
goto err;
}
- if (c->bandwidth_hz <= 5000000)
+ if (c->bandwidth_hz == 0) {
+ ret = -EINVAL;
+ dev_err(&client->dev, "automatic bandwidth not supported");
+ goto err;
+ }
+ else if (c->bandwidth_hz <= 5000000)
bandwidth = 0x05;
else if (c->bandwidth_hz <= 6000000)
bandwidth = 0x06;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] si2168: add support for 1.7MHz bandwidth
2015-01-16 12:35 [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters Olli Salonen
@ 2015-01-16 12:35 ` Olli Salonen
2015-01-16 14:26 ` Antti Palosaari
` (2 more replies)
2015-01-16 14:22 ` [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters Antti Palosaari
2015-01-16 14:31 ` Prabhakar Lad
2 siblings, 3 replies; 7+ messages in thread
From: Olli Salonen @ 2015-01-16 12:35 UTC (permalink / raw)
To: linux-media; +Cc: Olli Salonen
This patch is based on Antti's silabs branch.
Add support for 1.7 MHz bandwidth. Supported in all versions of Si2168 according to short data sheets.
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
drivers/media/dvb-frontends/si2168.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
index 7fef5ab..ec893ee 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -185,6 +185,8 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
dev_err(&client->dev, "automatic bandwidth not supported");
goto err;
}
+ else if (c->bandwidth_hz <= 2000000)
+ bandwidth = 0x02;
else if (c->bandwidth_hz <= 5000000)
bandwidth = 0x05;
else if (c->bandwidth_hz <= 6000000)
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters
2015-01-16 12:35 [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters Olli Salonen
2015-01-16 12:35 ` [PATCH 2/2] si2168: add support for 1.7MHz bandwidth Olli Salonen
@ 2015-01-16 14:22 ` Antti Palosaari
2015-01-16 14:31 ` Prabhakar Lad
2 siblings, 0 replies; 7+ messages in thread
From: Antti Palosaari @ 2015-01-16 14:22 UTC (permalink / raw)
To: Olli Salonen, linux-media
On 01/16/2015 02:35 PM, Olli Salonen wrote:
> This patch should is based on Antti's silabs branch.
>
> According to dvb-frontend.h set_frontend may be called with bandwidth_hz set to 0 if automatic bandwidth is required. Si2168 does not support automatic bandwidth and does not declare FE_CAN_BANDWIDTH_AUTO in caps.
>
> This patch will change the behaviour in a way that EINVAL is returned if bandwidth_hz is 0.
>
> Cc-to: Antti Palosaari <crope@iki.fi>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Antti
> ---
> drivers/media/dvb-frontends/si2168.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
> index 7f966f3..7fef5ab 100644
> --- a/drivers/media/dvb-frontends/si2168.c
> +++ b/drivers/media/dvb-frontends/si2168.c
> @@ -180,7 +180,12 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
> goto err;
> }
>
> - if (c->bandwidth_hz <= 5000000)
> + if (c->bandwidth_hz == 0) {
> + ret = -EINVAL;
> + dev_err(&client->dev, "automatic bandwidth not supported");
> + goto err;
> + }
> + else if (c->bandwidth_hz <= 5000000)
> bandwidth = 0x05;
> else if (c->bandwidth_hz <= 6000000)
> bandwidth = 0x06;
>
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] si2168: add support for 1.7MHz bandwidth
2015-01-16 12:35 ` [PATCH 2/2] si2168: add support for 1.7MHz bandwidth Olli Salonen
@ 2015-01-16 14:26 ` Antti Palosaari
2015-01-16 14:28 ` Tycho Lürsen
2015-01-16 20:20 ` Prabhakar Lad
2 siblings, 0 replies; 7+ messages in thread
From: Antti Palosaari @ 2015-01-16 14:26 UTC (permalink / raw)
To: Olli Salonen, linux-media
On 01/16/2015 02:35 PM, Olli Salonen wrote:
> This patch is based on Antti's silabs branch.
>
> Add support for 1.7 MHz bandwidth. Supported in all versions of Si2168 according to short data sheets.
>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
How about tuner driver filters? Having too wide channel filters reduces
some performance, but it still works. It could be even possible 5MHz is
smallest filter tuner supports...
regards
Antti
> ---
> drivers/media/dvb-frontends/si2168.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
> index 7fef5ab..ec893ee 100644
> --- a/drivers/media/dvb-frontends/si2168.c
> +++ b/drivers/media/dvb-frontends/si2168.c
> @@ -185,6 +185,8 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
> dev_err(&client->dev, "automatic bandwidth not supported");
> goto err;
> }
> + else if (c->bandwidth_hz <= 2000000)
> + bandwidth = 0x02;
> else if (c->bandwidth_hz <= 5000000)
> bandwidth = 0x05;
> else if (c->bandwidth_hz <= 6000000)
>
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] si2168: add support for 1.7MHz bandwidth
2015-01-16 12:35 ` [PATCH 2/2] si2168: add support for 1.7MHz bandwidth Olli Salonen
2015-01-16 14:26 ` Antti Palosaari
@ 2015-01-16 14:28 ` Tycho Lürsen
2015-01-16 20:20 ` Prabhakar Lad
2 siblings, 0 replies; 7+ messages in thread
From: Tycho Lürsen @ 2015-01-16 14:28 UTC (permalink / raw)
To: linux-media
Hi Olli,
did you commit this anywhere?
Regards,
Tycho.
Op 16-01-15 om 13:35 schreef Olli Salonen:
> This patch is based on Antti's silabs branch.
>
> Add support for 1.7 MHz bandwidth. Supported in all versions of Si2168 according to short data sheets.
>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
> drivers/media/dvb-frontends/si2168.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
> index 7fef5ab..ec893ee 100644
> --- a/drivers/media/dvb-frontends/si2168.c
> +++ b/drivers/media/dvb-frontends/si2168.c
> @@ -185,6 +185,8 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
> dev_err(&client->dev, "automatic bandwidth not supported");
> goto err;
> }
> + else if (c->bandwidth_hz <= 2000000)
> + bandwidth = 0x02;
> else if (c->bandwidth_hz <= 5000000)
> bandwidth = 0x05;
> else if (c->bandwidth_hz <= 6000000)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters
2015-01-16 12:35 [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters Olli Salonen
2015-01-16 12:35 ` [PATCH 2/2] si2168: add support for 1.7MHz bandwidth Olli Salonen
2015-01-16 14:22 ` [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters Antti Palosaari
@ 2015-01-16 14:31 ` Prabhakar Lad
2 siblings, 0 replies; 7+ messages in thread
From: Prabhakar Lad @ 2015-01-16 14:31 UTC (permalink / raw)
To: Olli Salonen; +Cc: linux-media
Hi Olli,
Thanks for the patch.
On Fri, Jan 16, 2015 at 12:35 PM, Olli Salonen <olli.salonen@iki.fi> wrote:
> This patch should is based on Antti's silabs branch.
>
> According to dvb-frontend.h set_frontend may be called with bandwidth_hz set to 0 if automatic bandwidth is required. Si2168 does not support automatic bandwidth and does not declare FE_CAN_BANDWIDTH_AUTO in caps.
>
> This patch will change the behaviour in a way that EINVAL is returned if bandwidth_hz is 0.
>
> Cc-to: Antti Palosaari <crope@iki.fi>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
> drivers/media/dvb-frontends/si2168.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
> index 7f966f3..7fef5ab 100644
> --- a/drivers/media/dvb-frontends/si2168.c
> +++ b/drivers/media/dvb-frontends/si2168.c
> @@ -180,7 +180,12 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
> goto err;
> }
>
> - if (c->bandwidth_hz <= 5000000)
> + if (c->bandwidth_hz == 0) {
> + ret = -EINVAL;
> + dev_err(&client->dev, "automatic bandwidth not supported");
> + goto err;
> + }
> + else if (c->bandwidth_hz <= 5000000)
> bandwidth = 0x05;
Checkpatch should catch it. did you run checkpatch ?
Thanks,
--Prabhakar Lad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] si2168: add support for 1.7MHz bandwidth
2015-01-16 12:35 ` [PATCH 2/2] si2168: add support for 1.7MHz bandwidth Olli Salonen
2015-01-16 14:26 ` Antti Palosaari
2015-01-16 14:28 ` Tycho Lürsen
@ 2015-01-16 20:20 ` Prabhakar Lad
2 siblings, 0 replies; 7+ messages in thread
From: Prabhakar Lad @ 2015-01-16 20:20 UTC (permalink / raw)
To: Olli Salonen; +Cc: linux-media
Hi Olli,
Thanks for the patch.
On Fri, Jan 16, 2015 at 12:35 PM, Olli Salonen <olli.salonen@iki.fi> wrote:
> This patch is based on Antti's silabs branch.
>
> Add support for 1.7 MHz bandwidth. Supported in all versions of Si2168 according to short data sheets.
>
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
> drivers/media/dvb-frontends/si2168.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
> index 7fef5ab..ec893ee 100644
> --- a/drivers/media/dvb-frontends/si2168.c
> +++ b/drivers/media/dvb-frontends/si2168.c
> @@ -185,6 +185,8 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
> dev_err(&client->dev, "automatic bandwidth not supported");
> goto err;
> }
> + else if (c->bandwidth_hz <= 2000000)
> + bandwidth = 0x02;
Please fix checkpatch errors for this patch aswel.
Thanks,
--Prabhakar Lad
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-01-16 20:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-16 12:35 [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters Olli Salonen
2015-01-16 12:35 ` [PATCH 2/2] si2168: add support for 1.7MHz bandwidth Olli Salonen
2015-01-16 14:26 ` Antti Palosaari
2015-01-16 14:28 ` Tycho Lürsen
2015-01-16 20:20 ` Prabhakar Lad
2015-01-16 14:22 ` [PATCH 1/2] si2168: return error if set_frontend is called with invalid parameters Antti Palosaari
2015-01-16 14:31 ` Prabhakar Lad
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.