diff --git a/arch/arm/boot/dts/amlogic/txhd2_t950s_be311.dts b/arch/arm/boot/dts/amlogic/txhd2_t950s_be311.dts index e7acaa6f9..e2b4ae8f2 100644 --- a/arch/arm/boot/dts/amlogic/txhd2_t950s_be311.dts +++ b/arch/arm/boot/dts/amlogic/txhd2_t950s_be311.dts @@ -41,6 +41,7 @@ aml-audio-card,name = "AML-AUGESOUND"; /*spk mute gpio*/ spk_mute-gpios = <&gpio GPIODV_6 GPIO_ACTIVE_LOW>; + spk_mute_sleep_time = <800>; /*avout mute gpio*/ avout_mute-gpios = <&gpio GPIODV_5 GPIO_ACTIVE_HIGH>; /* headphone insert det */ diff --git a/sound/soc/amlogic/auge/card.c b/sound/soc/amlogic/auge/card.c index cc6e2d810..8a6047991 100644 --- a/sound/soc/amlogic/auge/card.c +++ b/sound/soc/amlogic/auge/card.c @@ -968,6 +968,7 @@ static int aml_card_parse_gpios(struct device_node *node, int gpio; bool active_low; unsigned int sleep_time = 500; + unsigned int spk_mute_sleep_time = 200; gpio = of_get_named_gpio_flags(node, "spk_mute-gpios", 0, &flags); priv->spk_mute_gpio = gpio; @@ -986,7 +987,11 @@ static int aml_card_parse_gpios(struct device_node *node, (active_low) ? GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH); } else { - msleep(200); + if (!of_property_read_u32(node, + "spk_mute_sleep_time", &spk_mute_sleep_time)) + msleep(spk_mute_sleep_time); + else + msleep(200); if (!priv->spk_mute_flag) gpio_set_value(priv->spk_mute_gpio, (active_low) ? GPIOF_OUT_INIT_HIGH :