已回答假定已回答

Zedboard ADAU1761 播放声音没有声音(使用三个adau1761芯片)

nightwind 在 2018-7-24 詢問的問題
最後回覆由HenryL於2018-8-7提供

各位好,我在zedboard板上加载驱动后,可以正常播放和录音。

但是我需要增加2个adau1761芯片,共三个adau1761 芯片,修改了设备树,加载驱动,用aplay播放不出声音。各位帮忙看看,十分感谢!

 

看资料好像给pl用的dma就4个通道,所以第一个adau1761配的dma 0和dma1,第二个adau1761配的dma2,第三个adau1761配的dma3。

设备树如下:

/ {

   amba_pl: amba_pl {

      #address-cells = <1>;

      #size-cells = <1>;

      compatible = "simple-bus";

      ranges ;

          axi_i2s_adi_0: axi_i2s_adi@43c00000 {

                  compatible = "xlnx,axi-i2s-adi-1.0";

                   reg = <0x43c00000 0x10000>;

         };

         axi_i2s_adi_1: axi_i2s_adi@43c10000 {

                  compatible = "xlnx,axi-i2s-adi-1.0";

                   reg = <0x43c10000 0x10000>;

            };

         axi_i2s_adi_2: axi_i2s_adi@43c20000 {

                     compatible = "xlnx,axi-i2s-adi-1.0";

                     reg = <0x43c20000 0x10000>;

            };

         axi_iic_0: i2c@41600000 {

                     #address-cells = <1>;

                     #size-cells = <0>;

                     compatible = "xlnx,xps-iic-2.00.a";

                     interrupt-parent = <&intc>;

                     interrupts = <0 29 4>;

                     reg = <0x41600000 0x10000>;

 

                     adau1761_0: adau1761_0@3b {

                              compatible = "adi,adau1761";

                              reg = <0x3b>;

                        };

            };

            axi_iic_1: i2c@41610000 {

                        #address-cells = <1>;

                        #size-cells = <0>;

                        compatible = "xlnx,xps-iic-2.00.a";

                        interrupt-parent = <&intc>;

                          interrupts = <0 30 4>;

                        reg = <0x41610000 0x10000>;

 

                        adau1761_1: adau1761_1@3b {

                                 compatible = "adi,adau1761";

                                 reg = <0x3b>;

                           };

                  };

                  axi_iic_2: i2c@41620000 {

                           #address-cells = <1>;

                           #size-cells = <0>;

                            compatible = "xlnx,xps-iic-2.00.a";

                           interrupt-parent = <&intc>;

                           interrupts = <0 31 4>;

                           reg = <0x41620000 0x10000>;

 

                           adau1761_2: adau1761_2@3b {

                                    compatible = "adi,adau1761";

                                      reg = <0x3b>;

                              };

                      };

                     audio_clock: audio_clock {

                                 compatible = "fixed-clock";

                                 #clock-cells = <0>;

                                 clock-frequency = <12288000>;

                        };

                     axi_i2s_0: axi-i2s@0x43c00000 {

                                 compatible = "adi,axi-i2s-1.00.a";

                                 reg = <0x43c00000 0x1000>;

                                 dmas = <&dmac_s 0 &dmac_s 1>;

                                 dma-names = "tx", "rx";

                                 clocks = <&clkc 15>, <&audio_clock>;

                                 clock-names = "axi", "ref";

                        };

                        axi_i2s_1: axi-i2s@0x43c10000 {

                                 compatible = "adi,axi-i2s-1.00.a";

                                  reg = <0x43c10000 0x1000>;

                                 dmas = <&dmac_s 2>;

                                   dma-names = "rx";

                                    clocks = <&clkc 15>, <&audio_clock>;

                                    clock-names = "axi", "ref";

                           };

                           axi_i2s_2: axi-i2s@0x43c20000 {

                                    compatible = "adi,axi-i2s-1.00.a";

                                    reg = <0x43c20000 0x1000>;

                                    dmas = <&dmac_s 3>;

                                    dma-names = "rx";

                                    clocks = <&clkc 15>, <&audio_clock>;

                                    clock-names = "axi", "ref";

                           };

                           zed_sound_0: zed_sound_0 {

                                    compatible = "digilent,zed-sound";

                                      audio-codec = <&adau1761_0>;

                                      cpu-dai = <&axi_i2s_0>;

                                 };

                           zed_sound_1: zed_sound_1 {

                                    compatible = "digilent,zed-sound";

                                    audio-codec = <&adau1761_1>;

                                    cpu-dai = <&axi_i2s_1>;

                               };

                              zed_sound_2: zed_sound_2 {

                                       compatible = "digilent,zed-sound";

                                       audio-codec = <&adau1761_2>;

                                        cpu-dai = <&axi_i2s_2>;

                                 };

                  };

};

 

加载也可以正常打印3个设备:

ALSA device list:

#0: ZED ADAU1761

#1: ZED ADAU1761

#2: ZED ADAU1761

 

root@3adau1761_project:/# aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: ADAU1761 [ZED ADAU1761], device 0: adau1761 adau-hifi-0 []

Subdevices: 1/1

Subdevice #0: subdevice #0

card 1: ADAU1761_1 [ZED ADAU1761], device 0: adau1761 adau-hifi-0 []

Subdevices: 1/1

Subdevice #0: subdevice #0

card 2: ADAU1761_2 [ZED ADAU1761], device 0: adau1761 adau-hifi-0 []

Subdevices: 1/1

Subdevice #0: subdevice #0

 

配置card 0:   alsactl restore -c 0 -f adau1761.state

 

root@3adau1761_project:/# aplay Front_Center.wav

Playing WAVE 'Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

但是没有声音。

我按照这个ADAU1361 Sound CODEC Linux Driver [Analog Devices Wiki] 配置也不行,还是没声音。:enable the “Left Playback Mixer Left DAC”, “Right Playback Mixer Right DAC” and the “Headphone Playback” switches and set the “DAC Playback Mux” to “AIFIN

 

 

我正常加载一个adau1761驱动,播放声音和录音都正常的,加三个驱动,同样去配置,用第一个adau1761播放就不出声音了,汗!卡了好几天了,木有头绪!!!!@

附件

結果