Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353161
b: refs/heads/master
c: a5cc250
h: refs/heads/master
i:
  353159: 9194b04
v: v3
  • Loading branch information
Takashi Iwai committed Jan 16, 2013
1 parent 3e33d9d commit 98825f7
Show file tree
Hide file tree
Showing 8 changed files with 6,776 additions and 2,838 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: f6655d52a36ccb27e1cf918dfa7221923964ab21
refs/heads/master: a5cc25091c61bb8b4a4bb98207eeb7d0cf312e1c
4 changes: 0 additions & 4 deletions trunk/sound/pci/hda/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ config SND_HDA_CODEC_REALTEK
config SND_HDA_CODEC_ANALOG
bool "Build Analog Device HD-audio codec support"
default y
select SND_HDA_GENERIC
help
Say Y here to include Analog Device HD-audio codec support in
snd-hda-intel driver, such as AD1986A.
Expand All @@ -124,7 +123,6 @@ config SND_HDA_CODEC_SIGMATEL
config SND_HDA_CODEC_VIA
bool "Build VIA HD-audio codec support"
default y
select SND_HDA_GENERIC
help
Say Y here to include VIA HD-audio codec support in
snd-hda-intel driver, such as VT1708.
Expand All @@ -151,7 +149,6 @@ config SND_HDA_CODEC_HDMI
config SND_HDA_CODEC_CIRRUS
bool "Build Cirrus Logic codec support"
default y
select SND_HDA_GENERIC
help
Say Y here to include Cirrus Logic codec support in
snd-hda-intel driver, such as CS4206.
Expand All @@ -164,7 +161,6 @@ config SND_HDA_CODEC_CIRRUS
config SND_HDA_CODEC_CONEXANT
bool "Build Conexant HD-audio codec support"
default y
select SND_HDA_GENERIC
help
Say Y here to include Conexant HD-audio codec support in
snd-hda-intel driver, such as CX20549.
Expand Down
29 changes: 23 additions & 6 deletions trunk/sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,8 @@ get_multiio_path(struct hda_codec *codec, int idx)
spec->out_paths[spec->autocfg.line_outs + idx]);
}

static void update_automute_all(struct hda_codec *codec);

static int set_multi_io(struct hda_codec *codec, int idx, bool output)
{
struct hda_gen_spec *spec = codec->spec;
Expand All @@ -1850,9 +1852,7 @@ static int set_multi_io(struct hda_codec *codec, int idx, bool output)
}

/* update jack retasking in case it modifies any of them */
snd_hda_gen_hp_automute(codec, NULL);
snd_hda_gen_line_automute(codec, NULL);
snd_hda_gen_mic_autoswitch(codec, NULL);
update_automute_all(codec);

return 0;
}
Expand Down Expand Up @@ -3131,6 +3131,25 @@ void snd_hda_gen_mic_autoswitch(struct hda_codec *codec, struct hda_jack_tbl *ja
}
EXPORT_SYMBOL_HDA(snd_hda_gen_mic_autoswitch);

/* update jack retasking */
static void update_automute_all(struct hda_codec *codec)
{
struct hda_gen_spec *spec = codec->spec;

if (spec->hp_automute_hook)
spec->hp_automute_hook(codec, NULL);
else
snd_hda_gen_hp_automute(codec, NULL);
if (spec->line_automute_hook)
spec->line_automute_hook(codec, NULL);
else
snd_hda_gen_line_automute(codec, NULL);
if (spec->mic_autoswitch_hook)
spec->mic_autoswitch_hook(codec, NULL);
else
snd_hda_gen_mic_autoswitch(codec, NULL);
}

/*
* Auto-Mute mode mixer enum support
*/
Expand Down Expand Up @@ -4281,9 +4300,7 @@ int snd_hda_gen_init(struct hda_codec *codec)
clear_unsol_on_unused_pins(codec);

/* call init functions of standard auto-mute helpers */
snd_hda_gen_hp_automute(codec, NULL);
snd_hda_gen_line_automute(codec, NULL);
snd_hda_gen_mic_autoswitch(codec, NULL);
update_automute_all(codec);

snd_hda_codec_flush_amp_cache(codec);
snd_hda_codec_flush_cmd_cache(codec);
Expand Down
Loading

0 comments on commit 98825f7

Please sign in to comment.