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"
}