All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manu Abraham <manu@kromtek.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Johannes Stezenbach <js@linuxtv.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] Fix 22k tone control
Date: Fri, 27 May 2005 00:35:35 +0400	[thread overview]
Message-ID: <42963317.8050801@kromtek.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

o Fix bug in 22k tone control


Signed-off-by: Manu Abraham <manu@kromtek.com>

      dst.c |   27 +++++++++------------------
      1 files changed, 9 insertions(+), 18 deletions(-)





[-- Attachment #2: fix-22k-tone-control.diff --]
[-- Type: text/x-patch, Size: 1231 bytes --]

--- linux-2.6.12-rc5.orig/drivers/media/dvb/bt8xx/dst.c	2005-05-26 11:08:42.000000000 +0400
+++ linux-2.6.12-rc5/drivers/media/dvb/bt8xx/dst.c	2005-05-26 11:16:20.000000000 +0400
@@ -907,12 +907,7 @@ static int dst_tone_power_cmd(struct dst
 		return 0;
 
 	paket[4] = state->tx_tuna[4];
-
-	if (state->tone == SEC_TONE_ON)
-		paket[2] = 0x02;
-	else
-		paket[2] = 0;
-
+	paket[2] = state->tx_tuna[2];
 	paket[3] = state->tx_tuna[3];
 	paket[7] = dst_check_sum (paket, 7);
 	dst_command(state, paket, 8);
@@ -1094,7 +1089,6 @@ static int dst_set_voltage(struct dvb_fr
 
 static int dst_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
 {
-	u8 *val;
 	struct dst_state* state = fe->demodulator_priv;
 
 	state->tone = tone;
@@ -1102,20 +1096,17 @@ static int dst_set_tone(struct dvb_front
 	if (state->dst_type == DST_TYPE_IS_TERR)
 		return 0;
 
-	val = &state->tx_tuna[0];
-
-	val[8] &= ~0x1;
-
 	switch (tone) {
-	case SEC_TONE_OFF:
-		break;
+		case SEC_TONE_OFF:
+			state->tx_tuna[2] = 0xff;
+			break;
 
-	case SEC_TONE_ON:
-		val[8] |= 1;
-		break;
+		case SEC_TONE_ON:
+			state->tx_tuna[2] = 0x02;
+			break;
 
-	default:
-		return -EINVAL;
+		default:
+			return -EINVAL;
 	}
 	dst_tone_power_cmd(state);
 





                 reply	other threads:[~2005-05-26 20:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=42963317.8050801@kromtek.com \
    --to=manu@kromtek.com \
    --cc=akpm@osdl.org \
    --cc=js@linuxtv.org \
    --cc=linux-kernel@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.