]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Don't call register and disconnect callbacks for internal PCM
authorTakashi Iwai <tiwai@suse.de>
Tue, 17 Oct 2017 09:40:55 +0000 (11:40 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 18 Oct 2017 06:05:34 +0000 (08:05 +0200)
commit82d8a429a48235828df56b81051d295f36a63a54
tree9c5086d46981ca7a5524237068b71d63154ffcc7
parent0190834d0e031312dc3f5300491670bef229d265
ALSA: pcm: Don't call register and disconnect callbacks for internal PCM

The internal PCM (aka DPCM backend PCM) doesn't need any registration
procedure, thus currently we bail out immediately at dev_register
callback.  Similarly, its counterpart, dev_disconnect callback, is
superfluous for the internal PCM.  For simplifying and avoiding the
conflicting disconnect call for internal PCM objects, this patch drops
dev_register and dev_disconnect callbacks for the internal ops.

The only uncertain thing by this action is whether skipping the PCM
state change to SNDRV_PCM_STATE_DISCONNECT for the internal PCM is
mandatory.  Looking through the current implementations, this doesn't
look so, hence dropping the whole dev_disconnect would make more
sense.

Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm.c