LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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.

Notices


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

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


Hi,
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.

Command
Code:
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:

Code:
&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:
Code:
pcm.device{
        format S16_LE
        rate 44100
        type hw
        card 0
        channels 2
}

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

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

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

What I am interested in.....is your mic activated?

Leaping ahead....use the arrow keys to capture device mic....press 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
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:13 PM.

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