Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Mar 1997 09:08:17 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        "David E. Cross" <dec@phoenix.its.rpi.edu>
Cc:        freebsd-hackers@FreeBSD.ORG, support@4front-tech.com
Subject:   Re: OSS/FreeBSD and Ensoniq Soundscape
Message-ID:  <Pine.BSF.3.95q.970330090111.271A-101000@kipper.nlsystems.com>
In-Reply-To: <199703300516.AAA04782@phoenix.its.rpi.edu>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
[Added support@4front-tech.com to Cc list]

On Sun, 30 Mar 1997, David E. Cross wrote:

> I got the OSS/FreeBSD drivers earlier this week, and have my SoundScape card
> "mostly" working.  The MIDI works flawlessly, but the wave support is verry
> unstable, it acts as if there is a DMA/IRQ conflict, but there is not...
> (I have tried both my "tuned" kernel and GENERIC, both have the same
> failure mode).  If anyone else has a SoundScape card, and would be willing
> to work with me on this, please let me know.

I have an Ensoniq Soundscape S2000 in my machine.  I installed OSS last
night and playback seems to work pretty well.  I have a lot of problems
with recording though.  Even if I select a high data rate, sound recording
is extremely noisy.  Also, if I try to record 8 bit samples, it complains
about DMA problems a few times and them completely locks up the system.
The attached program shows this when used to record from the Line-1 input
(CD player).

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 951 1891

[-- Attachment #2 --]
#include <stdio.h>
#include <fcntl.h>
#include <machine/soundcard.h>

int main(int argc, char** argv)
{
    int fd;
    int t;

    fd = open("/dev/dsp", O_RDWR);
    if (fd < 0) {
	perror("dsp");
	exit(1);
    }
    t = AFMT_S8;
    if (ioctl(fd, SNDCTL_DSP_SETFMT, &t) < 0) {
	perror("format");
	exit(1);
    }
    if (t != AFMT_S8) {
	fprintf(stderr, "weird format %x\n", t);
	exit(1);
    }
    t = 0;
    if (ioctl(fd, SNDCTL_DSP_STEREO, &t) < 0) {
	perror("stereo");
	exit(1);
    }
    if (t != 0) {
	fprintf(stderr, "no stereo\n");
	exit(1);
    }
    t = 32000;
    if (ioctl(fd, SNDCTL_DSP_SPEED, &t) < 0) {
	perror("speed");
	exit(1);
    }
    if (t != 32000) {
	fprintf(stderr, "weird speed %d\n", t);
	exit(1);
    }

    if (argc != 2 || (strcmp(argv[1], "-r") && strcmp(argv[1], "-w"))) {
	fprintf(stderr, "usage: recordplay [-r|-w]\n");
	exit(1);
    }
    
    if (!strcmp(argv[1], "-r"))
	for (;;) {
	    char buf[4096];
	    int n;

	    n = read(fd, buf, sizeof buf);
	    if (n < 0) {
		perror("read");
		exit(1);
	    }
	    if (n == 0)
		break;
	    write(1, buf, n);
	}
    else
	for (;;) {
	    char buf[4096];
	    int n;

	    n = read(0, buf, sizeof buf);
	    if (n < 0) {
		perror("read");
		exit(1);
	    }
	    if (n == 0)
		break;
	    write(fd, buf, n);
	}
}
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970330090111.271A-101000>