Other Parts Discussed in Thread: TLV320AIC3106, TLV320AIC3101, SYSCONFIG
Hi,
I have connected an ICS43432 I2S microphone to MCASP1 (in place of the codec).
In order to get this working, I modified the device tree (k3-am62a7-sk.dts):
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts index 0b101d989..0e8a7c427 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -207,7 +207,7 @@ led-0 { default-state = "off"; }; }; - +/* tlv320_mclk: clk-0 { #clock-cells = <0>; compatible = "fixed-clock"; @@ -242,6 +242,28 @@ sound_master: simple-audio-card,codec { clocks = <&tlv320_mclk>; }; }; +*/ + microphone: card-codec { + #sound-dai-cells = <0>; + compatible = "invensense,ics43432"; + status = "okay"; + }; + + mic_audio: sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "ics43432"; + simple-audio-card,bitclock-master = <&sound_master>; + simple-audio-card,frame-master = <&sound_master>; + status = "okay"; + + simple-audio-card,cpu { + sound-dai = <&mcasp1>; + }; + sound_master: simple-audio-card,codec { + sound-dai = <µphone>; + }; + }; hdmi: connector { compatible = "hdmi-connector"; @@ -594,18 +616,18 @@ exp2: gpio@23 { "CSI_VLDO_SEL", "SoC_WLAN_SDIO_RST"; }; - tlv320aic3106: audio-codec@1b { - #sound-dai-cells = <0>; - compatible = "ti,tlv320aic3106"; - reg = <0x1b>; - ai3x-micbias-vg = <1>; /* 2.0V */ - ai3x-ocmv = <1>; /* 1.5V */ - - /* Regulators */ - AVDD-supply = <&vcc_3v3_sys>; - IOVDD-supply = <&vcc_3v3_sys>; - DRVDD-supply = <&vcc_3v3_sys>; - }; +// tlv320aic3106: audio-codec@1b { +// #sound-dai-cells = <0>; +// compatible = "ti,tlv320aic3106"; +// reg = <0x1b>; +// ai3x-micbias-vg = <1>; /* 2.0V */ +// ai3x-ocmv = <1>; /* 1.5V */ +// +// /* Regulators */ +// AVDD-supply = <&vcc_3v3_sys>; +// IOVDD-supply = <&vcc_3v3_sys>; +// DRVDD-supply = <&vcc_3v3_sys>; +// }; sii9022: sii9022@3b { #sound-dai-cells = <0>;
I comment out the codec parts, and add a simple-sound-card with just the microphone.
The microphone gets recognized by ALSA, so there's that, but when I try to record, I get a timeout getting data.
root@am62axx-evm:~# arecord -Dhw:0 -c2 -r48000 -fS32_LE -twav -d10 -Vstereo test.wav Recording WAVE 'test.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Stereo arecord: pcm_read:2221: read error: Input/output error [ 1163.429705] ti-udma 485c0100.dma-controller: chan2 teardown timeout! root@am62axx-evm:~#
Do I have to reconfigure mcasp1 to be able to use I2S? Is there documentation on the device tree options
for the mcasp1 node?
Regards,
Bas Vermeulen