Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2001 22:15:07 GMT
From:      Michael Robinson <robinson@netrinsics.com>
To:        freebsd-mobile@freebsd.org
Subject:   No, I mean *really* reset the DSP
Message-ID:  <200101172215.f0HMF7w59249@netrinsics.com>

next in thread | raw e-mail | index | archive | help
I have a Dell 5000e running -CURRENT (late December vintage).  I can 
suspend/resume mostly ok (X requires switching to a text console first, or
it gets confused).

The big problem is that the sound driver doesn't work (no sound at all) after
a suspend/resume cycle.  From <sys/soundcard.h> I found this ioctl:

  #define SNDCTL_DSP_RESET        _IO  ('P', 0)

And I wrote this short program:

#include <stdio.h>
#include <fcntl.h>
#include <sys/soundcard.h>

main(int argc, char **argv) {
    int file, err;

    file = open("/dev/dsp", O_WRONLY);
    if (file < 0) {
        perror("file error");
    }
    err = ioctl(file, SNDCTL_DSP_RESET, 0);
    if (err) {
        perror("ioctl error");
    }
}

If I run this program after resuming, instead of complete silence, I get
nasty static noise from any program that uses audio.  So, this has an effect,
but it is not restoring the audio to a "freshly booted" state.  Short of 
hacking up the drivers, does anyone have any suggestions?

	-Michael Robinson




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101172215.f0HMF7w59249>