예제 #1
0
/* Stops everything and turns off the DSP. All pipes should be already
stopped and unallocated. */
static int rest_in_peace(struct echoaudio *chip)
{

	/* Stops all active pipes (just to be sure) */
	stop_transport(chip, chip->active_mask);

	set_meters_on(chip, false);

#ifdef ECHOCARD_HAS_MIDI
	enable_midi_input(chip, false);
#endif

	/* Go to sleep */
	if (chip->dsp_code) {
		/* Make load_firmware do a complete reload */
		chip->dsp_code = NULL;
		/* Put the DSP to sleep */
		return send_vector(chip, DSP_VC_GO_COMATOSE);
	}
	return 0;
}
static int rest_in_peace(struct echoaudio *chip)
{
	DE_ACT(("rest_in_peace() open=%x\n", chip->pipe_alloc_mask));

	/*                                          */
	stop_transport(chip, chip->active_mask);

	set_meters_on(chip, FALSE);

#ifdef ECHOCARD_HAS_MIDI
	enable_midi_input(chip, FALSE);
#endif

	/*             */
	if (chip->dsp_code) {
		/*                                         */
		chip->dsp_code = NULL;
		/*                      */
		return send_vector(chip, DSP_VC_GO_COMATOSE);
	}
	return 0;
}