Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 01-11-2020, 08:00 AM   #1
LQ Newbie
Registered: Jan 2020
Posts: 1

Rep: Reputation: Disabled
ALSA and I2S/PCM sound device

I have a problem witch I2S/PCM on my OrangePi, I want to use sound codec device without any I2C or SPI controls, only I2S/PCM to play and record audio witch ALSA. Based on this question and this patch, I tried to use snd-soc-dummy witch simple-audio-card and I was succeed to play audio, but audio capturing does not works.

I was checking if there is any data on DIN I2S line witch logic analyzer and I was able to see bits flowing to my OrangePi but any sound was recorded.

arecord -vvv -f dat /dev/null
shows there was only 0x00 incoming samples.

Do you have any idea or tips what should I do to be able to record audio with my codec? Below my device tree:

&i2s0 {
    status = "okay";
    pinctrl-0 = <&i2s0_pins>;
    pinctrl-names = "default";
    #sound-dai-cells = <0>;

/ {
    codec_dummy: codec_dummy {
        compatible = "linux,snd-soc-dummy";
        #sound-dai-cells = <0>;
        status = "okay";

    sound {
        compatible = "simple-audio-card";
        simple-audio-card,name = "DUMMY_SND";

        simple-audio-card,format = "dsp_a";
        simple-audio-card,bitclock-master = <&snd_cpu>;
        simple-audio-card,frame-master = <&snd_cpu>;
        simple-audio-card,mclk-fs = <512>;
        status = "okay";

        snd_cpu: simple-audio-card,cpu {
            sound-dai = <&i2s0>;
            dai-tdm-slot-num = <2>;
            dai-tdm-slot-width = <16>;

        snd_codec: simple-audio-card,codec {
            sound-dai = <&codec_dummy>;
and asound.conf file:
        format S16_LE
        rate 44100
        type hw
        card 0
        channels 2

    type plug
    slave.pcm "device"
Old 01-22-2020, 11:43 PM   #2
LQ 5k Club
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,827

Rep: Reputation: Disabled
Hi as its been about 10 days and I do not have an orangePI or RPI etc can you take a screenshot of

alsamixer -c0 -Vall
upload it to your fav share site and post the link, is a good site to use if you have not used one before.

What I am interested your mic activated?

Leaping ahead....use the arrow keys to capture device the SPACE bar to activate (control should now show in red)
then raise input volumes

Do not raise volume to 100% as cheap devices tend to distort.
Try about 60% then try to record.

If you did progress and now can record just say so....other wise screenshot please


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to mix S/PDIF input and PCM Out (to hear PCM and S/PDIF simultaneously)? *Dark Dragon* Linux - General 11 07-20-2012 07:53 AM
(Sound) what is PCM? what's the difference between PCM volume and master volume? snr8fl3 Linux - General 2 01-27-2009 06:12 AM
CD mechanism via I2S mist_4u Linux - Embedded & Single-board computer 1 01-27-2009 12:54 AM
I2s driver radhapriya Linux - General 0 08-25-2003 04:46 AM
I2s driver radhapriya Linux - Software 0 08-14-2003 01:51 AM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration