Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353018
b: refs/heads/master
c: 3ebf1e9
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 12, 2013
1 parent 7bc365b commit 2dacae4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 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: 0250f7cbea95c90564253cae8de80f0caad81fc0
refs/heads/master: 3ebf1e940a3ffb05b6bd78190d6dc8389d1082ef
31 changes: 24 additions & 7 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -3952,9 +3952,6 @@ static void activate_path(struct hda_codec *codec, struct nid_path *path,
{
int i;

if (path->active == enable)
return;

if (!enable)
path->active = false;

Expand Down Expand Up @@ -3984,6 +3981,8 @@ static void alc_auto_set_output_and_unmute(struct hda_codec *codec,
path = get_nid_path(codec, dac, pin);
if (!path)
return;
if (path->active)
return;
activate_path(codec, path, true);
}

Expand Down Expand Up @@ -4193,10 +4192,8 @@ static int alc_set_multi_io(struct hda_codec *codec, int idx, bool output)
if (!path)
return -EINVAL;

if (!spec->multi_io[idx].ctl_in)
spec->multi_io[idx].ctl_in =
snd_hda_codec_update_cache(codec, nid, 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
if (path->active == output)
return 0;

if (output) {
snd_hda_set_pin_ctl_cache(codec, nid, PIN_OUT);
Expand Down Expand Up @@ -4251,6 +4248,25 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec)
return 0;
}

static void alc_auto_init_multi_io(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
int i;

for (i = 0; i < spec->multi_ios; i++) {
hda_nid_t pin = spec->multi_io[i].pin;
struct nid_path *path;
path = get_nid_path(codec, spec->multi_io[i].dac, pin);
if (!path)
continue;
if (!spec->multi_io[i].ctl_in)
spec->multi_io[i].ctl_in =
snd_hda_codec_update_cache(codec, pin, 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
activate_path(codec, path, path->active);
}
}

/* filter out invalid adc_nids (and capsrc_nids) that don't give all
* active input pins
*/
Expand Down Expand Up @@ -4489,6 +4505,7 @@ static void alc_auto_init_std(struct hda_codec *codec)
{
alc_auto_init_multi_out(codec);
alc_auto_init_extra_out(codec);
alc_auto_init_multi_io(codec);
alc_auto_init_analog_input(codec);
alc_auto_init_input_src(codec);
alc_auto_init_digital(codec);
Expand Down

0 comments on commit 2dacae4

Please sign in to comment.