diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e8cbe216e912..3a8371990d75 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -411,6 +411,8 @@ static int alc_mux_enum_info(struct snd_kcontrol *kcontrol, | |||
411 | unsigned int mux_idx = snd_ctl_get_ioffidx(kcontrol, &uinfo->id); | 411 | unsigned int mux_idx = snd_ctl_get_ioffidx(kcontrol, &uinfo->id); |
412 | if (mux_idx >= spec->num_mux_defs) | 412 | if (mux_idx >= spec->num_mux_defs) |
413 | mux_idx = 0; | 413 | mux_idx = 0; |
414 | if (!spec->input_mux[mux_idx].num_items && mux_idx > 0) | ||
415 | mux_idx = 0; | ||
414 | return snd_hda_input_mux_info(&spec->input_mux[mux_idx], uinfo); | 416 | return snd_hda_input_mux_info(&spec->input_mux[mux_idx], uinfo); |
415 | } | 417 | } |
416 | 418 | ||
@@ -439,6 +441,8 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
439 | 441 | ||
440 | mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; | 442 | mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; |
441 | imux = &spec->input_mux[mux_idx]; | 443 | imux = &spec->input_mux[mux_idx]; |
444 | if (!imux->num_items && mux_idx > 0) | ||
445 | imux = &spec->input_mux[0]; | ||
442 | 446 | ||
443 | type = get_wcaps_type(get_wcaps(codec, nid)); | 447 | type = get_wcaps_type(get_wcaps(codec, nid)); |
444 | if (type == AC_WID_AUD_MIX) { | 448 | if (type == AC_WID_AUD_MIX) { |
@@ -4915,7 +4919,7 @@ static void fixup_automic_adc(struct hda_codec *codec) | |||
4915 | static void fixup_single_adc(struct hda_codec *codec) | 4919 | static void fixup_single_adc(struct hda_codec *codec) |
4916 | { | 4920 | { |
4917 | struct alc_spec *spec = codec->spec; | 4921 | struct alc_spec *spec = codec->spec; |
4918 | hda_nid_t pin; | 4922 | hda_nid_t pin = 0; |
4919 | int i; | 4923 | int i; |
4920 | 4924 | ||
4921 | /* search for the input pin; there must be only one */ | 4925 | /* search for the input pin; there must be only one */ |
@@ -10105,6 +10109,8 @@ static void alc882_auto_init_input_src(struct hda_codec *codec) | |||
10105 | continue; | 10109 | continue; |
10106 | mux_idx = c >= spec->num_mux_defs ? 0 : c; | 10110 | mux_idx = c >= spec->num_mux_defs ? 0 : c; |
10107 | imux = &spec->input_mux[mux_idx]; | 10111 | imux = &spec->input_mux[mux_idx]; |
10112 | if (!imux->num_items && mux_idx > 0) | ||
10113 | imux = &spec->input_mux[0]; | ||
10108 | for (idx = 0; idx < conns; idx++) { | 10114 | for (idx = 0; idx < conns; idx++) { |
10109 | /* if the current connection is the selected one, | 10115 | /* if the current connection is the selected one, |
10110 | * unmute it as default - otherwise mute it | 10116 | * unmute it as default - otherwise mute it |
@@ -13201,7 +13207,7 @@ static int patch_alc268(struct hda_codec *codec) | |||
13201 | 13207 | ||
13202 | if (board_config < 0 || board_config >= ALC268_MODEL_LAST) | 13208 | if (board_config < 0 || board_config >= ALC268_MODEL_LAST) |
13203 | board_config = snd_hda_check_board_codec_sid_config(codec, | 13209 | board_config = snd_hda_check_board_codec_sid_config(codec, |
13204 | ALC882_MODEL_LAST, alc268_models, alc268_ssid_cfg_tbl); | 13210 | ALC268_MODEL_LAST, alc268_models, alc268_ssid_cfg_tbl); |
13205 | 13211 | ||
13206 | if (board_config < 0 || board_config >= ALC268_MODEL_LAST) { | 13212 | if (board_config < 0 || board_config >= ALC268_MODEL_LAST) { |
13207 | printk(KERN_INFO "hda_codec: %s: BIOS auto-probing.\n", | 13213 | printk(KERN_INFO "hda_codec: %s: BIOS auto-probing.\n", |
@@ -13561,6 +13567,8 @@ static void alc269_lifebook_unsol_event(struct hda_codec *codec, | |||
13561 | static void alc269_quanta_fl1_setup(struct hda_codec *codec) | 13567 | static void alc269_quanta_fl1_setup(struct hda_codec *codec) |
13562 | { | 13568 | { |
13563 | struct alc_spec *spec = codec->spec; | 13569 | struct alc_spec *spec = codec->spec; |
13570 | spec->autocfg.hp_pins[0] = 0x15; | ||
13571 | spec->autocfg.speaker_pins[0] = 0x14; | ||
13564 | spec->ext_mic.pin = 0x18; | 13572 | spec->ext_mic.pin = 0x18; |
13565 | spec->ext_mic.mux_idx = 0; | 13573 | spec->ext_mic.mux_idx = 0; |
13566 | spec->int_mic.pin = 0x19; | 13574 | spec->int_mic.pin = 0x19; |
@@ -13656,6 +13664,8 @@ static void alc269_laptop_unsol_event(struct hda_codec *codec, | |||
13656 | static void alc269_laptop_dmic_setup(struct hda_codec *codec) | 13664 | static void alc269_laptop_dmic_setup(struct hda_codec *codec) |
13657 | { | 13665 | { |
13658 | struct alc_spec *spec = codec->spec; | 13666 | struct alc_spec *spec = codec->spec; |
13667 | spec->autocfg.hp_pins[0] = 0x15; | ||
13668 | spec->autocfg.speaker_pins[0] = 0x14; | ||
13659 | spec->ext_mic.pin = 0x18; | 13669 | spec->ext_mic.pin = 0x18; |
13660 | spec->ext_mic.mux_idx = 0; | 13670 | spec->ext_mic.mux_idx = 0; |
13661 | spec->int_mic.pin = 0x12; | 13671 | spec->int_mic.pin = 0x12; |
@@ -13666,6 +13676,8 @@ static void alc269_laptop_dmic_setup(struct hda_codec *codec) | |||
13666 | static void alc269vb_laptop_dmic_setup(struct hda_codec *codec) | 13676 | static void alc269vb_laptop_dmic_setup(struct hda_codec *codec) |
13667 | { | 13677 | { |
13668 | struct alc_spec *spec = codec->spec; | 13678 | struct alc_spec *spec = codec->spec; |
13679 | spec->autocfg.hp_pins[0] = 0x15; | ||
13680 | spec->autocfg.speaker_pins[0] = 0x14; | ||
13669 | spec->ext_mic.pin = 0x18; | 13681 | spec->ext_mic.pin = 0x18; |
13670 | spec->ext_mic.mux_idx = 0; | 13682 | spec->ext_mic.mux_idx = 0; |
13671 | spec->int_mic.pin = 0x12; | 13683 | spec->int_mic.pin = 0x12; |
@@ -13676,6 +13688,8 @@ static void alc269vb_laptop_dmic_setup(struct hda_codec *codec) | |||
13676 | static void alc269_laptop_amic_setup(struct hda_codec *codec) | 13688 | static void alc269_laptop_amic_setup(struct hda_codec *codec) |
13677 | { | 13689 | { |
13678 | struct alc_spec *spec = codec->spec; | 13690 | struct alc_spec *spec = codec->spec; |
13691 | spec->autocfg.hp_pins[0] = 0x15; | ||
13692 | spec->autocfg.speaker_pins[0] = 0x14; | ||
13679 | spec->ext_mic.pin = 0x18; | 13693 | spec->ext_mic.pin = 0x18; |
13680 | spec->ext_mic.mux_idx = 0; | 13694 | spec->ext_mic.mux_idx = 0; |
13681 | spec->int_mic.pin = 0x19; | 13695 | spec->int_mic.pin = 0x19; |