Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157848
b: refs/heads/master
c: 5908589
h: refs/heads/master
v: v3
  • Loading branch information
Herton Ronaldo Krzesinski authored and Takashi Iwai committed Aug 12, 2009
1 parent fcbc03a commit 7e35f2a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f5d17062085ee1c74ff44a37ffb09f94ab4db1c
refs/heads/master: 5908589f318835f515bf94829650d36dcb2d9024
62 changes: 36 additions & 26 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -12232,32 +12232,40 @@ static int alc268_auto_create_analog_input_ctls(struct alc_spec *spec,
const struct auto_pin_cfg *cfg)
{
struct hda_input_mux *imux = &spec->private_imux[0];
int i, idx1;

for (i = 0; i < AUTO_PIN_LAST; i++) {
switch(cfg->input_pins[i]) {
case 0x18:
idx1 = 0; /* Mic 1 */
break;
case 0x19:
idx1 = 1; /* Mic 2 */
break;
case 0x1a:
idx1 = 2; /* Line In */
break;
case 0x1c:
idx1 = 3; /* CD */
break;
case 0x12:
case 0x13:
idx1 = 6; /* digital mics */
break;
default:
continue;
int i, idx1, dmic_nid;

dmic_nid = 0x12;
while (dmic_nid <= 0x13) {
for (i = 0; i < AUTO_PIN_LAST; i++) {
switch (cfg->input_pins[i]) {
case 0x18:
idx1 = 0; /* Mic 1 */
break;
case 0x19:
idx1 = 1; /* Mic 2 */
break;
case 0x1a:
idx1 = 2; /* Line In */
break;
case 0x1c:
idx1 = 3; /* CD */
break;
case 0x12:
case 0x13:
if (cfg->input_pins[i] != dmic_nid)
continue;
idx1 = 6; /* digital mics */
break;
default:
continue;
}
imux->items[imux->num_items].label =
auto_pin_cfg_labels[i];
imux->items[imux->num_items].index = idx1;
imux->num_items++;
}
imux->items[imux->num_items].label = auto_pin_cfg_labels[i];
imux->items[imux->num_items].index = idx1;
imux->num_items++;
imux++;
dmic_nid++;
}
return 0;
}
Expand Down Expand Up @@ -12355,7 +12363,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
add_mixer(spec, alc268_beep_mixer);

add_verb(spec, alc268_volume_init_verbs);
spec->num_mux_defs = 1;
spec->num_mux_defs = 2;
spec->input_mux = &spec->private_imux[0];

err = alc_auto_add_mic_boost(codec);
Expand Down Expand Up @@ -12665,6 +12673,8 @@ static int patch_alc268(struct hda_codec *codec)
for (i = 0; i < spec->num_adc_nids; i++)
snd_hda_codec_write_cache(codec, alc268_capsrc_nids[i],
0, AC_VERB_SET_CONNECT_SEL,
i < spec->num_mux_defs ?
spec->input_mux[i].items[0].index :
spec->input_mux->items[0].index);
}

Expand Down

0 comments on commit 7e35f2a

Please sign in to comment.