summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornsayer <nsayer@FreeBSD.org>2000-08-02 06:36:55 +0000
committernsayer <nsayer@FreeBSD.org>2000-08-02 06:36:55 +0000
commita493e558f76a40e47fcaa027e90284ee058cae15 (patch)
tree70bdf827f176254f31001ce4e9fa952574591e3d
parent0236152f47c6d5c83b8abcb3870c3a8295b92a4e (diff)
downloadFreeBSD-src-a493e558f76a40e47fcaa027e90284ee058cae15.zip
FreeBSD-src-a493e558f76a40e47fcaa027e90284ee058cae15.tar.gz
Fix channel 1, sort of. recording now generates IRQs and the output
appears to be the correct length, but quality of output has not yet been tested. Also, full duplex audio (that is, playback on channel 1) does not yet work. Two constants and I am there! Obtained from: major hints from ALSA
-rw-r--r--sys/dev/sound/pci/solo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c
index ccc5116..1353647 100644
--- a/sys/dev/sound/pci/solo.c
+++ b/sys/dev/sound/pci/solo.c
@@ -709,12 +709,18 @@ essmix_setrecsrc(snd_mixer *m, u_int32_t src)
static int
ess_dmasetup(struct ess_info *sc, int ch, u_int32_t base, u_int16_t cnt, int dir)
{
+
+/*
+ * XXX -- the constants written to register 8 and b in the playback case
+ * are certainly not 0x00. But I don't know what they really are
+ */
KASSERT(ch == 1 || ch == 2, ("bad ch"));
sc->dmasz[ch - 1] = cnt;
if (ch == 1) {
- port_wr(sc->vc, 0x8, 0x50 | (dir == PCMDIR_PLAY)? 0x04 : 0x02, 1); /* command */
+ port_wr(sc->vc, 0x8, dir == PCMDIR_PLAY? 0x00 : 0xc4, 1); /* command */
port_wr(sc->vc, 0xd, 0xff, 1); /* reset */
port_wr(sc->vc, 0xf, 0x01, 1); /* mask */
+ port_wr(sc->vc, 0xb, dir == PCMDIR_PLAY? 0x00 : 0x54, 1); /* mode */
port_wr(sc->vc, 0x0, base, 4);
port_wr(sc->vc, 0x4, cnt, 2);
@@ -744,7 +750,7 @@ ess_dmatrigger(struct ess_info *sc, int ch, int go)
{
KASSERT(ch == 1 || ch == 2, ("bad ch"));
if (ch == 1)
- port_wr(sc->vc, 0xf, go? 0x01 : 0x00, 1); /* mask */
+ port_wr(sc->vc, 0xf, go? 0x00 : 0x01, 1); /* mask */
else if (ch == 2)
port_wr(sc->io, 0x6, 0x08 | (go? 0x02 : 0x00), 1); /* autoinit */
return 0;
OpenPOWER on IntegriCloud