我是靠谱客的博主 拼搏小馒头,最近开发中收集的这篇文章主要介绍rk3399 android 11 audio rt5651调试,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

功能:rt5651遇到无法录音的问题,分析及解决。

1.cat /proc/asound/cards 可以产看是否有注册上声卡。

2.tinycap 直接录音看是否有声音,如果没有声音就是驱动问题。

3.录音的时候命令tinymix查看通路

4.最终的分析是没有micbias1电压

5.查看寄存器,设置寄存器cat /sys/kernel/debug/regmap/

diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index 89f332a..1d560c8 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -833,7 +833,6 @@ static int rt5651_bst1_event(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *kcontrol, int event)
 {
        struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
-
        switch (event) {
        case SND_SOC_DAPM_POST_PMU:
                snd_soc_component_update_bits(component, RT5651_PWR_ANLG2,
@@ -856,7 +855,6 @@ static int rt5651_bst2_event(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *kcontrol, int event)
 {
        struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
-
        switch (event) {
        case SND_SOC_DAPM_POST_PMU:
                snd_soc_component_update_bits(component, RT5651_PWR_ANLG2,
@@ -879,7 +877,6 @@ static int rt5651_bst3_event(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *kcontrol, int event)
 {
        struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
-
        switch (event) {
        case SND_SOC_DAPM_POST_PMU:
                snd_soc_component_update_bits(component, RT5651_PWR_ANLG2,
@@ -911,6 +908,8 @@ static const struct snd_soc_dapm_widget rt5651_dapm_widgets[] = {
        SND_SOC_DAPM_SUPPLY_S("ADC ASRC", 1, RT5651_PLL_MODE_2,
                              11, 0, NULL, 0),
 
+       SND_SOC_DAPM_SUPPLY("PLL1", RT5651_PWR_ANLG2,
+                       RT5651_PWR_PLL_BIT, 0, NULL, 0),
        /* micbias */
        SND_SOC_DAPM_SUPPLY("LDO", RT5651_PWR_ANLG1,
                        RT5651_PWR_LDO_BIT, 0, NULL, 0),
@@ -1135,6 +1134,10 @@ static const struct snd_soc_dapm_route rt5651_dapm_routes[] = {
        {"IN2P", NULL, "LDO"},
        {"IN3P", NULL, "LDO"},
 
+       {"BST1", NULL, "micbias1"},
+       {"BST2", NULL, "micbias1"},
+       {"BST3", NULL, "micbias1"},
+
        {"IN1P", NULL, "MIC1"},
        {"IN2P", NULL, "MIC2"},
        {"IN2N", NULL, "MIC2"},
@@ -1560,7 +1563,6 @@ 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)) {
@@ -1582,6 +1584,10 @@ static int rt5651_set_bias_level(struct snd_soc_component *component,
                        snd_soc_component_update_bits(component, RT5651_PWR_ANLG1,
                                RT5651_PWR_FV1 | RT5651_PWR_FV2,
                                RT5651_PWR_FV1 | RT5651_PWR_FV2);
+                          snd_soc_component_update_bits(component, RT5651_PWR_ANLG1,
+                                RT5651_PWR_LDO_DVO_MASK,
+                                RT5651_PWR_LDO_DVO_1_2V);
+
                        snd_soc_component_update_bits(component, RT5651_D_MISC, 0x1, 0x1);
                } else if (SND_SOC_BIAS_PREPARE == snd_soc_component_get_bias_level(component)) {
                        if (!IS_ERR(rt5651->mclk))
@@ -1604,6 +1610,7 @@ static int rt5651_set_bias_level(struct snd_soc_component *component,
                break;
 
        default:
+
                break;
        }

最后

以上就是拼搏小馒头为你收集整理的rk3399 android 11 audio rt5651调试的全部内容,希望文章能够帮你解决rk3399 android 11 audio rt5651调试所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(56)

评论列表共有 0 条评论

立即
投稿
返回
顶部