]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:15 +0000 (14:22 -0300)
commit8fff1853b1ec99df378291ceaa072ecf02314494
treefb43b33feacc583bb7a35ba5cd7b6751943d6fe3
parentcfa5060ffc8f1e49d560dfcb0b6c3a5de9c89c0f
ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()

BugLink: https://bugs.launchpad.net/bugs/1857158
[ Upstream commit 9c698e8481a15237a5b1db5f8391dd66d59e42a4 ]

Current rsnd dvc.c is using flags to avoid duplicating register for
MIXer case. OTOH, commit e894efef9ac7 ("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 b918f1bc7f1ce ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
sound/soc/sh/rcar/core.c