Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1583

Testing Audio Codec DA7213 in Hihope-RZG2H

$
0
0

Hi,

I am working on Codec DA7213 interface with RZG2H hihope Eval board.

I have Codec DA7213 EVK board, where I can access I2C and I2S lines.

please find the below Audio codec connection details.

We are using I2C0 of Hi-Hope EVK CN1801.15(I2C0_SCL) and CN1801.17(I2C0_SDA), this pin out is working.
I2S of Hi-Hope EVK, we have disconnected other circuit for I2S pin interface of Hi-Hope Board taken the I2S pin directly.
we removed Wi-Fi interface U2414 Chip on RZG2H board for our testing.
We have used the below pin to connect the Dialog EVK DA7218 with Hi-Hope RZ/G2H.

RZ/G2H CPU Pin AG34 { GP6_17/SSI_SCK78} is connected to DA7218 pin BCLK.

RZ/G2H CPU Pin AG33 { GP6_18/SSI_WS78} is connected to DA7218 pin LRCLK.

RZ/G2H CPU Pin AG31 {GP6_19/SSI_SDATA7} is connected to DA7218 pin DIN.

RZ/G2H CPU Pin AG30 {GP6_20/SSI_SDATA8} is connected to DA7218 pin SDOUT.


1. Added snd_rzg2h:sound
2. Added DA7213 in I2C0
3. Select Pins for SSI.

Please find below changes done in hihope-common.dtsi file.

snd_rzg2h: sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&cpu_dai>;
simple-audio-card,frame-master = <&cpu_dai>;
simple-audio-card,widgets = "Speaker", "Ext Spk";
simple-audio-card,audio-routing = "Ext Spk", "LINE";


           cpu_dai: simple-audio-card,cpu {
                                   sound-dai = <&da7213>;
          };

          codec_dai: simple-audio-card,codec {
                      sound-dai = <&da7213>;

          };
};

&i2c0 {
       pinctrl-0 = <&i2c0_pins>;
       pinctrl-names = "default";
       status = "okay";
      clock-frequency = <100000>;
      da7213: da7213@1b {
                    status = "okay";
                    compatible = "dlg,da7213";
                    #sound-dai-cells = <0>;
                    reg = <0x1b>;
                    dlg,micbias1-lvl = <2500>;
                    dlg,micbias2-lvl = <2500>;
                   dlg,dmic-data-sel = "lrise_rfall";
                  dlg,dmic-samplephase = "between_clkedge";
                  dlg,dmic-clkrate = <3000000>;

                  VDDA-supply = <&reg_1p8v>;
                 VDDMIC-supply = <&reg_3p3v>;
                 VDDIO-supply = <&reg_3p3v>;
        };
}
i2c0_pins: i2c0 {
                 groups = "i2c0";//G3P_15 and GP3_14)
                  function = "i2c0";
};
ssi_pins: ssi78 {
               groups = "ssi78_ctrl", "ssi7_data","ssi8_data";/* GP6_17, GP6_18, GP6_19,GP6_20 */
               function = "ssi";
};

Also seleted DA7213 in kernel configuration

CONFIG_SND_SOC_DA7213=y

Compilied the drivers sucessfully without any error please find attachd Kernel debug message.

I am able to detectcommunity.renesas.com/.../sound_2D00_debug1.txt the I2C using i2cdetect and sound card is present in the proc entries

Below is the details of testing


Poky (Yocto Project Reference Distro) 3.1.21 hihope-rzg2h ttySC0

BSP: RZG2H/HIHOPE-RZG2H/3.0.3
LSI: RZG2H
Version: 3.0.3
hihope-rzg2h login: root
Last login: Wed Jun 28 07:38:07 UTC 2023
amixer: Unable to find simple control 'DVC In',1

amixer: Unable to find simple control 'DVC Out',1

Extreme Low Power mode has already been disabled.
root@hihope-rzg2h:~# i2cdetect -y -r 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@hihope-rzg2h:~# cat /proc/asound/cards
0 [da7213hifida721]: da7213-hifi-da7 - da7213-hifi-da7213-hifi
da7213-hifi-da7213-hifi
root@hihope-rzg2h:~#


When I try to play a wav file getting the below error

root@hihope-rzg2h:~# aplay file_example_WAV_10MG.wav
aplay: main:828: audio open error: No such file or directory
root@hihope-rzg2h:~#

please guide us what am i missing here please tell us

What I have done is correct or any changes required and how do I go about it.
Any help will help us in this regards.

Thanks & Regards
Nagaraja


Viewing all articles
Browse latest Browse all 1583

Trending Articles