[linuxtv-commits] [hg:v4l-dvb] si470x: let si470x_get_freq return errno

2008-06-05 Thread Patch from Tobias Lorenz
The patch number 7994 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Tobias Lorenz  [EMAIL PROTECTED]
 si470x: let si470x_get_freq return errno


Hi Mauro,

this patch brings the following changes:
- version bumped to 1.0.8 for all the following patches
- si470x_get_freq now returns errno

Signed-off-by: Tobias Lorenz [EMAIL PROTECTED]
Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/radio/radio-si470x.c |   38 +++
 1 file changed, 25 insertions(+), 13 deletions(-)

diff -r 2802609a0b15 -r 1d6053614112 linux/drivers/media/radio/radio-si470x.c
--- a/linux/drivers/media/radio/radio-si470x.c  Sat May 31 15:04:32 2008 +
+++ b/linux/drivers/media/radio/radio-si470x.c  Sat May 31 15:06:50 2008 +
@@ -20,6 +20,19 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/*
+ * User Notes:
+ * - USB Audio is provided by the alsa snd_usb_audio module.
+ *   For listing you have to redirect the sound, for example using:
+ *   arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B -
+ * - regarding module parameters in /sys/module/radio_si470x/parameters:
+ *   the contents of read-only files (0444) are not updated, even if
+ *   space, band and de are changed using private video controls
+ * - increase tune_timeout, if you often get -EIO errors
+ * - hw_freq_seek returns -EAGAIN, when timed out or band limit is reached
  */
 
 
@@ -86,6 +99,9 @@
  * Version 1.0.7
  * - usb autosuspend support
  * - unplugging fixed
+ * 2008-05-07  Tobias Lorenz [EMAIL PROTECTED]
+ * Version 1.0.8
+ * - let si470x_get_freq return errno
  *
  * ToDo:
  * - add seeking support
@@ -98,10 +114,10 @@
 /* driver definitions */
 #define DRIVER_AUTHOR Tobias Lorenz [EMAIL PROTECTED]
 #define DRIVER_NAME radio-si470x
-#define DRIVER_KERNEL_VERSION KERNEL_VERSION(1, 0, 7)
+#define DRIVER_KERNEL_VERSION KERNEL_VERSION(1, 0, 8)
 #define DRIVER_CARD Silicon Labs Si470x FM Radio Receiver
 #define DRIVER_DESC USB radio driver for Si470x FM Radio Receivers
-#define DRIVER_VERSION 1.0.7
+#define DRIVER_VERSION 1.0.8
 
 
 /* kernel includes */
@@ -642,9 +658,9 @@ static int si470x_set_chan(struct si470x
 /*
  * si470x_get_freq - get the frequency
  */
-static unsigned int si470x_get_freq(struct si470x_device *radio)
-{
-   unsigned int spacing, band_bottom, freq;
+static int si470x_get_freq(struct si470x_device *radio, unsigned int *freq)
+{
+   unsigned int spacing, band_bottom;
unsigned short chan;
int retval;
 
@@ -670,14 +686,12 @@ static unsigned int si470x_get_freq(stru
 
/* read channel */
retval = si470x_get_register(radio, READCHAN);
-   if (retval  0)
-   return retval;
chan = radio-registers[READCHAN]  READCHAN_READCHAN;
 
/* Frequency (MHz) = Spacing (kHz) x Channel + Bottom of Band (MHz) */
-   freq = chan * spacing + band_bottom;
-
-   return freq;
+   *freq = chan * spacing + band_bottom;
+
+   return retval;
 }
 
 
@@ -1362,9 +1376,7 @@ static int si470x_vidioc_g_frequency(str
return -EIO;
 
freq-type = V4L2_TUNER_RADIO;
-   freq-frequency = si470x_get_freq(radio);
-
-   return 0;
+   return si470x_get_freq(radio, radio-frequency);
 }
 
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1d6053614112cde1f9f970a603eb1dc8c84d7fc3

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[linuxtv-commits] [hg:v4l-dvb] Backport ivtv i2c changes to better work with the newer I2C code

2008-06-05 Thread Patch from Mauro Carvalho Chehab
The patch number 8003 was added via Mauro Carvalho Chehab [EMAIL PROTECTED]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
[EMAIL PROTECTED]

--

From: Mauro Carvalho Chehab  [EMAIL PROTECTED]
Backport ivtv i2c changes to better work with the newer I2C code


Signed-off-by: Mauro Carvalho Chehab [EMAIL PROTECTED]


---

 linux/drivers/media/video/ivtv/ivtv-i2c.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -r d44ff2966ac6 -r e4720b547df6 linux/drivers/media/video/ivtv/ivtv-i2c.c
--- a/linux/drivers/media/video/ivtv/ivtv-i2c.c Thu Jun 05 10:24:54 2008 -0300
+++ b/linux/drivers/media/video/ivtv/ivtv-i2c.c Thu Jun 05 15:39:42 2008 -0300
@@ -145,7 +145,7 @@ static const char * const hw_devicenames
wm8775,
cs53l32a,
tveeprom,
-   saa7115,
+   saa7114,
upd64031a,
upd64083,
saa717x,


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/e4720b547df6cc9c00143b8e63176cd4cf14d194

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits