Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c add QAM64/256 support
details: https://anonhg.NetBSD.org/src/rev/035a300caddf
branches: trunk
changeset: 767983:035a300caddf
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Aug 05 20:32:22 2011 +0000
description:
add QAM64/256 support
diffstat:
sys/dev/i2c/cx24227.c | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r ca973148451e -r 035a300caddf sys/dev/i2c/cx24227.c
--- a/sys/dev/i2c/cx24227.c Fri Aug 05 18:59:44 2011 +0000
+++ b/sys/dev/i2c/cx24227.c Fri Aug 05 20:32:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cx24227.c,v 1.2 2011/08/04 22:24:45 jmcneill Exp $ */
+/* $NetBSD: cx24227.c,v 1.3 2011/08/05 20:32:22 jmcneill Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.2 2011/08/04 22:24:45 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.3 2011/08/05 20:32:22 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -173,12 +173,31 @@
{
printf("%s\n", __func__);
+ switch (modulation) {
+ case VSB_8:
+ case QAM_64:
+ case QAM_256:
+ case QAM_AUTO:
+ break;
+ default:
+ return EINVAL;
+ }
+
/* soft reset */
cx24227_writereg(sc, 0xf5, 0x0000);
cx24227_writereg(sc, 0xf5, 0x0001);
- /* 8 VSB */
- cx24227_writereg(sc, 0xf4, 0x0000);
+ switch (modulation) {
+ case VSB_8:
+ /* VSB8 */
+ cx24227_writereg(sc, 0xf4, 0x0000);
+ break;
+ default:
+ /* QAM */
+ cx24227_writereg(sc, 0xf4, 0x0001);
+ cx24227_writereg(sc, 0x85, 0x0110);
+ break;
+ }
/* soft reset */
cx24227_writereg(sc, 0xf5, 0x0000);
Home |
Main Index |
Thread Index |
Old Index