diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-02-06 10:11:25 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-06 10:13:29 -0500 |
commit | 45bdd1c1bbac56876cb9c71649300013281e4b22 (patch) | |
tree | 54037c25627885b03348ce866a363df9ff3614ef /sound/pci/hda/patch_realtek.c | |
parent | b25c9da19889e33bb4ee2dff369fc46caa4543b0 (diff) |
ALSA: hda - Create beep mixer controls dynamically for Realtek codecs
Create beep mixer controls dynamically for Realtek codecs instead of
static arrays.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 147 |
1 files changed, 47 insertions, 100 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5194a58fafaa..3b3b483e2a91 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -255,6 +255,7 @@ struct alc_spec { | |||
255 | struct snd_kcontrol_new *mixers[5]; /* mixer arrays */ | 255 | struct snd_kcontrol_new *mixers[5]; /* mixer arrays */ |
256 | unsigned int num_mixers; | 256 | unsigned int num_mixers; |
257 | struct snd_kcontrol_new *cap_mixer; /* capture mixer */ | 257 | struct snd_kcontrol_new *cap_mixer; /* capture mixer */ |
258 | unsigned int beep_amp; /* beep amp value, set via set_beep_amp() */ | ||
258 | 259 | ||
259 | const struct hda_verb *init_verbs[5]; /* initialization verbs | 260 | const struct hda_verb *init_verbs[5]; /* initialization verbs |
260 | * don't forget NULL | 261 | * don't forget NULL |
@@ -937,7 +938,7 @@ static void alc_mic_automute(struct hda_codec *codec) | |||
937 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | 938 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); |
938 | } | 939 | } |
939 | #else | 940 | #else |
940 | #define alc_mic_automute(codec) /* NOP */ | 941 | #define alc_mic_automute(codec) do {} while(0) /* NOP */ |
941 | #endif /* disabled */ | 942 | #endif /* disabled */ |
942 | 943 | ||
943 | /* unsolicited event for HP jack sensing */ | 944 | /* unsolicited event for HP jack sensing */ |
@@ -1389,8 +1390,6 @@ static struct snd_kcontrol_new alc888_base_mixer[] = { | |||
1389 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 1390 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
1390 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 1391 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), |
1391 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 1392 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
1392 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
1393 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
1394 | { } /* end */ | 1393 | { } /* end */ |
1395 | }; | 1394 | }; |
1396 | 1395 | ||
@@ -1497,8 +1496,6 @@ static struct snd_kcontrol_new alc880_three_stack_mixer[] = { | |||
1497 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 1496 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
1498 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x3, HDA_INPUT), | 1497 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x3, HDA_INPUT), |
1499 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT), | 1498 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x3, HDA_INPUT), |
1500 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
1501 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
1502 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x19, 0x0, HDA_OUTPUT), | 1499 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x19, 0x0, HDA_OUTPUT), |
1503 | { | 1500 | { |
1504 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1501 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -1720,8 +1717,6 @@ static struct snd_kcontrol_new alc880_six_stack_mixer[] = { | |||
1720 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 1717 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
1721 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 1718 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
1722 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 1719 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
1723 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
1724 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
1725 | { | 1720 | { |
1726 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1721 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1727 | .name = "Channel Mode", | 1722 | .name = "Channel Mode", |
@@ -1898,13 +1893,6 @@ static struct snd_kcontrol_new alc880_asus_w1v_mixer[] = { | |||
1898 | { } /* end */ | 1893 | { } /* end */ |
1899 | }; | 1894 | }; |
1900 | 1895 | ||
1901 | /* additional mixers to alc880_asus_mixer */ | ||
1902 | static struct snd_kcontrol_new alc880_pcbeep_mixer[] = { | ||
1903 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
1904 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
1905 | { } /* end */ | ||
1906 | }; | ||
1907 | |||
1908 | /* TCL S700 */ | 1896 | /* TCL S700 */ |
1909 | static struct snd_kcontrol_new alc880_tcl_s700_mixer[] = { | 1897 | static struct snd_kcontrol_new alc880_tcl_s700_mixer[] = { |
1910 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 1898 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
@@ -1937,8 +1925,6 @@ static struct snd_kcontrol_new alc880_uniwill_mixer[] = { | |||
1937 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 1925 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
1938 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 1926 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
1939 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 1927 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
1940 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
1941 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
1942 | { | 1928 | { |
1943 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1929 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1944 | .name = "Channel Mode", | 1930 | .name = "Channel Mode", |
@@ -2013,6 +1999,13 @@ static const char *alc_slave_sws[] = { | |||
2013 | 1999 | ||
2014 | static void alc_free_kctls(struct hda_codec *codec); | 2000 | static void alc_free_kctls(struct hda_codec *codec); |
2015 | 2001 | ||
2002 | /* additional beep mixers; the actual parameters are overwritten at build */ | ||
2003 | static struct snd_kcontrol_new alc_beep_mixer[] = { | ||
2004 | HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_INPUT), | ||
2005 | HDA_CODEC_MUTE("Beep Playback Switch", 0, 0, HDA_INPUT), | ||
2006 | { } /* end */ | ||
2007 | }; | ||
2008 | |||
2016 | static int alc_build_controls(struct hda_codec *codec) | 2009 | static int alc_build_controls(struct hda_codec *codec) |
2017 | { | 2010 | { |
2018 | struct alc_spec *spec = codec->spec; | 2011 | struct alc_spec *spec = codec->spec; |
@@ -2048,6 +2041,21 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2048 | return err; | 2041 | return err; |
2049 | } | 2042 | } |
2050 | 2043 | ||
2044 | /* create beep controls if needed */ | ||
2045 | if (spec->beep_amp) { | ||
2046 | struct snd_kcontrol_new *knew; | ||
2047 | for (knew = alc_beep_mixer; knew->name; knew++) { | ||
2048 | struct snd_kcontrol *kctl; | ||
2049 | kctl = snd_ctl_new1(knew, codec); | ||
2050 | if (!kctl) | ||
2051 | return -ENOMEM; | ||
2052 | kctl->private_value = spec->beep_amp; | ||
2053 | err = snd_hda_ctl_add(codec, kctl); | ||
2054 | if (err < 0) | ||
2055 | return err; | ||
2056 | } | ||
2057 | } | ||
2058 | |||
2051 | /* if we have no master control, let's create it */ | 2059 | /* if we have no master control, let's create it */ |
2052 | if (!spec->no_analog && | 2060 | if (!spec->no_analog && |
2053 | !snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) { | 2061 | !snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) { |
@@ -3812,7 +3820,7 @@ static struct alc_config_preset alc880_presets[] = { | |||
3812 | .input_mux = &alc880_capture_source, | 3820 | .input_mux = &alc880_capture_source, |
3813 | }, | 3821 | }, |
3814 | [ALC880_UNIWILL_DIG] = { | 3822 | [ALC880_UNIWILL_DIG] = { |
3815 | .mixers = { alc880_asus_mixer, alc880_pcbeep_mixer }, | 3823 | .mixers = { alc880_asus_mixer }, |
3816 | .init_verbs = { alc880_volume_init_verbs, | 3824 | .init_verbs = { alc880_volume_init_verbs, |
3817 | alc880_pin_asus_init_verbs }, | 3825 | alc880_pin_asus_init_verbs }, |
3818 | .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids), | 3826 | .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids), |
@@ -3850,8 +3858,7 @@ static struct alc_config_preset alc880_presets[] = { | |||
3850 | .init_hook = alc880_uniwill_p53_hp_automute, | 3858 | .init_hook = alc880_uniwill_p53_hp_automute, |
3851 | }, | 3859 | }, |
3852 | [ALC880_FUJITSU] = { | 3860 | [ALC880_FUJITSU] = { |
3853 | .mixers = { alc880_fujitsu_mixer, | 3861 | .mixers = { alc880_fujitsu_mixer }, |
3854 | alc880_pcbeep_mixer, }, | ||
3855 | .init_verbs = { alc880_volume_init_verbs, | 3862 | .init_verbs = { alc880_volume_init_verbs, |
3856 | alc880_uniwill_p53_init_verbs, | 3863 | alc880_uniwill_p53_init_verbs, |
3857 | alc880_beep_init_verbs }, | 3864 | alc880_beep_init_verbs }, |
@@ -4310,10 +4317,6 @@ static void alc880_auto_init(struct hda_codec *codec) | |||
4310 | alc_inithook(codec); | 4317 | alc_inithook(codec); |
4311 | } | 4318 | } |
4312 | 4319 | ||
4313 | /* | ||
4314 | * OK, here we have finally the patch for ALC880 | ||
4315 | */ | ||
4316 | |||
4317 | static void set_capture_mixer(struct alc_spec *spec) | 4320 | static void set_capture_mixer(struct alc_spec *spec) |
4318 | { | 4321 | { |
4319 | static struct snd_kcontrol_new *caps[3] = { | 4322 | static struct snd_kcontrol_new *caps[3] = { |
@@ -4325,6 +4328,13 @@ static void set_capture_mixer(struct alc_spec *spec) | |||
4325 | spec->cap_mixer = caps[spec->num_adc_nids - 1]; | 4328 | spec->cap_mixer = caps[spec->num_adc_nids - 1]; |
4326 | } | 4329 | } |
4327 | 4330 | ||
4331 | #define set_beep_amp(spec, nid, idx, dir) \ | ||
4332 | ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir)) | ||
4333 | |||
4334 | /* | ||
4335 | * OK, here we have finally the patch for ALC880 | ||
4336 | */ | ||
4337 | |||
4328 | static int patch_alc880(struct hda_codec *codec) | 4338 | static int patch_alc880(struct hda_codec *codec) |
4329 | { | 4339 | { |
4330 | struct alc_spec *spec; | 4340 | struct alc_spec *spec; |
@@ -4392,6 +4402,7 @@ static int patch_alc880(struct hda_codec *codec) | |||
4392 | } | 4402 | } |
4393 | } | 4403 | } |
4394 | set_capture_mixer(spec); | 4404 | set_capture_mixer(spec); |
4405 | set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); | ||
4395 | 4406 | ||
4396 | spec->vmaster_nid = 0x0c; | 4407 | spec->vmaster_nid = 0x0c; |
4397 | 4408 | ||
@@ -4541,12 +4552,6 @@ static struct snd_kcontrol_new alc260_input_mixer[] = { | |||
4541 | { } /* end */ | 4552 | { } /* end */ |
4542 | }; | 4553 | }; |
4543 | 4554 | ||
4544 | static struct snd_kcontrol_new alc260_pc_beep_mixer[] = { | ||
4545 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x07, 0x05, HDA_INPUT), | ||
4546 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x07, 0x05, HDA_INPUT), | ||
4547 | { } /* end */ | ||
4548 | }; | ||
4549 | |||
4550 | /* update HP, line and mono out pins according to the master switch */ | 4555 | /* update HP, line and mono out pins according to the master switch */ |
4551 | static void alc260_hp_master_update(struct hda_codec *codec, | 4556 | static void alc260_hp_master_update(struct hda_codec *codec, |
4552 | hda_nid_t hp, hda_nid_t line, | 4557 | hda_nid_t hp, hda_nid_t line, |
@@ -4738,8 +4743,6 @@ static struct snd_kcontrol_new alc260_fujitsu_mixer[] = { | |||
4738 | HDA_CODEC_VOLUME("Mic/Line Playback Volume", 0x07, 0x0, HDA_INPUT), | 4743 | HDA_CODEC_VOLUME("Mic/Line Playback Volume", 0x07, 0x0, HDA_INPUT), |
4739 | HDA_CODEC_MUTE("Mic/Line Playback Switch", 0x07, 0x0, HDA_INPUT), | 4744 | HDA_CODEC_MUTE("Mic/Line Playback Switch", 0x07, 0x0, HDA_INPUT), |
4740 | ALC_PIN_MODE("Mic/Line Jack Mode", 0x12, ALC_PIN_DIR_IN), | 4745 | ALC_PIN_MODE("Mic/Line Jack Mode", 0x12, ALC_PIN_DIR_IN), |
4741 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x07, 0x05, HDA_INPUT), | ||
4742 | HDA_CODEC_MUTE("Beep Playback Switch", 0x07, 0x05, HDA_INPUT), | ||
4743 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x09, 0x0, HDA_OUTPUT), | 4746 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x09, 0x0, HDA_OUTPUT), |
4744 | HDA_BIND_MUTE("Speaker Playback Switch", 0x09, 2, HDA_INPUT), | 4747 | HDA_BIND_MUTE("Speaker Playback Switch", 0x09, 2, HDA_INPUT), |
4745 | { } /* end */ | 4748 | { } /* end */ |
@@ -4784,8 +4787,6 @@ static struct snd_kcontrol_new alc260_acer_mixer[] = { | |||
4784 | HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT), | 4787 | HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT), |
4785 | HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT), | 4788 | HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT), |
4786 | ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT), | 4789 | ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT), |
4787 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x07, 0x05, HDA_INPUT), | ||
4788 | HDA_CODEC_MUTE("Beep Playback Switch", 0x07, 0x05, HDA_INPUT), | ||
4789 | { } /* end */ | 4790 | { } /* end */ |
4790 | }; | 4791 | }; |
4791 | 4792 | ||
@@ -4803,8 +4804,6 @@ static struct snd_kcontrol_new alc260_will_mixer[] = { | |||
4803 | ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT), | 4804 | ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT), |
4804 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), | 4805 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), |
4805 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), | 4806 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), |
4806 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x07, 0x05, HDA_INPUT), | ||
4807 | HDA_CODEC_MUTE("Beep Playback Switch", 0x07, 0x05, HDA_INPUT), | ||
4808 | { } /* end */ | 4807 | { } /* end */ |
4809 | }; | 4808 | }; |
4810 | 4809 | ||
@@ -5308,8 +5307,6 @@ static struct snd_kcontrol_new alc260_test_mixer[] = { | |||
5308 | HDA_CODEC_MUTE("LINE2 Playback Switch", 0x07, 0x03, HDA_INPUT), | 5307 | HDA_CODEC_MUTE("LINE2 Playback Switch", 0x07, 0x03, HDA_INPUT), |
5309 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), | 5308 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), |
5310 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), | 5309 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), |
5311 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x07, 0x05, HDA_INPUT), | ||
5312 | HDA_CODEC_MUTE("Beep Playback Switch", 0x07, 0x05, HDA_INPUT), | ||
5313 | HDA_CODEC_VOLUME("LINE-OUT loopback Playback Volume", 0x07, 0x06, HDA_INPUT), | 5310 | HDA_CODEC_VOLUME("LINE-OUT loopback Playback Volume", 0x07, 0x06, HDA_INPUT), |
5314 | HDA_CODEC_MUTE("LINE-OUT loopback Playback Switch", 0x07, 0x06, HDA_INPUT), | 5311 | HDA_CODEC_MUTE("LINE-OUT loopback Playback Switch", 0x07, 0x06, HDA_INPUT), |
5315 | HDA_CODEC_VOLUME("HP-OUT loopback Playback Volume", 0x07, 0x7, HDA_INPUT), | 5312 | HDA_CODEC_VOLUME("HP-OUT loopback Playback Volume", 0x07, 0x7, HDA_INPUT), |
@@ -5737,8 +5734,7 @@ static struct snd_pci_quirk alc260_cfg_tbl[] = { | |||
5737 | static struct alc_config_preset alc260_presets[] = { | 5734 | static struct alc_config_preset alc260_presets[] = { |
5738 | [ALC260_BASIC] = { | 5735 | [ALC260_BASIC] = { |
5739 | .mixers = { alc260_base_output_mixer, | 5736 | .mixers = { alc260_base_output_mixer, |
5740 | alc260_input_mixer, | 5737 | alc260_input_mixer }, |
5741 | alc260_pc_beep_mixer }, | ||
5742 | .init_verbs = { alc260_init_verbs }, | 5738 | .init_verbs = { alc260_init_verbs }, |
5743 | .num_dacs = ARRAY_SIZE(alc260_dac_nids), | 5739 | .num_dacs = ARRAY_SIZE(alc260_dac_nids), |
5744 | .dac_nids = alc260_dac_nids, | 5740 | .dac_nids = alc260_dac_nids, |
@@ -5924,6 +5920,7 @@ static int patch_alc260(struct hda_codec *codec) | |||
5924 | } | 5920 | } |
5925 | } | 5921 | } |
5926 | set_capture_mixer(spec); | 5922 | set_capture_mixer(spec); |
5923 | set_beep_amp(spec, 0x07, 0x05, HDA_INPUT); | ||
5927 | 5924 | ||
5928 | spec->vmaster_nid = 0x08; | 5925 | spec->vmaster_nid = 0x08; |
5929 | 5926 | ||
@@ -6095,8 +6092,6 @@ static struct snd_kcontrol_new alc882_base_mixer[] = { | |||
6095 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 6092 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
6096 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 6093 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), |
6097 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 6094 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
6098 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
6099 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
6100 | { } /* end */ | 6095 | { } /* end */ |
6101 | }; | 6096 | }; |
6102 | 6097 | ||
@@ -6123,8 +6118,6 @@ static struct snd_kcontrol_new alc882_w2jc_mixer[] = { | |||
6123 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 6118 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
6124 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 6119 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), |
6125 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 6120 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
6126 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
6127 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
6128 | { } /* end */ | 6121 | { } /* end */ |
6129 | }; | 6122 | }; |
6130 | 6123 | ||
@@ -6176,8 +6169,6 @@ static struct snd_kcontrol_new alc882_asus_a7m_mixer[] = { | |||
6176 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 6169 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
6177 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 6170 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), |
6178 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 6171 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
6179 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
6180 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
6181 | { } /* end */ | 6172 | { } /* end */ |
6182 | }; | 6173 | }; |
6183 | 6174 | ||
@@ -6286,8 +6277,10 @@ static struct snd_kcontrol_new alc882_macpro_mixer[] = { | |||
6286 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x18, 0x0, HDA_OUTPUT), | 6277 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x18, 0x0, HDA_OUTPUT), |
6287 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), | 6278 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), |
6288 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), | 6279 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), |
6280 | /* FIXME: this looks suspicious... | ||
6289 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x02, HDA_INPUT), | 6281 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x02, HDA_INPUT), |
6290 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x02, HDA_INPUT), | 6282 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x02, HDA_INPUT), |
6283 | */ | ||
6291 | { } /* end */ | 6284 | { } /* end */ |
6292 | }; | 6285 | }; |
6293 | 6286 | ||
@@ -7153,6 +7146,7 @@ static int patch_alc882(struct hda_codec *codec) | |||
7153 | } | 7146 | } |
7154 | } | 7147 | } |
7155 | set_capture_mixer(spec); | 7148 | set_capture_mixer(spec); |
7149 | set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); | ||
7156 | 7150 | ||
7157 | spec->vmaster_nid = 0x0c; | 7151 | spec->vmaster_nid = 0x0c; |
7158 | 7152 | ||
@@ -7429,8 +7423,6 @@ static struct snd_kcontrol_new alc883_base_mixer[] = { | |||
7429 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 7423 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
7430 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 7424 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), |
7431 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 7425 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
7432 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
7433 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
7434 | { } /* end */ | 7426 | { } /* end */ |
7435 | }; | 7427 | }; |
7436 | 7428 | ||
@@ -7493,8 +7485,6 @@ static struct snd_kcontrol_new alc883_3ST_2ch_mixer[] = { | |||
7493 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 7485 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
7494 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 7486 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), |
7495 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 7487 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
7496 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
7497 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
7498 | { } /* end */ | 7488 | { } /* end */ |
7499 | }; | 7489 | }; |
7500 | 7490 | ||
@@ -7518,8 +7508,6 @@ static struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = { | |||
7518 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 7508 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
7519 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 7509 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), |
7520 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 7510 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
7521 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
7522 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
7523 | { } /* end */ | 7511 | { } /* end */ |
7524 | }; | 7512 | }; |
7525 | 7513 | ||
@@ -7544,8 +7532,6 @@ static struct snd_kcontrol_new alc883_3ST_6ch_intel_mixer[] = { | |||
7544 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 7532 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
7545 | HDA_CODEC_VOLUME("Front Mic Boost", 0x18, 0, HDA_INPUT), | 7533 | HDA_CODEC_VOLUME("Front Mic Boost", 0x18, 0, HDA_INPUT), |
7546 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 7534 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
7547 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
7548 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
7549 | { } /* end */ | 7535 | { } /* end */ |
7550 | }; | 7536 | }; |
7551 | 7537 | ||
@@ -7569,8 +7555,6 @@ static struct snd_kcontrol_new alc883_fivestack_mixer[] = { | |||
7569 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 7555 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
7570 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 7556 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), |
7571 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 7557 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
7572 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
7573 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
7574 | { } /* end */ | 7558 | { } /* end */ |
7575 | }; | 7559 | }; |
7576 | 7560 | ||
@@ -9183,6 +9167,7 @@ static int patch_alc883(struct hda_codec *codec) | |||
9183 | 9167 | ||
9184 | if (!spec->cap_mixer) | 9168 | if (!spec->cap_mixer) |
9185 | set_capture_mixer(spec); | 9169 | set_capture_mixer(spec); |
9170 | set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); | ||
9186 | 9171 | ||
9187 | spec->vmaster_nid = 0x0c; | 9172 | spec->vmaster_nid = 0x0c; |
9188 | 9173 | ||
@@ -9235,8 +9220,6 @@ static struct snd_kcontrol_new alc262_base_mixer[] = { | |||
9235 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 9220 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
9236 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 9221 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
9237 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 9222 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), |
9238 | /* HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
9239 | HDA_CODEC_MUTE("PC Beep Playback Switch", 0x0b, 0x05, HDA_INPUT), */ | ||
9240 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT), | 9223 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT), |
9241 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 9224 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
9242 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | 9225 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), |
@@ -9257,8 +9240,6 @@ static struct snd_kcontrol_new alc262_hippo1_mixer[] = { | |||
9257 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 9240 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
9258 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 9241 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
9259 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 9242 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), |
9260 | /* HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
9261 | HDA_CODEC_MUTE("PC Beep Playback Switch", 0x0b, 0x05, HDA_INPUT), */ | ||
9262 | /*HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT),*/ | 9243 | /*HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT),*/ |
9263 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 9244 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), |
9264 | { } /* end */ | 9245 | { } /* end */ |
@@ -9367,8 +9348,6 @@ static struct snd_kcontrol_new alc262_HP_BPC_mixer[] = { | |||
9367 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 9348 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
9368 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 9349 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
9369 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 9350 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
9370 | HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
9371 | HDA_CODEC_MUTE("PC Beep Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
9372 | HDA_CODEC_VOLUME("AUX IN Playback Volume", 0x0b, 0x06, HDA_INPUT), | 9351 | HDA_CODEC_VOLUME("AUX IN Playback Volume", 0x0b, 0x06, HDA_INPUT), |
9373 | HDA_CODEC_MUTE("AUX IN Playback Switch", 0x0b, 0x06, HDA_INPUT), | 9352 | HDA_CODEC_MUTE("AUX IN Playback Switch", 0x0b, 0x06, HDA_INPUT), |
9374 | { } /* end */ | 9353 | { } /* end */ |
@@ -9397,8 +9376,6 @@ static struct snd_kcontrol_new alc262_HP_BPC_WildWest_mixer[] = { | |||
9397 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), | 9376 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), |
9398 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 9377 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
9399 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 9378 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
9400 | HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
9401 | HDA_CODEC_MUTE("PC Beep Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
9402 | { } /* end */ | 9379 | { } /* end */ |
9403 | }; | 9380 | }; |
9404 | 9381 | ||
@@ -10073,8 +10050,6 @@ static struct snd_kcontrol_new alc262_fujitsu_mixer[] = { | |||
10073 | }, | 10050 | }, |
10074 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 10051 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
10075 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 10052 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
10076 | HDA_CODEC_VOLUME("PC Speaker Volume", 0x0b, 0x05, HDA_INPUT), | ||
10077 | HDA_CODEC_MUTE("PC Speaker Switch", 0x0b, 0x05, HDA_INPUT), | ||
10078 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 10053 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), |
10079 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 10054 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
10080 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 10055 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
@@ -11085,6 +11060,7 @@ static int patch_alc262(struct hda_codec *codec) | |||
11085 | } | 11060 | } |
11086 | if (!spec->cap_mixer && !spec->no_analog) | 11061 | if (!spec->cap_mixer && !spec->no_analog) |
11087 | set_capture_mixer(spec); | 11062 | set_capture_mixer(spec); |
11063 | set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); | ||
11088 | 11064 | ||
11089 | spec->vmaster_nid = 0x0c; | 11065 | spec->vmaster_nid = 0x0c; |
11090 | 11066 | ||
@@ -12205,8 +12181,6 @@ static struct snd_kcontrol_new alc269_base_mixer[] = { | |||
12205 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 12181 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
12206 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 12182 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
12207 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 12183 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
12208 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x4, HDA_INPUT), | ||
12209 | HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x4, HDA_INPUT), | ||
12210 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 12184 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), |
12211 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 12185 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
12212 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 12186 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
@@ -12233,8 +12207,6 @@ static struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = { | |||
12233 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 12207 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
12234 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 12208 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
12235 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT), | 12209 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT), |
12236 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
12237 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
12238 | { } | 12210 | { } |
12239 | }; | 12211 | }; |
12240 | 12212 | ||
@@ -12258,8 +12230,6 @@ static struct snd_kcontrol_new alc269_lifebook_mixer[] = { | |||
12258 | HDA_CODEC_VOLUME("Dock Mic Playback Volume", 0x0b, 0x03, HDA_INPUT), | 12230 | HDA_CODEC_VOLUME("Dock Mic Playback Volume", 0x0b, 0x03, HDA_INPUT), |
12259 | HDA_CODEC_MUTE("Dock Mic Playback Switch", 0x0b, 0x03, HDA_INPUT), | 12231 | HDA_CODEC_MUTE("Dock Mic Playback Switch", 0x0b, 0x03, HDA_INPUT), |
12260 | HDA_CODEC_VOLUME("Dock Mic Boost", 0x1b, 0, HDA_INPUT), | 12232 | HDA_CODEC_VOLUME("Dock Mic Boost", 0x1b, 0, HDA_INPUT), |
12261 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
12262 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
12263 | { } | 12233 | { } |
12264 | }; | 12234 | }; |
12265 | 12235 | ||
@@ -12296,13 +12266,6 @@ static struct snd_kcontrol_new alc269_fujitsu_mixer[] = { | |||
12296 | { } /* end */ | 12266 | { } /* end */ |
12297 | }; | 12267 | }; |
12298 | 12268 | ||
12299 | /* beep control */ | ||
12300 | static struct snd_kcontrol_new alc269_beep_mixer[] = { | ||
12301 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x4, HDA_INPUT), | ||
12302 | HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x4, HDA_INPUT), | ||
12303 | { } /* end */ | ||
12304 | }; | ||
12305 | |||
12306 | static struct hda_verb alc269_quanta_fl1_verbs[] = { | 12269 | static struct hda_verb alc269_quanta_fl1_verbs[] = { |
12307 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, | 12270 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, |
12308 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | 12271 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, |
@@ -12749,13 +12712,6 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
12749 | if (spec->kctls.list) | 12712 | if (spec->kctls.list) |
12750 | add_mixer(spec, spec->kctls.list); | 12713 | add_mixer(spec, spec->kctls.list); |
12751 | 12714 | ||
12752 | /* create a beep mixer control if the pin 0x1d isn't assigned */ | ||
12753 | for (i = 0; i < ARRAY_SIZE(spec->autocfg.input_pins); i++) | ||
12754 | if (spec->autocfg.input_pins[i] == 0x1d) | ||
12755 | break; | ||
12756 | if (i >= ARRAY_SIZE(spec->autocfg.input_pins)) | ||
12757 | add_mixer(spec, alc269_beep_mixer); | ||
12758 | |||
12759 | add_verb(spec, alc269_init_verbs); | 12715 | add_verb(spec, alc269_init_verbs); |
12760 | spec->num_mux_defs = 1; | 12716 | spec->num_mux_defs = 1; |
12761 | spec->input_mux = &spec->private_imux[0]; | 12717 | spec->input_mux = &spec->private_imux[0]; |
@@ -12868,7 +12824,7 @@ static struct alc_config_preset alc269_presets[] = { | |||
12868 | .init_hook = alc269_eeepc_dmic_inithook, | 12824 | .init_hook = alc269_eeepc_dmic_inithook, |
12869 | }, | 12825 | }, |
12870 | [ALC269_FUJITSU] = { | 12826 | [ALC269_FUJITSU] = { |
12871 | .mixers = { alc269_fujitsu_mixer, alc269_beep_mixer }, | 12827 | .mixers = { alc269_fujitsu_mixer }, |
12872 | .cap_mixer = alc269_epc_capture_mixer, | 12828 | .cap_mixer = alc269_epc_capture_mixer, |
12873 | .init_verbs = { alc269_init_verbs, | 12829 | .init_verbs = { alc269_init_verbs, |
12874 | alc269_eeepc_dmic_init_verbs }, | 12830 | alc269_eeepc_dmic_init_verbs }, |
@@ -12955,6 +12911,7 @@ static int patch_alc269(struct hda_codec *codec) | |||
12955 | spec->capsrc_nids = alc269_capsrc_nids; | 12911 | spec->capsrc_nids = alc269_capsrc_nids; |
12956 | if (!spec->cap_mixer) | 12912 | if (!spec->cap_mixer) |
12957 | set_capture_mixer(spec); | 12913 | set_capture_mixer(spec); |
12914 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); | ||
12958 | 12915 | ||
12959 | codec->patch_ops = alc_patch_ops; | 12916 | codec->patch_ops = alc_patch_ops; |
12960 | if (board_config == ALC269_AUTO) | 12917 | if (board_config == ALC269_AUTO) |
@@ -13205,8 +13162,6 @@ static struct snd_kcontrol_new alc861_asus_mixer[] = { | |||
13205 | static struct snd_kcontrol_new alc861_asus_laptop_mixer[] = { | 13162 | static struct snd_kcontrol_new alc861_asus_laptop_mixer[] = { |
13206 | HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_INPUT), | 13163 | HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_INPUT), |
13207 | HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_INPUT), | 13164 | HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_INPUT), |
13208 | HDA_CODEC_VOLUME("PC Beep Playback Volume", 0x23, 0x0, HDA_OUTPUT), | ||
13209 | HDA_CODEC_MUTE("PC Beep Playback Switch", 0x23, 0x0, HDA_OUTPUT), | ||
13210 | { } | 13165 | { } |
13211 | }; | 13166 | }; |
13212 | 13167 | ||
@@ -14049,6 +14004,8 @@ static int patch_alc861(struct hda_codec *codec) | |||
14049 | spec->stream_digital_playback = &alc861_pcm_digital_playback; | 14004 | spec->stream_digital_playback = &alc861_pcm_digital_playback; |
14050 | spec->stream_digital_capture = &alc861_pcm_digital_capture; | 14005 | spec->stream_digital_capture = &alc861_pcm_digital_capture; |
14051 | 14006 | ||
14007 | set_beep_amp(spec, 0x23, 0, HDA_OUTPUT); | ||
14008 | |||
14052 | spec->vmaster_nid = 0x03; | 14009 | spec->vmaster_nid = 0x03; |
14053 | 14010 | ||
14054 | codec->patch_ops = alc_patch_ops; | 14011 | codec->patch_ops = alc_patch_ops; |
@@ -14205,9 +14162,6 @@ static struct snd_kcontrol_new alc861vd_6st_mixer[] = { | |||
14205 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 14162 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
14206 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 14163 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
14207 | 14164 | ||
14208 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
14209 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
14210 | |||
14211 | { } /* end */ | 14165 | { } /* end */ |
14212 | }; | 14166 | }; |
14213 | 14167 | ||
@@ -14231,9 +14185,6 @@ static struct snd_kcontrol_new alc861vd_3st_mixer[] = { | |||
14231 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 14185 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
14232 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 14186 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
14233 | 14187 | ||
14234 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
14235 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
14236 | |||
14237 | { } /* end */ | 14188 | { } /* end */ |
14238 | }; | 14189 | }; |
14239 | 14190 | ||
@@ -14272,8 +14223,6 @@ static struct snd_kcontrol_new alc861vd_dallas_mixer[] = { | |||
14272 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 14223 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), |
14273 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 14224 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
14274 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 14225 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
14275 | HDA_CODEC_VOLUME("PC Beep Volume", 0x0b, 0x05, HDA_INPUT), | ||
14276 | HDA_CODEC_MUTE("PC Beep Switch", 0x0b, 0x05, HDA_INPUT), | ||
14277 | { } /* end */ | 14226 | { } /* end */ |
14278 | }; | 14227 | }; |
14279 | 14228 | ||
@@ -15015,6 +14964,7 @@ static int patch_alc861vd(struct hda_codec *codec) | |||
15015 | spec->capture_style = CAPT_MIX; | 14964 | spec->capture_style = CAPT_MIX; |
15016 | 14965 | ||
15017 | set_capture_mixer(spec); | 14966 | set_capture_mixer(spec); |
14967 | set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); | ||
15018 | 14968 | ||
15019 | spec->vmaster_nid = 0x02; | 14969 | spec->vmaster_nid = 0x02; |
15020 | 14970 | ||
@@ -15203,8 +15153,6 @@ static struct snd_kcontrol_new alc662_3ST_2ch_mixer[] = { | |||
15203 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 15153 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
15204 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 15154 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
15205 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 15155 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
15206 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
15207 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
15208 | { } /* end */ | 15156 | { } /* end */ |
15209 | }; | 15157 | }; |
15210 | 15158 | ||
@@ -15226,8 +15174,6 @@ static struct snd_kcontrol_new alc662_3ST_6ch_mixer[] = { | |||
15226 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 15174 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
15227 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 15175 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
15228 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 15176 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
15229 | HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
15230 | HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
15231 | { } /* end */ | 15177 | { } /* end */ |
15232 | }; | 15178 | }; |
15233 | 15179 | ||
@@ -16832,6 +16778,7 @@ static int patch_alc662(struct hda_codec *codec) | |||
16832 | 16778 | ||
16833 | if (!spec->cap_mixer) | 16779 | if (!spec->cap_mixer) |
16834 | set_capture_mixer(spec); | 16780 | set_capture_mixer(spec); |
16781 | set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); | ||
16835 | 16782 | ||
16836 | spec->vmaster_nid = 0x02; | 16783 | spec->vmaster_nid = 0x02; |
16837 | 16784 | ||