mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
ASoC: set bias_level at if
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: ASoC has 2 functions to set bias level. (A) snd_soc_dapm_force_bias_level() (B) snd_soc_dapm_set_bias_level() (A) sets dapm->bias_level, but (B) is not. I think we should set it on both (A) and (B). I think it is miss or bug, but Samsung is the only vendor that feels a problem about this. I think this patch (= [1/5]) is correct approach, but some non-samsung vendor might get affect from this patch-set, so I added [RFC] on this patch-set. Furthermore, (B) cares both Card and Component, (A) cares Component only. I guess it is the reason why it is called as "force" bias_level function. (A) is used from each drivers, (B) is used from soc-dapm only. I'm not 100% sure though, except special cases, each driver should use (B), I guess ?
This commit is contained in:
commit
5f120ccf28
|
|
@ -133,8 +133,6 @@ static int bells_set_bias_level_post(struct snd_soc_card *card,
|
|||
break;
|
||||
}
|
||||
|
||||
dapm->bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,6 @@ static int littlemill_set_bias_level_post(struct snd_soc_card *card,
|
|||
break;
|
||||
}
|
||||
|
||||
dapm->bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,8 +90,6 @@ static int speyside_set_bias_level_post(struct snd_soc_card *card,
|
|||
break;
|
||||
}
|
||||
|
||||
card->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,6 @@ static int tobermory_set_bias_level_post(struct snd_soc_card *card,
|
|||
break;
|
||||
}
|
||||
|
||||
dapm->bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1030,6 +1030,10 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
|
|||
out:
|
||||
trace_snd_soc_bias_level_done(dapm, level);
|
||||
|
||||
/* success */
|
||||
if (ret == 0)
|
||||
snd_soc_dapm_init_bias_level(dapm, level);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user