Part Number: TDA4VM
Tool/software:
HI
We use sdk 10.
We want to use mcasp1 (I2S) to send data to the ad2428.
The mcasp1 pinmux is:
static pinmuxPerCfg_t gMcasp1PinCfg[] =
{
/* MyMCASP1 -> MCASP1_ACLKX -> AB27 */
{
PIN_PRG0_PRU1_GPO5, PIN_MODE(12) | \
((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
},
/* MyMCASP1 -> MCASP1_AFSX -> AA28 */
{
PIN_PRG0_PRU1_GPO8, PIN_MODE(12) | \
((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
},
/* MyMCASP1 -> MCASP1_AXR2 -> AD29 */
{
PIN_PRG0_PRU1_GPO4, PIN_MODE(12) | \
((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
},
/* MyMCASP1 -> MCASP1_AXR3 -> AC26 */
{
PIN_PRG0_PRU1_GPO6, PIN_MODE(12) | \
((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
},
/* MyMCASP1 -> MCASP1_AXR6 -> AA25 */
{
PIN_PRG0_PRU1_GPO10, PIN_MODE(12) | \
((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
},
/* MyMCASP1 -> MCASP1_AXR7 -> AG26 */
{
PIN_PRG0_PRU1_GPO11, PIN_MODE(12) | \
((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
},
{PINMUX_END}
};
Dts config is:
main_mcasp1_pins_default: main-mcasp1-default-pins {
pinctrl-single,pins = <
J721E_IOPAD(0x114, PIN_INPUT, 12) /* (AB27) PRG0_PRU1_GPO5.MCASP1_ACLKX */
J721E_IOPAD(0x120, PIN_INPUT, 12) /* (AA28) PRG0_PRU1_GPO8.MCASP1_AFSX */
J721E_IOPAD(0x110, PIN_INPUT, 12) /* (AD29) PRG0_PRU1_GPO4.MCASP1_AXR2 */
J721E_IOPAD(0x118, PIN_INPUT, 12) /* (AC26) PRG0_PRU1_GPO6.MCASP1_AXR3 */
J721E_IOPAD(0x128, PIN_INPUT, 12) /* (AA25) PRG0_PRU1_GPO10.MCASP1_AXR6 */
J721E_IOPAD(0x12c, PIN_INPUT, 12) /* (AG26) PRG0_PRU1_GPO11.MCASP1_AXR7 */
>;
};
&mcasp1 {
status = "okay";
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&main_mcasp1_pins_default>;
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <4>;
auxclk-fs-ratio = <256>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
2 2 1 1
>;
tx-num-evt = <0>;
rx-num-evt = <0>;
};
codec_audio: sound {
compatible = "simple-audio-card";
simple-audio-card,name = "ad242x";
status = "okay";
/* 纯播放链路 */
simple-audio-card,dai-link@0 {
format = "i2s";
bitclock-master = <&cpu_dai>;
frame-master = <&cpu_dai>;
cpu_dai: cpu {
sound-dai = <&mcasp1>; // 必须与下方mcasp1的label匹配
dai-tdm-slot-num = <4>;
dai-tdm-slot-width = <32>;
dai-tdm-slot-tx-mask = <1 1 1 1>; // Slot0-3均启用
};
simple-audio-card,codec {
sound-dai = <&dummy_codec>;
};
};
};
dummy_codec: dummy-codec {
compatible = "linux,snd-soc-dummy";
#sound-dai-cells = <0>;
status = "okay";
};
Then we can see the dummy sound card
root@j721e-evm:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
The use command speaker-test -D hw:0,0 -t wav to test
And using an oscilloscope to measure MCASP1_AXR2, MCASP1_AXR3, MCASP1_AXR6, and MCASP1_AXR7, but there are no waveforms. What modifications are needed?
BR
Liupt