/* pcm_shutdown undoes what pcm_setup did. Also sets the ports' swstate to newstate.  */
static void pcm_shutdown(vwsnd_dev_t *devc, vwsnd_port_t *rport, vwsnd_port_t *wport)
/* pcm_shutdown undoes what pcm_setup did. Also sets the ports' swstate to newstate.  */
static void pcm_shutdown(vwsnd_dev_t *devc, vwsnd_port_t *rport, vwsnd_port_t *wport)
{
	DBGEV("(devc=0x%p, rport=0x%p, wport=0x%p)\n", devc, rport, wport);
	if (rport && rport->swbuf) {
		DBGPV("shutting down rport\n");
		pcm_shutdown_port(devc, rport, READ_INTR_MASK);
	}
	if (wport && wport->swbuf) {
		DBGPV("shutting down wport\n");
		pcm_shutdown_port(devc, wport, WRITE_INTR_MASK);
	}
	DBGRV();
}