static void
snd_bebob_update(struct fw_unit *unit)
{
	struct snd_bebob *bebob = dev_get_drvdata(&unit->device);

	/* this is for firmware bootloader */
	if (bebob == NULL)
		goto end;

	fcp_bus_reset(bebob->unit);

	/* bus reset for isochronous transmit stream */
	if (cmp_connection_update(&bebob->in_conn) < 0) {
		amdtp_stream_pcm_abort(&bebob->tx_stream);
		mutex_lock(&bebob->mutex);
		snd_bebob_stream_stop(bebob, &bebob->tx_stream);
		mutex_unlock(&bebob->mutex);
	}
	amdtp_stream_update(&bebob->tx_stream);

	/* bus reset for isochronous receive stream */
	if (cmp_connection_update(&bebob->out_conn) < 0) {
		amdtp_stream_pcm_abort(&bebob->rx_stream);
		mutex_lock(&bebob->mutex);
		snd_bebob_stream_stop(bebob, &bebob->rx_stream);
		mutex_unlock(&bebob->mutex);
	}
	amdtp_stream_update(&bebob->rx_stream);

end:
	return;
}
Exemple #2
0
void snd_efw_stream_update_duplex(struct snd_efw *efw)
{
	if ((cmp_connection_update(&efw->out_conn) < 0) ||
	    (cmp_connection_update(&efw->in_conn) < 0)) {
		mutex_lock(&efw->mutex);
		stop_stream(efw, &efw->rx_stream);
		stop_stream(efw, &efw->tx_stream);
		mutex_unlock(&efw->mutex);
	} else {
		amdtp_stream_update(&efw->rx_stream);
		amdtp_stream_update(&efw->tx_stream);
	}
}
void snd_oxfw_stream_update_simplex(struct snd_oxfw *oxfw)
{
	if (cmp_connection_update(&oxfw->in_conn) < 0)
		stop_stream(oxfw);
	else
		amdtp_stream_update(&oxfw->rx_stream);
}
Exemple #4
0
void snd_oxfw_stream_update_simplex(struct snd_oxfw *oxfw,
				    struct amdtp_stream *stream)
{
	struct cmp_connection *conn;

	if (stream == &oxfw->tx_stream)
		conn = &oxfw->out_conn;
	else
		conn = &oxfw->in_conn;

	if (cmp_connection_update(conn) < 0)
		stop_stream(oxfw, stream);
	else
		amdtp_stream_update(stream);
}