Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353136
b: refs/heads/master
c: ae177c3
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 14, 2013
1 parent 4e4df40 commit f9609ce
Show file tree
Hide file tree
Showing 8 changed files with 5,696 additions and 881 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: b3f6008f2d511133e0f04782c437a13b6865d26b
refs/heads/master: ae177c3fd0667df21b60bc8e031607de257e58e4
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
16 changes: 15 additions & 1 deletion trunk/sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2517,9 +2517,23 @@ static const struct snd_kcontrol_new cap_vol_temp = {
static int cap_sw_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
return cap_put_caller(kcontrol, ucontrol,
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct hda_gen_spec *spec = codec->spec;
int ret;

ret = cap_put_caller(kcontrol, ucontrol,
snd_hda_mixer_amp_switch_put,
NID_PATH_MUTE_CTL);
if (ret < 0)
return ret;

if (spec->capture_switch_hook) {
bool enable = (ucontrol->value.integer.value[0] ||
ucontrol->value.integer.value[1]);
spec->capture_switch_hook(codec, enable);
}

return ret;
}

static const struct snd_kcontrol_new cap_sw_temp = {
Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/pci/hda/hda_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ struct hda_gen_spec {
struct hda_jack_tbl *tbl);
void (*mic_autoswitch_hook)(struct hda_codec *codec,
struct hda_jack_tbl *tbl);

/* capture switch hook (for mic-mute LED) */
void (*capture_switch_hook)(struct hda_codec *codec, bool enable);
};

int snd_hda_gen_spec_init(struct hda_gen_spec *spec);
Expand Down
Loading

0 comments on commit f9609ce

Please sign in to comment.