ODROID-COMMON: Add Mixer control for LINE-OUT Mute

Mute : amixer -c0 sset 'LINE_OUT mute' on
Unmute : amixer -c0 sset 'LINE_OUT mute' off
Boot on state : unmute

Change-Id: If899ea5607cbef8b62fb35b66c79089beb192d1a
This commit is contained in:
Kevin Kim
2019-02-20 18:13:24 +09:00
committed by Dongjin Kim
parent d4efcee735
commit 6bc8767047
2 changed files with 7 additions and 5 deletions

View File

@@ -92,8 +92,8 @@
auge_sound {
compatible = "amlogic, g12a-sound-card";
aml-audio-card,name = "AML-AUGESOUND";
/*avout mute gpio*/
avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
/*line-out mute gpio*/
mute_gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
/*for audio effect ,eqdrc */
aml-audio-card,effect = <&audio_effect>;

View File

@@ -734,7 +734,7 @@ static int spk_mute_get(struct snd_kcontrol *kcontrol,
}
static const struct snd_kcontrol_new card_controls[] = {
SOC_SINGLE_BOOL_EXT("SPK mute", 0,
SOC_SINGLE_BOOL_EXT("LINE_OUT mute", 0,
spk_mute_get,
spk_mute_set),
};
@@ -749,7 +749,7 @@ static int aml_card_parse_gpios(struct device_node *node,
bool active_low;
int ret;
gpio = of_get_named_gpio_flags(node, "spk_mute-gpios", 0, &flags);
gpio = of_get_named_gpio_flags(node, "mute_gpio", 0, &flags);
priv->spk_mute_gpio = gpio;
if (gpio_is_valid(gpio)) {
@@ -757,12 +757,13 @@ static int aml_card_parse_gpios(struct device_node *node,
flags = active_low ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW;
priv->spk_mute_active_low = active_low;
ret = devm_gpio_request_one(dev, gpio, flags, "spk_mute");
ret = devm_gpio_request_one(dev, gpio, flags, "line_mute");
if (ret >= 0) {
snd_soc_add_card_controls(soc_card, card_controls,
ARRAY_SIZE(card_controls));
}
}
#if !defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
if (IS_ERR_OR_NULL(priv->avout_mute_desc)) {
priv->avout_mute_desc = gpiod_get(dev,
"avout_mute", GPIOF_OUT_INIT_LOW);
@@ -783,6 +784,7 @@ static int aml_card_parse_gpios(struct device_node *node,
"high" : "low");
}
}
#endif
return 0;
}