From: Antti Palosaari <crope@iki.fi>
To: Benjamin Larsson <benjamin@southpole.se>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] mn88472: simplify bandwidth registers setting code
Date: Tue, 13 Jan 2015 18:57:24 +0200 [thread overview]
Message-ID: <54B54E74.5010908@iki.fi> (raw)
In-Reply-To: <1420246244-6031-1-git-send-email-benjamin@southpole.se>
On 01/03/2015 02:50 AM, Benjamin Larsson wrote:
> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Reviewed-by: Antti Palosaari <crope@iki.fi>
regards
Antti
> ---
> drivers/staging/media/mn88472/mn88472.c | 41 +++++++++++----------------------
> 1 file changed, 14 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c
> index 33604dc..ee933c3 100644
> --- a/drivers/staging/media/mn88472/mn88472.c
> +++ b/drivers/staging/media/mn88472/mn88472.c
> @@ -58,35 +58,22 @@ static int mn88472_set_frontend(struct dvb_frontend *fe)
> goto err;
> }
>
> - switch (c->delivery_system) {
> - case SYS_DVBT:
> - case SYS_DVBT2:
> - if (c->bandwidth_hz <= 5000000) {
> - memcpy(bw_val, "\xe5\x99\x9a\x1b\xa9\x1b\xa9", 7);
> - bw_val2 = 0x03;
> - } else if (c->bandwidth_hz <= 6000000) {
> - /* IF 3570000 Hz, BW 6000000 Hz */
> - memcpy(bw_val, "\xbf\x55\x55\x15\x6b\x15\x6b", 7);
> - bw_val2 = 0x02;
> - } else if (c->bandwidth_hz <= 7000000) {
> - /* IF 4570000 Hz, BW 7000000 Hz */
> - memcpy(bw_val, "\xa4\x00\x00\x0f\x2c\x0f\x2c", 7);
> - bw_val2 = 0x01;
> - } else if (c->bandwidth_hz <= 8000000) {
> - /* IF 4570000 Hz, BW 8000000 Hz */
> - memcpy(bw_val, "\x8f\x80\x00\x08\xee\x08\xee", 7);
> - bw_val2 = 0x00;
> - } else {
> - ret = -EINVAL;
> - goto err;
> - }
> - break;
> - case SYS_DVBC_ANNEX_A:
> - /* IF 5070000 Hz, BW 8000000 Hz */
> + if (c->bandwidth_hz <= 5000000) {
> + memcpy(bw_val, "\xe5\x99\x9a\x1b\xa9\x1b\xa9", 7);
> + bw_val2 = 0x03;
> + } else if (c->bandwidth_hz <= 6000000) {
> + /* IF 3570000 Hz, BW 6000000 Hz */
> + memcpy(bw_val, "\xbf\x55\x55\x15\x6b\x15\x6b", 7);
> + bw_val2 = 0x02;
> + } else if (c->bandwidth_hz <= 7000000) {
> + /* IF 4570000 Hz, BW 7000000 Hz */
> + memcpy(bw_val, "\xa4\x00\x00\x0f\x2c\x0f\x2c", 7);
> + bw_val2 = 0x01;
> + } else if (c->bandwidth_hz <= 8000000) {
> + /* IF 4570000 Hz, BW 8000000 Hz */
> memcpy(bw_val, "\x8f\x80\x00\x08\xee\x08\xee", 7);
> bw_val2 = 0x00;
> - break;
> - default:
> + } else {
> ret = -EINVAL;
> goto err;
> }
>
--
http://palosaari.fi/
prev parent reply other threads:[~2015-01-13 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-03 0:50 [PATCH] mn88472: simplify bandwidth registers setting code Benjamin Larsson
2015-01-13 16:57 ` Antti Palosaari [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54B54E74.5010908@iki.fi \
--to=crope@iki.fi \
--cc=benjamin@southpole.se \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.