All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitri Belimov <d.belimov@gmail.com>
To: linux-media@vger.kernel.org, video4linux-list@redhat.com
Subject: [PATCH] Change order for FM tune.
Date: Mon, 25 May 2009 11:22:41 +1000	[thread overview]
Message-ID: <20090525112241.41a8f67b@glory.loctelecom.ru> (raw)

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

Hi All.

Change order data of buffer in FM simple_tune function. It is usefull for:

1. Set data of tuner with CP bit UP. 0xCE for MK5 or 0xC6 for MK3
2. When call simple_fm_tune, read this byte from config and overwrite 
this byte in function simple_radio_bandswitch for set CP bit to OFF.

Of course it can be usefull for other tuner for overwrite default settings of FM.

diff -r 315bc4b65b4f linux/drivers/media/common/tuners/tuner-simple.c
--- a/linux/drivers/media/common/tuners/tuner-simple.c	Sun May 17 12:28:55 2009 +0000
+++ b/linux/drivers/media/common/tuners/tuner-simple.c	Mon May 25 05:45:39 2009 +1000
@@ -698,11 +698,11 @@
 		return 0;
 	}
 
+	buffer[2] = (t_params->ranges[0].config & ~TUNER_RATIO_MASK) |
+		    TUNER_RATIO_SELECT_50; /* 50 kHz step */
+
 	/* Bandswitch byte */
 	simple_radio_bandswitch(fe, &buffer[0]);
-
-	buffer[2] = (t_params->ranges[0].config & ~TUNER_RATIO_MASK) |
-		    TUNER_RATIO_SELECT_50; /* 50 kHz step */
 
 	/* Convert from 1/16 kHz V4L steps to 1/20 MHz (=50 kHz) PLL steps
 	   freq * (1 Mhz / 16000 V4L steps) * (20 PLL steps / 1 MHz) =

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

With my best regards, Dmitry.

[-- Attachment #2: fm_tune_order.patch --]
[-- Type: text/x-patch, Size: 788 bytes --]

diff -r 315bc4b65b4f linux/drivers/media/common/tuners/tuner-simple.c
--- a/linux/drivers/media/common/tuners/tuner-simple.c	Sun May 17 12:28:55 2009 +0000
+++ b/linux/drivers/media/common/tuners/tuner-simple.c	Mon May 25 05:45:39 2009 +1000
@@ -698,11 +698,11 @@
 		return 0;
 	}
 
+	buffer[2] = (t_params->ranges[0].config & ~TUNER_RATIO_MASK) |
+		    TUNER_RATIO_SELECT_50; /* 50 kHz step */
+
 	/* Bandswitch byte */
 	simple_radio_bandswitch(fe, &buffer[0]);
-
-	buffer[2] = (t_params->ranges[0].config & ~TUNER_RATIO_MASK) |
-		    TUNER_RATIO_SELECT_50; /* 50 kHz step */
 
 	/* Convert from 1/16 kHz V4L steps to 1/20 MHz (=50 kHz) PLL steps
 	   freq * (1 Mhz / 16000 V4L steps) * (20 PLL steps / 1 MHz) =

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

                 reply	other threads:[~2009-05-25  1:22 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=20090525112241.41a8f67b@glory.loctelecom.ru \
    --to=d.belimov@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=video4linux-list@redhat.com \
    /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.