diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index d839d567f8e4..f27e073d22b1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -7140,28 +7140,18 @@ static struct snd_kcontrol_new alc262_HP_BPC_WildWest_option_mixer[] = { | |||
7140 | { } /* end */ | 7140 | { } /* end */ |
7141 | }; | 7141 | }; |
7142 | 7142 | ||
7143 | static int alc262_sony_sw_put(struct snd_kcontrol *kcontrol, | 7143 | static struct hda_bind_ctls alc262_sony_bind_sw = { |
7144 | struct snd_ctl_elem_value *ucontrol) | 7144 | .ops = &snd_hda_bind_sw, |
7145 | { | 7145 | .values = { |
7146 | unsigned long private_save = kcontrol->private_value; | 7146 | HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT), |
7147 | int change; | 7147 | HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), |
7148 | kcontrol->private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT); | 7148 | 0, |
7149 | change = snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); | 7149 | }, |
7150 | kcontrol->private_value = private_save; | 7150 | }; |
7151 | change |= snd_hda_mixer_amp_switch_put(kcontrol, ucontrol); | ||
7152 | return change; | ||
7153 | } | ||
7154 | 7151 | ||
7155 | static struct snd_kcontrol_new alc262_sony_mixer[] = { | 7152 | static struct snd_kcontrol_new alc262_sony_mixer[] = { |
7156 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 7153 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
7157 | { | 7154 | HDA_BIND_SW("Front Playback Switch", &alc262_sony_bind_sw), |
7158 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
7159 | .name = "Front Playback Switch", | ||
7160 | .info = snd_hda_mixer_amp_switch_info, | ||
7161 | .get = snd_hda_mixer_amp_switch_get, | ||
7162 | .put = alc262_sony_sw_put, | ||
7163 | .private_value = HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT), | ||
7164 | }, | ||
7165 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 7155 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
7166 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 7156 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
7167 | HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 7157 | HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |