mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
asoc: avoid adding global control in loopback probing twice
Add condition control to avoid mixer being added twice, to avoid kernel error printing. Change-Id: I832e4c08ac06fe885c1497bce4bd4ada96ef83fb Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
This commit is contained in:
parent
1f152bcd76
commit
88dba174c9
1 changed files with 6 additions and 2 deletions
|
|
@ -198,11 +198,15 @@ static struct snd_kcontrol_new msm_loopback_controls[] = {
|
|||
|
||||
static int msm_pcm_loopback_probe(struct snd_soc_component *component)
|
||||
{
|
||||
snd_soc_add_component_controls(component, msm_loopback_controls,
|
||||
ARRAY_SIZE(msm_loopback_controls));
|
||||
if (of_property_read_bool(component->dev->of_node,
|
||||
"qcom,msm-pcm-loopback")) {
|
||||
snd_soc_add_component_controls(component, msm_loopback_controls,
|
||||
ARRAY_SIZE(msm_loopback_controls));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pcm_loopback_set_volume(struct msm_pcm_loopback *prtd,
|
||||
uint32_t volume)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue