diff options
Diffstat (limited to 'sound/aoa/fabrics')
-rw-r--r-- | sound/aoa/fabrics/layout.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index d9b1d22a62c0..fbf5c933baa4 100644 --- a/sound/aoa/fabrics/layout.c +++ b/sound/aoa/fabrics/layout.c | |||
@@ -600,6 +600,7 @@ struct layout_dev { | |||
600 | struct snd_kcontrol *headphone_ctrl; | 600 | struct snd_kcontrol *headphone_ctrl; |
601 | struct snd_kcontrol *lineout_ctrl; | 601 | struct snd_kcontrol *lineout_ctrl; |
602 | struct snd_kcontrol *speaker_ctrl; | 602 | struct snd_kcontrol *speaker_ctrl; |
603 | struct snd_kcontrol *master_ctrl; | ||
603 | struct snd_kcontrol *headphone_detected_ctrl; | 604 | struct snd_kcontrol *headphone_detected_ctrl; |
604 | struct snd_kcontrol *lineout_detected_ctrl; | 605 | struct snd_kcontrol *lineout_detected_ctrl; |
605 | 606 | ||
@@ -651,6 +652,7 @@ static struct snd_kcontrol_new n##_ctl = { \ | |||
651 | AMP_CONTROL(headphone, "Headphone Switch"); | 652 | AMP_CONTROL(headphone, "Headphone Switch"); |
652 | AMP_CONTROL(speakers, "Speakers Switch"); | 653 | AMP_CONTROL(speakers, "Speakers Switch"); |
653 | AMP_CONTROL(lineout, "Line-Out Switch"); | 654 | AMP_CONTROL(lineout, "Line-Out Switch"); |
655 | AMP_CONTROL(master, "Master Switch"); | ||
654 | 656 | ||
655 | static int detect_choice_get(struct snd_kcontrol *kcontrol, | 657 | static int detect_choice_get(struct snd_kcontrol *kcontrol, |
656 | struct snd_ctl_elem_value *ucontrol) | 658 | struct snd_ctl_elem_value *ucontrol) |
@@ -891,6 +893,11 @@ static void layout_attached_codec(struct aoa_codec *codec) | |||
891 | lineout = codec->gpio->methods->get_detect(codec->gpio, | 893 | lineout = codec->gpio->methods->get_detect(codec->gpio, |
892 | AOA_NOTIFY_LINE_OUT); | 894 | AOA_NOTIFY_LINE_OUT); |
893 | 895 | ||
896 | if (codec->gpio->methods->set_master) { | ||
897 | ctl = snd_ctl_new1(&master_ctl, codec->gpio); | ||
898 | ldev->master_ctrl = ctl; | ||
899 | aoa_snd_ctl_add(ctl); | ||
900 | } | ||
894 | while (cc->connected) { | 901 | while (cc->connected) { |
895 | if (cc->connected & CC_SPEAKERS) { | 902 | if (cc->connected & CC_SPEAKERS) { |
896 | if (headphones <= 0 && lineout <= 0) | 903 | if (headphones <= 0 && lineout <= 0) |