嵌入式爱好者

查看: 47098|回复: 5

[Linux] wm8960挂载在I2C1上正常,挂载在I2C2上匹配不了驱动,wm8960.cz中probe未执行

[复制链接]

1

主题

3

帖子

28

积分

i.MX6Q通行证

扫一扫,手机访问本帖
发表于 2020-4-16 14:33:42 | 显示全部楼层 |阅读模式
我用的是IMX6Q+linux4.1.15内核版本,在设备树文件imx6qdl-sabresd.dtsi 中做修改, wm8960挂载在I2C1上工作正常,挂载在I2C2上匹配不了驱动,wm8960.c中probe未执行,请帮忙分析下原因,谢谢
回复

使用道具 举报

0

主题

1173

帖子

2202

积分

发表于 2020-4-16 14:50:13 | 显示全部楼层
检查一下使用的i2c2的引脚是否有其他复用,是否有其他驱动

点评

你好,我们现在单独在I2C1上挂载WM8960可以正常工作,单独在I2C2上挂载WM8960也可以工作。但是如果在设备树同时添加两路WM8960的话,两路声卡均不能工作了,打印的log如下,还请帮忙分析下原因,谢谢。 [ 3.1291  详情 回复 发表于 2020-4-22 10:27
点评回复 支持 反对

使用道具 举报

1

主题

3

帖子

28

积分

i.MX6Q通行证

 楼主| 发表于 2020-4-22 10:27:11 | 显示全部楼层
zhichao 发表于 2020-4-16 14:50
检查一下使用的i2c2的引脚是否有其他复用,是否有其他驱动

你好,我们现在单独在I2C1上挂载WM8960可以正常工作,单独在I2C2上挂载WM8960也可以工作。但是如果在设备树同时添加两路WM8960的话,两路声卡均不能工作了,打印的log如下,还请帮忙分析下原因,谢谢。
[    3.129137] wm8960_probe:running...
[    3.132723] wm8960_probe:device name =1-001a
[    3.140748] imx-wm8960 sound@1: wm8960-hifi <-> 202c000.ssi mapping ok
[    3.152121] imx-wm8960 sound@1: snd-soc-dummy-dai <-> 2034000.asrc mapping ok
[    3.159403] imx-wm8960 sound@1: wm8960-hifi <-> 202c000.ssi mapping ok
[    3.277014] soc_init_card_debugfs:card->name=wm8960-audio
[    3.282526] imx-wm8960 sound@2: ASoC: Failed to create card debugfs directory
[    3.289729] wm8960_probe:running...
[    3.293315] wm8960_probe:device name =0-001a
[    3.300767] imx-wm8960 sound@2: wm8960-hifi <-> 2028000.ssi mapping ok
[    3.310975] imx-wm8960 sound@2: snd-soc-dummy-dai <-> 2034000.asrc mapping ok
[    3.318269] imx-wm8960 sound@2: wm8960-hifi <-> 2028000.ssi mapping ok
[    3.324911] imx-wm8960 sound@2: ASoC: no AA widget found for ASRC-Playback
[    3.332150] imx-wm8960 sound@2: ASoC: Failed to add route ASRC-Playback -> direct -> CPU-Playback
[    3.341057] imx-wm8960 sound@2: ASoC: no sink widget found for ASRC-Capture
[    3.348047] imx-wm8960 sound@2: ASoC: Failed to add route CPU-Capture -> direct -> ASRC-Capture
点评回复 支持 反对

使用道具 举报

0

主题

1173

帖子

2202

积分

发表于 2020-4-22 13:31:42 | 显示全部楼层
目前WM8960输出一路用在耳机另一路用在音响,您看看是不是您设置两路声卡设置的不对,有冲突

点评

我们硬件电路上做了两路WM8960分别挂载了I2C1和I2C2上。刚才已经试过设备树中设置不同的model,名字不冲突了,但是看log中依然找不到audio-routing = 中的一些东西。以下是两路声卡的设备树以及打印的log &mx6  详情 回复 发表于 2020-4-22 13:42
点评回复 支持 反对

使用道具 举报

1

主题

3

帖子

28

积分

i.MX6Q通行证

 楼主| 发表于 2020-4-22 13:42:11 | 显示全部楼层
zhichao 发表于 2020-4-22 13:31
目前WM8960输出一路用在耳机另一路用在音响,您看看是不是您设置两路声卡设置的不对,有冲突

我们硬件电路上做了两路WM8960分别挂载了I2C1和I2C2上。刚才已经试过设备树中设置不同的model,名字不冲突了,但是看log中依然找不到audio-routing =    中的一些东西。以下是两路声卡的设备树以及打印的log

&mx6sound {
        compatible = "fsl,imx6q-sabresd-wm8960",
        "fsl,imx-audio-wm8960";
        model = "wm8960-audio";
        status="okay";
       
        audio-codec = <&codec2>;
        cpu-dai = <&ssi1>;
        mux-int-port = <1>;
        mux-ext-port = <3>;
       
        audio-routing =
        "Headphone Jack", "HP_L",
        "Headphone Jack", "HP_R",
        "Ext Spk", "SPK_RP",
        "Ext Spk", "SPK_RN",
        "Ext Spk", "SPK_LP",
        "Ext Spk", "SPK_LN",
        "AMIC", "MICB",
        "LINPUT1", "AMIC",
        "LINPUT2", "AMIC",
        "RINPUT1", "AMIC",
        "RINPUT2", "AMIC",
        "LINPUT3", "AMIC",
        "RINPUT3", "AMIC",
        "DMIC", "MICB",
        "LINPUT1", "DMIC",
        "LINPUT2", "DMIC",
        "RINPUT1", "DMIC",
        "RINPUT2", "DMIC",
        "CPU-Playback", "ASRC-Playback",
        "Playback", "CPU-Playback",
        "ASRC-Capture", "CPU-Capture",
        "CPU-Capture", "Capture";
        hp-det-gpios = <&gpio7 8 0>;
       

};


&mx6sound2 {
        compatible = "fsl,imx6q-sabresd-wm8960",
        "fsl,imx-audio-wm8960";
        model = "wm8960_2-audio";
        status="okay";
       
        audio-codec = <&codec3>;
        cpu-dai = <&ssi2>;
        mux-int-port = <2>;
        mux-ext-port = <4>;
       
       
        audio-routing =
        "Headphone Jack", "HP_L",
        "Headphone Jack", "HP_R",
        "Ext Spk", "SPK_RP",
        "Ext Spk", "SPK_RN",
        "Ext Spk", "SPK_LP",
        "Ext Spk", "SPK_LN",
        "AMIC", "MICB",
        "LINPUT1", "AMIC",
        "LINPUT2", "AMIC",
        "RINPUT1", "AMIC",
        "RINPUT2", "AMIC",
        "LINPUT3", "AMIC",
        "RINPUT3", "AMIC",
        "DMIC", "MICB",
        "LINPUT1", "DMIC",
        "LINPUT2", "DMIC",
        "RINPUT1", "DMIC",
        "RINPUT2", "DMIC",
        "CPU-Playback", "ASRC-Playback",
        "Playback", "CPU-Playback",
        "ASRC-Capture", "CPU-Capture",
        "CPU-Capture", "Capture";
        hp-det-gpios = <&gpio7 8 0>;
       

};



[    3.099207] wm8960_i2c_probe excuted
[    3.099207]
[    3.099207]
[    3.118430] fsl-asrc 2034000.asrc: driver registered
[    3.126094] fsl-hdmi-dai soc:hdmi_audio@00120000: failed to probe. Load HDMI-video first.
[    3.134320] fsl-hdmi-dai: probe of soc:hdmi_audio@00120000 failed with error -12
[    3.143608] soc_init_card_debugfs:card->name=wm8960-audio
[    3.149196] wm8960_probe:running...
[    3.152783] wm8960_probe:device name =0-001a
[    3.160834] imx-wm8960 sound@1: wm8960-hifi <-> 2028000.ssi mapping ok
[    3.172171] imx-wm8960 sound@1: snd-soc-dummy-dai <-> 2034000.asrc mapping ok
[    3.179467] imx-wm8960 sound@1: wm8960-hifi <-> 2028000.ssi mapping ok
[    3.297108] soc_init_card_debugfs:card->name=wm8960_2-audio
[    3.302893] wm8960_probe:running...
[    3.306517] wm8960_probe:device name =1-001a
[    3.313991] imx-wm8960 sound@2: wm8960-hifi <-> 202c000.ssi mapping ok
[    3.324210] imx-wm8960 sound@2: snd-soc-dummy-dai <-> 2034000.asrc mapping ok
[    3.331479] imx-wm8960 sound@2: wm8960-hifi <-> 202c000.ssi mapping ok
[    3.338125] imx-wm8960 sound@2: ASoC: no source widget found for ASRC-Playback
[    3.345381] imx-wm8960 sound@2: ASoC: Failed to add route ASRC-Playback -> direct -> CPU-Playback
[    3.354290] imx-wm8960 sound@2: ASoC: no sink widget found for ASRC-Capture
[    3.361264] imx-wm8960 sound@2: ASoC: Failed to add route CPU-Capture -> direct -> ASRC-Capture
点评回复 支持 反对

使用道具 举报

3

主题

10

帖子

33

积分

发表于 2020-11-6 12:35:38 | 显示全部楼层
楼主您好,我准备把wm8960移植到i2c2上,也遇到wm8960.c中probe未执行,应该是i2c2没有匹配上,请问下楼主是怎样解决的。我的内核是3.0.35版的,没有设备树
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-11-25 08:08

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表