[alsa-devel] [PATCH 18/44] fireworks: Add connection and stream management

Clemens Ladisch clemens at ladisch.de
Fri Apr 4 17:05:06 CEST 2014

Takashi Sakamoto wrote:
> (Apr 04 2014 05:56), Clemens Ladisch wrote:
>> Takashi Sakamoto wrote:
>>> +++ b/sound/firewire/fireworks/fireworks.c
>>> +static int
>>> +init_stream(struct snd_efw *efw, struct amdtp_stream *stream)
>>> +{
>>> +    ...
>>> +    err = amdtp_stream_init(stream, efw->unit, s_dir, CIP_BLOCKING);
>> amdtp_stream_destroy() must be called.
> For me, there is an ambiguous on what you said. Must it be called before
> calling amdtp_stream_init() or in a case that the function returns error?

It must be called when the driver is disconnected normally (I guess in
snd_efw_stream_destroy_duplex), or when driver amdtp_stream_init() has
succeeded but driver loading aborts due to some other error.

> is it due to reference counter of firewire unit? (fw_unit_get/put)

Yes, and any other resources it might have allocated.


More information about the Alsa-devel mailing list