audio: add spdif/HDMI mute ctrl [1/1]
authorShuai Li <shuai.li@amlogic.com>
Wed, 13 Mar 2019 05:56:26 +0000 (13:56 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 15 Mar 2019 12:20:27 +0000 (04:20 -0800)
PD#TV-3016

Problem:
HDMI SPDIF mute interface has no effect.

Solution:
Add these interfaces for auge platform.

Verify:
Tested locally.

Change-Id: I168c0940e0f2b3d94091d43c6b8190f6f833c0f1
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
61 files changed:
arch/arm/boot/dts/amlogic/g12a_s905d2_skt.dts
arch/arm/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts
arch/arm/boot/dts/amlogic/g12a_s905d2_u200.dts
arch/arm/boot/dts/amlogic/g12a_s905d2_u200_1g.dts
arch/arm/boot/dts/amlogic/g12a_s905d2_u200_buildroot.dts
arch/arm/boot/dts/amlogic/g12a_s905d2_u200_buildroot_vccktest.dts
arch/arm/boot/dts/amlogic/g12a_s905d2_u200_drm_buildroot.dts
arch/arm/boot/dts/amlogic/g12a_s905x2_u211.dts
arch/arm/boot/dts/amlogic/g12a_s905x2_u211_1g.dts
arch/arm/boot/dts/amlogic/g12a_s905x2_u211_512m.dts
arch/arm/boot/dts/amlogic/g12a_s905x2_u211_buildroot.dts
arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts
arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts
arch/arm/boot/dts/amlogic/g12a_s905x2_u212_buildroot.dts
arch/arm/boot/dts/amlogic/g12a_s905x2_u212_drm_buildroot.dts
arch/arm/boot/dts/amlogic/g12a_s905y2_u220.dts
arch/arm/boot/dts/amlogic/g12a_s905y2_u221.dts
arch/arm/boot/dts/amlogic/g12b_a311d_skt.dts
arch/arm/boot/dts/amlogic/g12b_a311d_skt_a.dts
arch/arm/boot/dts/amlogic/g12b_a311d_w400.dts
arch/arm/boot/dts/amlogic/g12b_a311d_w400_a.dts
arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot.dts
arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot_a.dts
arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot_vccktest.dts
arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot_vccktest_a.dts
arch/arm/boot/dts/amlogic/g12b_a311d_w400_drm_buildroot.dts
arch/arm/boot/dts/amlogic/tl1_t962x2_skt.dts
arch/arm/boot/dts/amlogic/tl1_t962x2_t309.dts
arch/arm/boot/dts/amlogic/tl1_t962x2_x301.dts
arch/arm64/boot/dts/amlogic/g12a_s905d2_skt.dts
arch/arm64/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts
arch/arm64/boot/dts/amlogic/g12a_s905d2_u200.dts
arch/arm64/boot/dts/amlogic/g12a_s905d2_u200_1g.dts
arch/arm64/boot/dts/amlogic/g12a_s905d2_u200_buildroot.dts
arch/arm64/boot/dts/amlogic/g12a_s905d2_u200_buildroot_vccktest.dts
arch/arm64/boot/dts/amlogic/g12a_s905d2_u200_drm_buildroot.dts
arch/arm64/boot/dts/amlogic/g12a_s905x2_u211.dts
arch/arm64/boot/dts/amlogic/g12a_s905x2_u211_1g.dts
arch/arm64/boot/dts/amlogic/g12a_s905x2_u211_512m.dts
arch/arm64/boot/dts/amlogic/g12a_s905x2_u211_buildroot.dts
arch/arm64/boot/dts/amlogic/g12a_s905x2_u212.dts
arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_1g.dts
arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_buildroot.dts
arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_drm_buildroot.dts
arch/arm64/boot/dts/amlogic/g12a_s905y2_u220.dts
arch/arm64/boot/dts/amlogic/g12a_s905y2_u221.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_skt.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_skt_a.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400_a.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400_buildroot.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400_buildroot_a.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400_buildroot_vccktest.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400_buildroot_vccktest_a.dts
arch/arm64/boot/dts/amlogic/g12b_a311d_w400_drm_buildroot.dts
arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts
arch/arm64/boot/dts/amlogic/tl1_t962x2_x301.dts
include/linux/amlogic/media/sound/spdif_info.h
sound/soc/amlogic/auge/spdif.c
sound/soc/amlogic/common/spdif_info.c
sound/soc/amlogic/meson/spdif_codec.c

index 70f1447..459b5b2 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 88c7dfb..f4d2ed6 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index cc511d8..c3e241a 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 568e8a3..924718a 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 2e64f70..296ee03 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index f91cb17..42fc9ad 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 2479669..13014ff 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 6ac5b11..05e912f 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index f9f0c48..5b83889 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 119fcf5..35edc07 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 666b218..5e92810 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index cecdd6a..13f1fb5 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index de25c7b..44a8d10 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 8e4bc50..189d10f 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 5e882d1..730acc8 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 175375c..500df13 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 1c1a867..d7a1c19 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index ed6d2be..ec4dd31 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 6706641..786992f 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index c30da64..489f833 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index f73033c..ef3bbda 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 6d1a8a6..877053e 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 25f73af..e1f7cb2 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 71cff0c..5251f17 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index fd62cd9..a96636e 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 8f786b0..11fedba 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 55b05ea..1bd3074 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
                interrupt-names = "irq_spdifin";
 
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
+
                pinctrl-0 = <&spdifout_a &spdifin_a>;
+               pinctrl-1 = <&spdifout_a_mute>;
 
                /*
                 * whether do asrc for pcm and resample a or b
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIODV_4 */
+                       groups = "GPIODV_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* GPIOZ_7, GPIOZ_8, pdm_din2_z4 */
                        groups = "pdm_dclk_z",
index 1e21585..aaa99b4 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
                interrupt-names = "irq_spdifin";
 
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout_a>;
+               pinctrl-1 = <&spdifout_a_mute>;
+
 
                /*
                 * whether do asrc for pcm and resample a or b
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIODV_4 */
+                       groups = "GPIODV_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* GPIOZ_7, GPIOZ_8, pdm_din2_z4 */
                        groups = "pdm_dclk_z",
index a64b99c..87511db 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
                interrupt-names = "irq_spdifin";
 
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout_a>;
+               pinctrl-1 = <&spdifout_a_mute>;
 
                /*
                 * whether do asrc for pcm and resample a or b
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIODV_4 */
+                       groups = "GPIODV_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* GPIOZ_7, GPIOZ_8, pdm_din2_z4 */
                        groups = "pdm_dclk_z",
index 72c19c9..28de453 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 51b1043..03bc24d 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 1e326a7..a88b9c0 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 2658a87..0078e3e 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 104e12f..d046eda 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 36f4f5a..faa053e 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 13be6d5..df05fc3 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 46db6c7..640f504 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 5c78cdc..825e1b4 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 7b5cdfd..ccf2218 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 784446e..74df363 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index deb592b..7ba8db6 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index bf9519e..a65d603 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 6d80428..33a9cd1 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index 9e106b9..dd00ad3 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIOH_4 */
+                       groups = "GPIOH_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
                        groups = "pdm_din0_a",
index b274718..508ad2e 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index c914dff..c2099c2 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &audio_data {
index 8ac0d2c..b871c46 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index ab33240..b8b0b53 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 7e64162..8d737de 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 035bbe2..5409ca4 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index b90f128..a190f16 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 8c23660..5c494b6 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 970f94a..5d3c49c 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 8a6d0f7..8f138fd 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index 05c6f78..cea3959 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
 
                interrupt-names = "irq_spdifin";
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                                       "spdif_pins_mute";
                pinctrl-0 = <&spdifout &spdifin>;
+               pinctrl-1 = <&spdifout_a_mute>;
                status = "okay";
        };
        aml_spdif_b: spdif_b {
                        function = "spdif_out_ao";
                };
        };
