diff options
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r-- | sound/pci/hda/hda_local.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index c1ca3182e6a4..3001794ad291 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -66,6 +66,19 @@ | |||
66 | /* stereo mute switch */ | 66 | /* stereo mute switch */ |
67 | #define HDA_CODEC_MUTE(xname, nid, xindex, direction) \ | 67 | #define HDA_CODEC_MUTE(xname, nid, xindex, direction) \ |
68 | HDA_CODEC_MUTE_MONO(xname, nid, 3, xindex, direction) | 68 | HDA_CODEC_MUTE_MONO(xname, nid, 3, xindex, direction) |
69 | /* special beep mono mute switch with index (index=0,1,...) (channel=1,2) */ | ||
70 | #define HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \ | ||
71 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \ | ||
72 | .info = snd_hda_mixer_amp_switch_info, \ | ||
73 | .get = snd_hda_mixer_amp_switch_get, \ | ||
74 | .put = snd_hda_mixer_amp_switch_put_beep, \ | ||
75 | .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, direction) } | ||
76 | /* special beep mono mute switch */ | ||
77 | #define HDA_CODEC_MUTE_BEEP_MONO(xname, nid, channel, xindex, direction) \ | ||
78 | HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, 0, nid, channel, xindex, direction) | ||
79 | /* special beep stereo mute switch */ | ||
80 | #define HDA_CODEC_MUTE_BEEP(xname, nid, xindex, direction) \ | ||
81 | HDA_CODEC_MUTE_BEEP_MONO(xname, nid, 3, xindex, direction) | ||
69 | 82 | ||
70 | int snd_hda_mixer_amp_volume_info(struct snd_kcontrol *kcontrol, | 83 | int snd_hda_mixer_amp_volume_info(struct snd_kcontrol *kcontrol, |
71 | struct snd_ctl_elem_info *uinfo); | 84 | struct snd_ctl_elem_info *uinfo); |
@@ -81,6 +94,8 @@ int snd_hda_mixer_amp_switch_get(struct snd_kcontrol *kcontrol, | |||
81 | struct snd_ctl_elem_value *ucontrol); | 94 | struct snd_ctl_elem_value *ucontrol); |
82 | int snd_hda_mixer_amp_switch_put(struct snd_kcontrol *kcontrol, | 95 | int snd_hda_mixer_amp_switch_put(struct snd_kcontrol *kcontrol, |
83 | struct snd_ctl_elem_value *ucontrol); | 96 | struct snd_ctl_elem_value *ucontrol); |
97 | int snd_hda_mixer_amp_switch_put_beep(struct snd_kcontrol *kcontrol, | ||
98 | struct snd_ctl_elem_value *ucontrol); | ||
84 | /* lowlevel accessor with caching; use carefully */ | 99 | /* lowlevel accessor with caching; use carefully */ |
85 | int snd_hda_codec_amp_read(struct hda_codec *codec, hda_nid_t nid, int ch, | 100 | int snd_hda_codec_amp_read(struct hda_codec *codec, hda_nid_t nid, int ch, |
86 | int direction, int index); | 101 | int direction, int index); |