Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

i2s0 I/O Configure dts

Featured Replies

Hello, community. For a while now, I've been trying to configure the input and output of i2s0 without success. The closest I've come to a result was with the adau7002 configuration, but I'm experiencing synchronous noise, as if the issue were related to a CLK. Let me provide some details to see if anyone can guide me.

I have a Banana Pi M2 with Armbian 23.11.1 Bookworm and Linux 6.1.13-current-sunxi. I have a pcm1807 connected to the input, configured with SPI, outputting i2s left justified in 24bit, and operating as a master. The pcm is connected to a 24.5MHz crystal.

My goal is to configure the system to capture audio in a generic i2s format and then play it back in the same way through the output, as I have an amplifier connected to it.

My other question is whether it's possible to reconfigure the pins using an overlay. Currently, my pin configuration is as follows:

PA10 = LRCLK

PA16 = BCLK

PA20 = SDI

PA21 = SDO

i tried reconfigure the pins but i couldn't ☹️

 

I am attaching the adau7002.dts to provide additional information:

 

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun8i-h3";


    fragment@0 {
        target-path = "/";
        __overlay__ {
            adau7002_codec: adau7002_codec {
                #sound-dai-cells = <0>;
                compatible = "adi,adau7002";
                status = "okay";
            };
        };
    };

 

    fragment@1 {
        target = <&i2s0>;
        __overlay__ {
            status = "okay";
            pinctrl-0 = <&i2s0_pins>;
            sound-dai = <&adau7002_codec>;
            pinctrl-names = "default";
        };
    };

    fragment@2 {
        target-path = "/";
        __overlay__ {
            sound_i2s {
            compatible = "simple-audio-card";
            simple-audio-card,format = "i2s";
            simple-audio-card,name = "adau7002";
        #simple-audio-card,dai-link = "left_j";
            simple-audio-card,bitclock-slave = <&dailink0_slave>; 
            simple-audio-card,frame-slave = <&dailink0_slave>; 
            simple-audio-card,mclk-fs = <512>;

            simple-audio-card,widgets = 
                    "Line", "Line In Jack"; 

            simple-audio-card,routing =
                    "PDM_DAT", "Line In Jack";

            status = "okay";
            simple-audio-card,cpu {
                sound-dai = <&i2s0>;
            };
            dailink0_slave: simple-audio-card,codec {
                sound-dai = <&adau7002_codec>;

            };
            };
        };
    };
};
 

 

I use for capture this command: "arecord -D hw:0,0 -f S16_LE -t wav -r 48000 -c 2 -d 10 -V stereo -v >test.wav". But when I want to switch S16_LE to S24_LE you can hardly hear anything, although the noise persists with both formats

Edited by FelSM

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.