Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev use lg3303_get_snr, lg3303_get_signal_strength
details: https://anonhg.NetBSD.org/src/rev/6b276416d1e1
branches: trunk
changeset: 767334:6b276416d1e1
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Jul 15 20:29:58 2011 +0000
description:
use lg3303_get_snr, lg3303_get_signal_strength
diffstat:
sys/dev/pci/cxdtv.c | 26 ++++++++++++++++++++++----
sys/dev/usb/emdtv_dtv.c | 14 ++++++++++++--
2 files changed, 34 insertions(+), 6 deletions(-)
diffs (93 lines):
diff -r 638a8483ff32 -r 6b276416d1e1 sys/dev/pci/cxdtv.c
--- a/sys/dev/pci/cxdtv.c Fri Jul 15 20:28:38 2011 +0000
+++ b/sys/dev/pci/cxdtv.c Fri Jul 15 20:29:58 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cxdtv.c,v 1.4 2011/07/15 03:35:13 jmcneill Exp $ */
+/* $NetBSD: cxdtv.c,v 1.5 2011/07/15 20:29:58 jmcneill Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cxdtv.c,v 1.4 2011/07/15 03:35:13 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cxdtv.c,v 1.5 2011/07/15 20:29:58 jmcneill Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -628,13 +628,31 @@
static uint16_t
cxdtv_dtv_get_signal_strength(void *priv)
{
- return 27;
+ struct cxdtv_softc *sc = priv;
+
+ switch(sc->sc_board->cb_demod) {
+ case CXDTV_DEMOD_NXT2004:
+ return 0; /* TODO */
+ case CXDTV_DEMOD_LG3303:
+ return lg3303_get_signal_strength(sc->sc_demod);
+ }
+
+ return 0;
}
static uint16_t
cxdtv_dtv_get_snr(void *priv)
{
- return 42;
+ struct cxdtv_softc *sc = priv;
+
+ switch(sc->sc_board->cb_demod) {
+ case CXDTV_DEMOD_NXT2004:
+ return 0; /* TODO */
+ case CXDTV_DEMOD_LG3303:
+ return lg3303_get_snr(sc->sc_demod);
+ }
+
+ return 0;
}
static int
diff -r 638a8483ff32 -r 6b276416d1e1 sys/dev/usb/emdtv_dtv.c
--- a/sys/dev/usb/emdtv_dtv.c Fri Jul 15 20:28:38 2011 +0000
+++ b/sys/dev/usb/emdtv_dtv.c Fri Jul 15 20:29:58 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emdtv_dtv.c,v 1.3 2011/07/15 10:48:30 jmcneill Exp $ */
+/* $NetBSD: emdtv_dtv.c,v 1.4 2011/07/15 20:32:24 jmcneill Exp $ */
/*-
* Copyright (c) 2008, 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emdtv_dtv.c,v 1.3 2011/07/15 10:48:30 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emdtv_dtv.c,v 1.4 2011/07/15 20:32:24 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -259,12 +259,22 @@
uint16_t
emdtv_dtv_get_signal_strength(void *priv)
{
+ struct emdtv_softc *sc = priv;
+
+ if (sc->sc_lg3303)
+ return lg3303_get_signal_strength(sc->sc_lg3303);
+
return 0;
}
uint16_t
emdtv_dtv_get_snr(void *priv)
{
+ struct emdtv_softc *sc = priv;
+
+ if (sc->sc_lg3303)
+ return lg3303_get_snr(sc->sc_lg3303);
+
return 0;
}
Home |
Main Index |
Thread Index |
Old Index