On Mon 07 Dec 2020 at 10:53, Jerome Brunet wrote:
> Enable audio capture frontends and a tdm decoder.
> This makes it possible to loopback the audio played on the hdmi codec,
> which is the only output interface at the moment.
>
> Of course, one TODDR device would be enough to do that but since
> the 3 FRDDRs are enabled on the playback side, let's do the same on the
> capture side.
>
> Signed-off-by: Jerome Brunet
> ---
> .../boot/dts/amlogic/meson-khadas-vim3.dtsi | 41 +--
> 1 file changed, 37 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> index 12465c4becc7..4cf2c193d168 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
> @@ -166,11 +166,16 @@ hdmi_connector_in: endpoint {
> sound {
> compatible = "amlogic,axg-sound-card";
> model = "G12B-KHADAS-VIM3";
> - audio-aux-devs = <_a>;
> + audio-aux-devs = <_a>, <_a>;
> audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
> "TDMOUT_A IN 1", "FRDDR_B OUT 0",
> "TDMOUT_A IN 2", "FRDDR_C OUT 0",
> - "TDM_A Playback", "TDMOUT_A OUT";
> + "TDM_A Playback", "TDMOUT_A OUT",
> + "TDMIN_A IN 1", "TDM_A Capture",
Oops this is wrong
> + "TDMIN_A IN 3", "TDM_A Loopback",
And this correct for the vim3 but not the vim3l ...
Please don't take this patch. Patch 1 can still be applied though.
> + "TODDR_A IN 0", "TDMIN_A OUT",
> + "TODDR_B IN 0", "TDMIN_A OUT",
> + "TODDR_C IN 0", "TDMIN_A OUT";
>
> assigned-clocks = < CLKID_MPLL2>,
> < CLKID_MPLL0>,
> @@ -193,8 +198,20 @@ dai-link-2 {
> sound-dai = <_c>;
> };
>
> - /* 8ch hdmi interface */
> dai-link-3 {
> + sound-dai = <_a>;
> + };
> +
> + dai-link-4 {
> + sound-dai = <_b>;
> + };
> +
> + dai-link-5 {
> + sound-dai = <_c>;
> + };
> +
> + /* 8ch hdmi interface */
> + dai-link-6 {
> sound-dai = <_a>;
> dai-format = "i2s";
> dai-tdm-slot-tx-mask-0 = <1 1>;
> @@ -209,7 +226,7 @@ codec {
> };
>
> /* hdmi glue */
> - dai-link-4 {
> + dai-link-7 {
> sound-dai = < TOHDMITX_I2S_OUT>;
>
> codec {
> @@ -449,10 +466,26 @@ _a {
> status = "okay";
> };
>
> +_a {
> + status = "okay";
> +};
> +
> _a {
> status = "okay";
> };
>
> +_a {
> + status = "okay";
> +};
> +
> +_b {
> + status = "okay";
> +};
> +
> +_c {
> + status = "okay";
> +};
> +
> {
> status = "okay";
> };