i.MX8M + adv7535 HDMI bridge Audio Question

Adam Ford aford173 at gmail.com
Thu Aug 6 14:05:15 EDT 2020


On Thu, Aug 6, 2020 at 9:27 AM Adam Ford <aford173 at gmail.com> wrote:
>
> I have an i.MX8M Mini, and I am trying to route audio over the adv7535
> HDMI bridge chip.
>

Please disregard.  Sorry about the noise.  The HW was wired improperly.

adam

> I have the HDMI video working, but I want to add audio.
>
> The physical connection is using SAI5 interface, and it is being
> routed with the following:
>
> SAI5_MCLK -> adv7535 SCLK/MCLK pin
> SAI5_TXD0 - > adv7535  I2S pin
> SAI5_TX_SYNC -> adv7535 LRCLK pin
>
> I hope this is correct.
>
> I have configured the sai5 node as follows:
> &sai5 {
>      pinctrl-names = "default";
>      pinctrl-0 = <&pinctrl_sai5>;
>      assigned-clocks = <&clk IMX8MM_CLK_SAI5>;
>      assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
>      assigned-clock-rates = <24576000>;
>      fsl,sai-mclk-direction-output;
>      #sound-dai-cells = <0>;
>      status = "okay";
> };
>
> And I have created a simple-audio-card as follows:
>
> hdmi_sound: hdmi-sound {
>      compatible = "simple-audio-card";
>      simple-audio-card,name = "hdmi-sound";
>      simple-audio-card,format = "i2s";
>      #sound-dai-cells = <0>;
>      simple-audio-card,cpu {
>           sound-dai = <&sai5>;
>           system-clock-direction-out;
>      };
>      simple-audio-card,codec {
>           sound-dai = <&adv_bridge>;
>      };
> };
>
> I added the 2nd port on the adv7535 which is required for audio as follows:
> ports {
>      #address-cells = <1>;
>      #size-cells = <0>;
>
>      port at 0 {
>           reg = <0>;
>           adv7535_from_dsim: endpoint {
>                remote-endpoint = <&dsim_to_adv7535>;
>           };
>      };
>
>      port at 2 {
>           reg = <2>;
>           codec_adv7535: endpoint {
>                remove-endpoint = <&hdmi_sound>;
>           };
>      };
> };
>
> In theory that should create a sound card linking the HDMI bridge to
> the sound card.
>
> When booting, I see:
>
> [    4.162391] asoc-simple-card hdmi-sound: i2s-hifi <-> 30050000.sai mapping ok
> [    4.169564] asoc-simple-card hdmi-sound: ASoC: no DMI vendor name!
>
> I do not know if the missing DMI vendor name is an issue.
>
> aplay -l shows:
>
> card 2: hdmisound [hdmi-sound], device 0: 30050000.sai-i2s-hifi i2s-hifi-0 []
>   Subdevices: 1/1
>   Subdevice #0: subdevice #0
>
> So I can see the audio card is appearing.  When I attempt to run a
> test with the following command:
>
>      speaker-test -c2 -t wav -D sysdefault:CARD=hdmisound
>
> It acts as if it's working, but I don't get any sound from the HDMI
> TV.  (yes, I checked the volume, and the TV works on other devices)
>
>
> Playback device is sysdefault:CARD=hdmisound
> Stream parameters are 48000Hz, S16_LE, 2 channels
> WAV file(s)
> Rate set to 48000Hz (requested 48000Hz)
> Buffer size range from 64 to 16384
> Period size range from 32 to 8192
> Using max buffer size 16384
> Periods = 4
> was set period_size = 4096
> was set buffer_size = 16384
>  0 - Front Left
>  1 - Front Right
> Time per period = 2.732281
> ...
>
> Does anyone have any suggestions on what I may be missing or what I am
> doing wrong?
>
> thanks,
>
> adam



More information about the linux-arm-kernel mailing list