ALSA: firewire-digi00x: update isochronous resources when starting packet streaming after bus-reset
After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to transfer isochronous packet should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA fireface driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
ae8ffbb265
commit
24bb77b3ff
@ -303,6 +303,7 @@ void snd_dg00x_stream_release_duplex(struct snd_dg00x *dg00x)
|
||||
|
||||
int snd_dg00x_stream_start_duplex(struct snd_dg00x *dg00x)
|
||||
{
|
||||
unsigned int generation = dg00x->rx_resources.generation;
|
||||
int err = 0;
|
||||
|
||||
if (dg00x->substreams_counter == 0)
|
||||
@ -312,6 +313,16 @@ int snd_dg00x_stream_start_duplex(struct snd_dg00x *dg00x)
|
||||
amdtp_streaming_error(&dg00x->rx_stream))
|
||||
finish_session(dg00x);
|
||||
|
||||
if (generation != fw_parent_device(dg00x->unit)->card->generation) {
|
||||
err = fw_iso_resources_update(&dg00x->tx_resources);
|
||||
if (err < 0)
|
||||
goto error;
|
||||
|
||||
err = fw_iso_resources_update(&dg00x->rx_resources);
|
||||
if (err < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/*
|
||||
* No packets are transmitted without receiving packets, reagardless of
|
||||
* which source of clock is used.
|
||||
|
Loading…
Reference in New Issue
Block a user