diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2016-03-31 08:47:08 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-03-31 15:36:20 +0200 |
commit | 86c8dd7f4da3fb3f92fc5ab5144c971639d39745 (patch) | |
tree | 2f6b61bd721eedf7a945412efb4e7b499148f2b0 /sound/firewire/digi00x/digi00x-transaction.c | |
parent | 6c29230e2a5ff84df2b1358681414bad3e4bd220 (diff) |
ALSA: firewire-digi00x: delayed registration of sound card
When some digi00x units are connected sequentially, userspace
applications are involved at bus-reset state on IEEE 1394 bus. In the
state, any communications can be canceled. Therefore, sound card
registration should be delayed till the bus gets calm.
This commit achieves it.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/digi00x/digi00x-transaction.c')
-rw-r--r-- | sound/firewire/digi00x/digi00x-transaction.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/firewire/digi00x/digi00x-transaction.c b/sound/firewire/digi00x/digi00x-transaction.c index 554324d8c602..735d35640807 100644 --- a/sound/firewire/digi00x/digi00x-transaction.c +++ b/sound/firewire/digi00x/digi00x-transaction.c @@ -126,12 +126,17 @@ int snd_dg00x_transaction_register(struct snd_dg00x *dg00x) return err; error: fw_core_remove_address_handler(&dg00x->async_handler); - dg00x->async_handler.address_callback = NULL; + dg00x->async_handler.callback_data = NULL; return err; } void snd_dg00x_transaction_unregister(struct snd_dg00x *dg00x) { + if (dg00x->async_handler.callback_data == NULL) + return; + snd_fw_async_midi_port_destroy(&dg00x->out_control); fw_core_remove_address_handler(&dg00x->async_handler); + + dg00x->async_handler.callback_data = NULL; } |