Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/allwinner seems I have to enable ADC PA for sou...
details: https://anonhg.NetBSD.org/src/rev/0ff5ba4b4de3
branches: trunk
changeset: 332085:0ff5ba4b4de3
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Sep 06 16:47:03 2014 +0000
description:
seems I have to enable ADC PA for sound to come out
diffstat:
sys/arch/arm/allwinner/awin_ac.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 26ae5d7d704d -r 0ff5ba4b4de3 sys/arch/arm/allwinner/awin_ac.c
--- a/sys/arch/arm/allwinner/awin_ac.c Sat Sep 06 14:53:41 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_ac.c Sat Sep 06 16:47:03 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_ac.c,v 1.6 2014/09/06 14:53:41 jmcneill Exp $ */
+/* $NetBSD: awin_ac.c,v 1.7 2014/09/06 16:47:03 jmcneill Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_ac.c,v 1.6 2014/09/06 14:53:41 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_ac.c,v 1.7 2014/09/06 16:47:03 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -117,6 +117,7 @@
#define AC_ADC_FIFOS 0x20
#define AC_ADC_RXDATA 0x24
#define AC_ADC_ACTL 0x28
+#define ADC_ACTL_PA_EN __BIT(4)
#define AC_DAC_CNT 0x30
#define AC_ADC_CNT 0x34
#define AC_DAC_CAL 0x38
@@ -372,6 +373,10 @@
val |= __SHIFTIN(AWINAC_INIT_VOL, DAC_ACTL_PAVOL);
AC_WRITE(sc, AC_DAC_ACTL, val);
+ val = AC_READ(sc, AC_ADC_ACTL);
+ val |= ADC_ACTL_PA_EN;
+ AC_WRITE(sc, AC_ADC_ACTL, val);
+
val = AC_READ(sc, AC_DAC_FIFOC);
val &= ~DAC_FIFOC_IRQ_EN;
val &= ~DAC_FIFOC_DRQ_EN;
Home |
Main Index |
Thread Index |
Old Index