[alsa-devel] snd_device_register / snd_device_disconnect
barratis at gmail.com
Tue May 15 00:07:41 CEST 2012
I have a virtual card with pcm which can temporarily go offline, I
wanted a way to prevent the user seeing them until they come back
online without having to destroy/recreate the pcm everytime. Since
there was a disconnect call separate from the free, I thought this was
meant to be possible.
I guess I'll simply destroy/recreate my pcms then.
Thanks for your answer.
On Tue, May 15, 2012 at 1:03 AM, Takashi Iwai <tiwai at suse.de> wrote:
> At Mon, 14 May 2012 08:23:47 +1000,
> Barratis wrote:
>> Hi All,
>> I would have a question regarding the behavior of snd_device_register.
>> Currently, the register operation will only be carried out if the
>> state is SNDRV_DEV_BUILD. This effectively prevents device which have
>> been disconnected via snd_device_disconnect (and thus having the state
>> SNDRV_DEV_DISCONNECTED) to be registered again.
>> Is this a wanted behavior? If so, I can't seem to find a reason for
>> this as per my testing and code reading registering a device in
>> DISCONNECTED sate works just fine.
> The disconnected device is disconnected. Why it must be registered
> again? In other words, the disconnected device should be freed
> eventually later. The disconnected state is an intermediate state,
> thus it's never a state ready for any use.
Any society that would give up a little liberty to gain a little
security will deserve neither and lose both. (Benjamin Franklin)
More information about the Alsa-devel