AnsweredAssumed Answered

Zedboard ADAU1761 audio playing not working   (changed with three adau1761 chips )

Question asked by nightwind on Jul 24, 2018
Latest reply on Jul 25, 2018 by nightwind

I have been trying to verify audio capture and playback functionality (using ADAU1761 codec and NOT HDMI) for the past few days.

So far I could get the board to play audio files and  audio capture on zedboard,it works well.

But I need to add 2 ADAU1761 chips, a total of three ADAU1761 chips. When I use 3 chips, there is no sound playing with aplay commond.  Thanks for taking time to read. Any help will be highly appreciated.

 

The pl device tree is as follows:

 

/ {
   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>;
                                 };
                  };
};

The loading record is as follows:

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

 

I configure the card 0 with adau1761.state file:

alsactl restore -c 0 -f adau1761.state

Then I use aplay to play the file of Front_Center.wav with command(aplay Front_Center.wav)  , it doesn't have a sound.

root@3adau1761_project:/# aplay Front_Center.wav
Playing WAVE 'Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

 

But  I just load a single adau1761 chip driver, the playback and recording are normal.

 

Any help will be highly appreciated.

 

larsc

Attachments

Outcomes