MAX98090 on TX2NX

Hello!

I am bringing up a MAX98090 on a custom carrier board, do I use kernel/kernel-4.9/sound/soc/tegra/tegra_max98090.c or kernel/kernel-4.9/sound/soc/codecs/max98090.c?

I’ve modified hardware/nvidia/platform/t18x/lanai/kernel-dts/common/tegra186-p3636-0001-a00-audio.dtsi to look like this:

#include <audio/tegra-platforms-audio-dai-links.dtsi>

/ {
	hda@3510000 {
		status = "okay";
	};

  i2c@3180000 {
    status = "okay";
    max98090: audio-codec@10 {
      compatible = "nvidia,tegra-audio-max98090";
      reg = <0x10>;

      interrupt-parent = <&tegra_main_gpio>;
      interrupts = <TEGRA_MAIN_GPIO(C, 2) GPIO_ACTIVE_HIGH>;
    };
  };

	tegra_sound: sound {
		status = "okay";
		compatible = "nvidia,tegra-audio-t186ref-mobile-rt565x";
		nvidia,model = "tegra-snd-max98090";
		clocks = <&tegra_car TEGRA186_CLK_PLLA>,
			 <&tegra_car TEGRA186_CLK_PLL_A_OUT0>,
			 <&tegra_car TEGRA186_CLK_AUD_MCLK>;
		clock-names = "pll_a", "pll_a_out0", "extern1";
		assigned-clocks = <&tegra_car TEGRA186_CLK_PLL_A_OUT0>,
				  <&tegra_car TEGRA186_CLK_AUD_MCLK>;
		assigned-clock-parents = <&tegra_car TEGRA186_CLK_PLLA>,
					 <&tegra_car TEGRA186_CLK_PLL_A_OUT0>;
		resets = <&tegra_car TEGRA186_RESET_AUD_MCLK>;
		reset-names = "extern1_rst";

		mclk-fs = <256>;

		/* TODO Avoid rt565x_dai_link definition by modifying common base file
		 * since current base does not have definition of dai link as
		 * rt565x_dai_link,  had to add here
		 */
    hdr40_snd_link_i2s: rt565x_dai_link: nvidia,dai-link-1 {
      link-name = "max98090";
      codec-dai = <&max98090>; 
      codec-dai-name = "HiFi";
    };
    hdr40_i2c1: i2c@c240000 { };

	};
};

and I get this error:

[    7.118279] tegra-asoc: sound: ASoC: CODEC DAI HiFi not registered
[    7.125441] tegra-asoc: sound: snd_soc_register_card failed (-517)

Sorry for the late response, our team will do the investigation and provide suggestions soon. Thanks

Hi kjasper,

kernel/kernel-4.9/sound/soc/codecs/max98090.c is the codec driver that needs to be used.

Guide to port new codec is available at link

Once you enable compilation of the appropriate codec driver in kernel and place the codec node on “appropriate i2c node”(Ensure you are using the right address), i2c probe in codec driver gets called and registers the codec. More details available in previously mentioned link.

Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.