coral dev board hdmi arc Input/output error

436 Views Asked by At

I'm trying get the Coral Dev Board to receive audio from my TV over HDMI ARC. I'm pretty sure I have ARC enabled on the TV side but I think there's something missing on the Coral Linux side. Can anyone help me get this working? Has anyone else got this working?

I modified the phanbell device tree to enable spdif2 and sound-hdmi-arc.

sound-hdmi-arc {
    compatible = "fsl,imx-audio-spdif";
    model = "imx-hdmi-arc";
    spdif-controller = <&spdif2>;
    spdif-in;
};

&spdif2 {
    assigned-clocks = <&clk IMX8MQ_CLK_SPDIF2>;
    assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
    assigned-clock-rates = <24576000>;
    status = "okay";
};

The arc device shows up in Linux but I get an error message when I try to record from it.

arecord -D hw:CARD=imxhdmiarc,DEV=0 -r 48000 -f S24_LE -c 2 -d 3 ~/arc.wav
Recording WAVE '/home/mendel/arc.wav' : Signed 24 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:2145: read error: Input/output error

I get the same error message if I connect the Coral Dev Board so some audio test equipment. The command does work if I set an audio equipment setting to disable ARC link negotiation and force the audio to be on. This leads me to believe there's some kind of link negotiation on the Coral Linux side missing.

Let me know if anybody can help. Thanks.

1

There are 1 best solutions below

0
On

I figured it out.

# install the cec-ctl and read-edid utilities
sudo apt install cec-utils read-edid
# find our physical address reported by the TV
read-edid /devices/platform/display-subsystem/drm/card0/card0-HDMI-A-1/edid | grep physical
# set the logical address
cec-clt --audio
# set the physical address
cec-ctl -p 1.0.0.0
# send the command
cec-ctl --to 0 --initiate-arc