]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 27 Nov 2018 07:35:34 +0000 (07:35 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 28 Nov 2018 09:56:45 +0000 (09:56 +0000)
commitfec6c4bcc5f330c44f7f5e2653daa1e6248a0be1
tree8c155be4f878f6687a23842595591719f058cc19
parent9c88a63b4373937464ded2ef9bf8016ffee5dac1
ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()

Current rsnd dvc.c is using flags to avoid duplicating register for
MIXer case. OTOH, commit 58fac06df9c8 ("ASoC: core: add support to card
rebind") allows to rebind sound card without rebinding all drivers.

Because of above patch and dvc.c flags, it can't re-register kctrl if
only sound card was rebinded, because dvc is keeping old flags.
(Of course it will be no problem if rsnd driver also be rebinded,
but it is not purpose of above patch).

This patch checks current card registered kctrl when registering.
In MIXer case, it can avoid duplicate register if card already has same
kctrl. In rebind case, it can re-register kctrl because card registered
kctl had been removed when unbinding.

This patch is updated version of commit 1bbfe4dfd2da4 ("ASoC: rsnd: DVC
kctrl sets once")

Reported-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/dvc.c