All of lore.kernel.org
 help / color / mirror / Atom feed
* i.MX8M + adv7535 HDMI bridge Audio Question
@ 2020-08-06 14:27 Adam Ford
  2020-08-06 18:05 ` Adam Ford
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Ford @ 2020-08-06 14:27 UTC (permalink / raw)
  To: NXP Linux Team, arm-soc, Sam Ravnborg

I have an i.MX8M Mini, and I am trying to route audio over the adv7535
HDMI bridge chip.

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@0 {
          reg = <0>;
          adv7535_from_dsim: endpoint {
               remote-endpoint = <&dsim_to_adv7535>;
          };
     };

     port@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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: i.MX8M + adv7535 HDMI bridge Audio Question
  2020-08-06 14:27 i.MX8M + adv7535 HDMI bridge Audio Question Adam Ford
@ 2020-08-06 18:05 ` Adam Ford
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Ford @ 2020-08-06 18:05 UTC (permalink / raw)
  To: NXP Linux Team, arm-soc, Sam Ravnborg

On Thu, Aug 6, 2020 at 9:27 AM Adam Ford <aford173@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@0 {
>           reg = <0>;
>           adv7535_from_dsim: endpoint {
>                remote-endpoint = <&dsim_to_adv7535>;
>           };
>      };
>
>      port@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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-06 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 14:27 i.MX8M + adv7535 HDMI bridge Audio Question Adam Ford
2020-08-06 18:05 ` Adam Ford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.