re-add kernel 5.13, mask 5.14
This commit is contained in:
parent
a797d4d382
commit
97e8425444
50 changed files with 18028 additions and 28 deletions
|
@ -1,60 +0,0 @@
|
|||
diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
|
||||
index c506c9305..41a08b320 100644
|
||||
--- a/sound/soc/codecs/rt5651.c
|
||||
+++ b/sound/soc/codecs/rt5651.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <sound/initval.h>
|
||||
#include <sound/tlv.h>
|
||||
#include <sound/jack.h>
|
||||
+#include <linux/clk.h>
|
||||
|
||||
#include "rl6231.h"
|
||||
#include "rt5651.h"
|
||||
@@ -1511,6 +1512,7 @@ static int rt5651_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source,
|
||||
static int rt5651_set_bias_level(struct snd_soc_component *component,
|
||||
enum snd_soc_bias_level level)
|
||||
{
|
||||
+ struct rt5651_priv *rt5651 = snd_soc_component_get_drvdata(component);
|
||||
switch (level) {
|
||||
case SND_SOC_BIAS_PREPARE:
|
||||
if (SND_SOC_BIAS_STANDBY == snd_soc_component_get_bias_level(component)) {
|
||||
@@ -1518,6 +1520,13 @@ static int rt5651_set_bias_level(struct snd_soc_component *component,
|
||||
snd_soc_component_update_bits(component, RT5651_D_MISC,
|
||||
0xc00, 0xc00);
|
||||
}
|
||||
+ if (!IS_ERR(rt5651->mclk)){
|
||||
+ if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_ON) {
|
||||
+ clk_disable_unprepare(rt5651->mclk);
|
||||
+ } else {
|
||||
+ clk_prepare_enable(rt5651->mclk);
|
||||
+ }
|
||||
+ }
|
||||
break;
|
||||
case SND_SOC_BIAS_STANDBY:
|
||||
if (SND_SOC_BIAS_OFF == snd_soc_component_get_bias_level(component)) {
|
||||
@@ -2059,6 +2068,13 @@ static int rt5651_probe(struct snd_soc_component *component)
|
||||
{
|
||||
struct rt5651_priv *rt5651 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
+ /* Check if MCLK provided */
|
||||
+ rt5651->mclk = devm_clk_get(component->dev, "mclk");
|
||||
+ if (PTR_ERR(rt5651->mclk) == -EPROBE_DEFER){
|
||||
+ dev_err(component->dev, "unable to get mclk\n");
|
||||
+ return -EPROBE_DEFER;
|
||||
+ }
|
||||
+
|
||||
rt5651->component = component;
|
||||
|
||||
snd_soc_component_update_bits(component, RT5651_PWR_ANLG1,
|
||||
diff --git a/sound/soc/codecs/rt5651.h b/sound/soc/codecs/rt5651.h
|
||||
index 20c33a3ec..17524fa9f 100644
|
||||
--- a/sound/soc/codecs/rt5651.h
|
||||
+++ b/sound/soc/codecs/rt5651.h
|
||||
@@ -2097,6 +2097,7 @@ struct rt5651_priv {
|
||||
|
||||
int dmic_en;
|
||||
bool hp_mute;
|
||||
+ struct clk *mclk;
|
||||
};
|
||||
|
||||
#endif /* __RT5651_H__ */
|
Loading…
Add table
Add a link
Reference in a new issue