[alsa-devel] [PATCH 0/4] ALSA: firewire: block .remove callback of bus
Takashi Iwai
tiwai at suse.de
Wed Oct 10 09:04:59 CEST 2018
On Wed, 10 Oct 2018 08:34:58 +0200,
Takashi Sakamoto wrote:
>
> Hi,
>
> In a discussion for devres support[1], I realize difference of unbind
> behaviour of drivers in ALSA firewire stack and in the others. For
> consistency behaviour inner the same subsystem for users, it's better
> to imitate the behaviour.
>
> Additionally, blocking .remove function simplifies codes to releasing
> device.
>
> This commit uses 'snd_card_free()' instead of
> 'snd_card_free_when_closed()' in .remove function and performs
> refactoring for release codes.
Would the hot-unplug behavior change with this patch?
For most of other drivers (but for USB), the actual hot-plug/unplug
are unlikely scenario, hence blocking makes sense to assure the safety
unbind. (Yes, there is also PCI hotplug, but an audio device is
rarely used there.)
But, FireWire is a beast to be plugged / unplugged more often, so the
hot-unplug behavior change is more important to users.
thanks,
Takashi
>
> [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-September/140431.html
>
> Takashi Sakamoto (4):
> ALSA: firewire: block .remove callback of bus driver till all of ALSA
> character devices are released
> ALSA: firewire: release reference count of firewire unit in .remove
> callback of bus driver
> ALSA: bebob/fireworks: simplify handling of local device entry table
> ALSA: firewire: simplify cleanup process when failing to register
> sound card
>
> sound/firewire/bebob/bebob.c | 43 ++++++---------------
> sound/firewire/dice/dice.c | 35 ++++-------------
> sound/firewire/digi00x/digi00x.c | 28 +++++---------
> sound/firewire/fireface/ff.c | 28 +++++---------
> sound/firewire/fireworks/fireworks.c | 56 ++++++++--------------------
> sound/firewire/isight.c | 8 ++--
> sound/firewire/motu/motu.c | 39 +++++--------------
> sound/firewire/oxfw/oxfw.c | 39 +++++--------------
> sound/firewire/tascam/tascam.c | 32 +++++-----------
> 9 files changed, 90 insertions(+), 218 deletions(-)
>
> --
> 2.19.0
>
More information about the Alsa-devel
mailing list