diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2016-02-20 16:18:56 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-02-20 15:45:15 +0100 |
commit | 14a37ac1bf8a2ba9b19032195c371c7b0857ca87 (patch) | |
tree | e1673eef6a4a96767b06782aae13932a4130f701 /sound/firewire/bebob/bebob.h | |
parent | 3184270ec188a70df555ab08bca70c0e61704205 (diff) |
ALSA: bebob: simplify bus-reset handling
At bus-reset, DM1000/DM1100/DM1500 chipsets transfer packets with
discontinuous value in 'dbc' field of CIP header. In this case, packet
streaming layer in firewire-lib module stops streaming and set XRUN to PCM
substream.
In ALSA, PCM applications are notified the XRUN status by the return value
of ALSA PCM interface. They can recover this state by executing
snd_pcm_prepare(), then PCM drivers' prepare handler is called, and start
new PCM substream. For ALSA BeBoB driver, the handler establishes new
connections and start new AMDTP streaming.
Unfortunately, neither the PCM applications nor the driver know the reason
of XRUN. The driver gets to know the reason when update handler is called
by IEEE 1394 bus driver. As long as I tested, the order of below events are
not fixed:
* Detecting packet discontinuity in tasklet context of OHCI 1394 driver
* Calling prepare handler in process context of ALSA PCM application
* Calling update handler in kthread context of IEEE 1394 bus driver
The unpredictable order is disadvantage for the driver to be compliant to
CMP. In IEC 61883-1, new CMP establish operations should be done 1 sec
(isoc_resource_delay) after bus-reset. Within 1 sec, CMP restore
operations are allowed. For this reason, in former commit ('b6bc812327aa:
ALSA: bebob/firewire-lib: Add a quirk for discontinuity at bus reset'),
the process context is forced to wait for executing update handler. The
process context wait for bus-reset up to 1 sec. This commit solves the
issue, while causes more disadvantages. For PCM applications, calling
snd_pcm_prepare() for recovering XRUN state takes more time and the driver
got a bit complicated code, while the recovery is not always successful.
As long as I tested, DM1000/DM1100/DM1500 and BeBoB firmware can allow
drivers to establish new connections just after bus reset. Furthermore,
any FCP transactions are handled correctly. Therefore, the driver don't
need to wait for bus reset handler for starting new streaming.
This commit removes the codes to reduce maintenance cost.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob.h')
-rw-r--r-- | sound/firewire/bebob/bebob.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h index 4d8fcc78e747..c2e885c06473 100644 --- a/sound/firewire/bebob/bebob.h +++ b/sound/firewire/bebob/bebob.h @@ -88,8 +88,6 @@ struct snd_bebob { unsigned int midi_input_ports; unsigned int midi_output_ports; - /* for bus reset quirk */ - struct completion bus_reset; bool connected; struct amdtp_stream *master; |