+
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* gpiao_10 */
+                       groups = "GPIOAO_10";
+                       function = "gpio_periphs";
+               };
+       };
 };  /* end of pinctrl_aobus */
 
 &irblaster {
index f7db8d3..c06f3a3 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
                interrupt-names = "irq_spdifin";
 
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout_a>;
+               pinctrl-1 = <&spdifout_a_mute>;
 
                /*
                 * whether do asrc for pcm and resample a or b
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIODV_4 */
+                       groups = "GPIODV_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* GPIOZ_7, GPIOZ_8, pdm_din2_z4 */
                        groups = "pdm_dclk_z",
index 1df3a45..6649d77 100644 (file)
                                <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
                interrupt-names = "irq_spdifin";
 
-               pinctrl-names = "spdif_pins";
+               pinctrl-names = "spdif_pins",
+                               "spdif_pins_mute";
                pinctrl-0 = <&spdifout_a>;
+               pinctrl-1 = <&spdifout_a_mute>;
 
                /*
                 * whether do asrc for pcm and resample a or b
                };
        };
 
+       spdifout_a_mute: spdifout_a_mute {
+               mux { /* GPIODV_4 */
+                       groups = "GPIODV_4";
+                       function = "gpio_periphs";
+               };
+       };
+
        pdmin: pdmin {
                mux { /* GPIOZ_7, GPIOZ_8, pdm_din2_z4 */
                        groups = "pdm_dclk_z",
index e9fec17..36df67a 100644 (file)
@@ -45,4 +45,10 @@ extern int spdif_format_get_enum(
 extern int spdif_format_set_enum(
        struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol);
+#ifdef CONFIG_AMLOGIC_HDMITX
+int aml_get_hdmi_out_audio(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol);
+int aml_set_hdmi_out_audio(struct snd_kcontrol *kcontrol,
+       struct snd_ctl_elem_value *ucontrol);
+#endif
 #endif
index 3dd0d5f..8567d7e 100644 (file)
@@ -76,6 +76,13 @@ struct spdif_chipinfo {
        bool same_src_spdif_reen;
 };
 
+enum SPDIF_SRC {
+       SPDIFIN_PAD = 0,
+       SPDIFOUT,
+       NOAP,
+       HDMIRX
+};
+
 struct aml_spdif {
        struct pinctrl *pin_ctl;
        struct aml_audio_controller *actrl;
@@ -127,6 +134,10 @@ struct aml_spdif {
        /* last value for pc, pd */
        int pc_last;
        int pd_last;
+
+       /* mixer control vals */
+       bool mute;
+       enum SPDIF_SRC spdifin_src;
 };
 
 static const struct snd_pcm_hardware aml_spdif_hardware = {
@@ -255,21 +266,44 @@ static int spdifin_audio_type_get_enum(
        return 0;
 }
 
-/* For fake */
-static bool is_mute;
-static int  spdifin_src;
 static int aml_audio_set_spdif_mute(struct snd_kcontrol *kcontrol,
                                        struct snd_ctl_elem_value *ucontrol)
 {
-       is_mute =
-                       ucontrol->value.integer.value[0];
+       struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol);
+       struct aml_spdif *p_spdif = snd_soc_dai_get_drvdata(dai);
+       struct pinctrl_state *state = NULL;
+       bool mute = !!ucontrol->value.integer.value[0];
+
+       if (IS_ERR_OR_NULL(p_spdif->pin_ctl)) {
+               pr_err("%s(), no pinctrl", __func__);
+               return 0;
+       }
+       if (mute) {
+               state = pinctrl_lookup_state
+                       (p_spdif->pin_ctl, "spdif_pins_mute");
+
+               if (!IS_ERR_OR_NULL(state))
+                       pinctrl_select_state(p_spdif->pin_ctl, state);
+       } else {
+               state = pinctrl_lookup_state
+                       (p_spdif->pin_ctl, "spdif_pins");
+
+               if (!IS_ERR_OR_NULL(state))
+                       pinctrl_select_state(p_spdif->pin_ctl, state);
+       }
+
+       p_spdif->mute = mute;
+
        return 0;
 }
 
 static int aml_audio_get_spdif_mute(struct snd_kcontrol *kcontrol,
                                        struct snd_ctl_elem_value *ucontrol)
 {
-       ucontrol->value.integer.value[0] = is_mute;
+       struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol);
+       struct aml_spdif *p_spdif = snd_soc_dai_get_drvdata(dai);
+
+       ucontrol->value.integer.value[0] = p_spdif->mute;
 
        return 0;
 }
@@ -285,7 +319,11 @@ int spdifin_source_get_enum(
        struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
-       ucontrol->value.enumerated.item[0] = spdifin_src;
+       struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol);
+       struct aml_spdif *p_spdif = snd_soc_dai_get_drvdata(dai);
+
+       ucontrol->value.enumerated.item[0] = p_spdif->spdifin_src;
+
        return 0;
 }
 
@@ -293,6 +331,8 @@ int spdifin_source_set_enum(
        struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
+       struct snd_soc_dai *dai = snd_kcontrol_chip(kcontrol);
+       struct aml_spdif *p_spdif = snd_soc_dai_get_drvdata(dai);
        int src = ucontrol->value.enumerated.item[0];
 
        if (src > 3) {
@@ -300,7 +340,8 @@ int spdifin_source_set_enum(
                return -1;
        }
        spdifin_set_src(src);
-       spdifin_src = src;
+       p_spdif->spdifin_src = src;
+
        return 0;
 }
 
@@ -327,7 +368,11 @@ static const struct snd_kcontrol_new snd_spdif_controls[] = {
                                spdifin_src_enum,
                                spdifin_source_get_enum,
                                spdifin_source_set_enum),
-
+#ifdef CONFIG_AMLOGIC_HDMITX
+       SOC_SINGLE_BOOL_EXT("Audio hdmi-out mute",
+                               0, aml_get_hdmi_out_audio,
+                               aml_set_hdmi_out_audio),
+#endif
 };
 
 static bool spdifin_check_audiotype_by_sw(struct aml_spdif *p_spdif)
index 85bd5e2..87d8619 100644 (file)
@@ -20,6 +20,9 @@
 
 #include <linux/amlogic/media/sound/aout_notify.h>
 #include <linux/amlogic/media/sound/spdif_info.h>
+#ifdef CONFIG_AMLOGIC_HDMITX
+#include <linux/amlogic/media/vout/hdmi_tx/hdmi_tx_ext.h>
+#endif
 
 /*
  * 0 --  other formats except(DD,DD+,DTS)
@@ -191,3 +194,29 @@ int spdif_format_set_enum(
        IEC958_mode_codec = index;
        return 0;
 }
+
+#ifdef CONFIG_AMLOGIC_HDMITX
+unsigned int aml_audio_hdmiout_mute_flag;
+/* call HDMITX API to enable/disable internal audio out */
+int aml_get_hdmi_out_audio(struct snd_kcontrol *kcontrol,
+                         struct snd_ctl_elem_value *ucontrol)
+{
+       ucontrol->value.integer.value[0] = !hdmitx_ext_get_audio_status();
+
+       aml_audio_hdmiout_mute_flag =
+                       ucontrol->value.integer.value[0];
+       return 0;
+}
+
+int aml_set_hdmi_out_audio(struct snd_kcontrol *kcontrol,
+                         struct snd_ctl_elem_value *ucontrol)
+{
+       bool mute = ucontrol->value.integer.value[0];
+
+       if (aml_audio_hdmiout_mute_flag != mute) {
+               hdmitx_ext_set_audio_output(!mute);
+               aml_audio_hdmiout_mute_flag = mute;
+       }
+       return 0;
+}
+#endif
index 299c46c..fc48405 100644 (file)
@@ -166,29 +166,6 @@ static int aml_audio_get_spdif_mute(struct snd_kcontrol *kcontrol,
 }
 
 #ifdef CONFIG_AMLOGIC_HDMITX
-/* call HDMITX API to enable/disable internal audio out */
-static int aml_get_hdmi_out_audio(struct snd_kcontrol *kcontrol,
-                         struct snd_ctl_elem_value *ucontrol)
-{
-       ucontrol->value.integer.value[0] = !hdmitx_ext_get_audio_status();
-
-       v_spdif_codec.aml_audio_hdmiout_mute_flag =
-                       ucontrol->value.integer.value[0];
-       return 0;
-}
-
-static int aml_set_hdmi_out_audio(struct snd_kcontrol *kcontrol,
-                         struct snd_ctl_elem_value *ucontrol)
-{
-       bool mute = ucontrol->value.integer.value[0];
-
-       if (v_spdif_codec.aml_audio_hdmiout_mute_flag != mute) {
-               hdmitx_ext_set_audio_output(!mute);
-               v_spdif_codec.aml_audio_hdmiout_mute_flag = mute;
-       }
-       return 0;
-}
-
 static const char * const hdmi_out_channel_mask_texts[] = {
                "SPDIF",
                "2CH_I2S_0/1",