diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-08-10 11:11:07 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:58:43 -0400 |
commit | 47fd830acf0b6b5bc75db55d0f2cc64f59a23b5f (patch) | |
tree | 920b7e2cdce7120ff96417d74b911c3d5b95c21b /sound/pci/hda/hda_local.h | |
parent | 82beb8fd365afe3891b277c46425083f13e23c56 (diff) |
[ALSA] hda-codec - add snd_hda_codec_stereo() function
Added snd_hda_codec_amp_stereo() function that changes both of stereo
channels with the same mask and value bits. It simplifies most of
amp-handling codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r-- | sound/pci/hda/hda_local.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 8dec32cfdf54..35ea0cf37a27 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -84,10 +84,17 @@ int snd_hda_codec_amp_read(struct hda_codec *codec, hda_nid_t nid, int ch, | |||
84 | int direction, int index); | 84 | int direction, int index); |
85 | int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, int ch, | 85 | int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, int ch, |
86 | int direction, int idx, int mask, int val); | 86 | int direction, int idx, int mask, int val); |
87 | int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid, | ||
88 | int dir, int idx, int mask, int val); | ||
87 | #ifdef CONFIG_PM | 89 | #ifdef CONFIG_PM |
88 | void snd_hda_codec_resume_amp(struct hda_codec *codec); | 90 | void snd_hda_codec_resume_amp(struct hda_codec *codec); |
89 | #endif | 91 | #endif |
90 | 92 | ||
93 | /* amp value bits */ | ||
94 | #define HDA_AMP_MUTE 0x80 | ||
95 | #define HDA_AMP_UNMUTE 0x00 | ||
96 | #define HDA_AMP_VOLMASK 0x7f | ||
97 | |||
91 | /* mono switch binding multiple inputs */ | 98 | /* mono switch binding multiple inputs */ |
92 | #define HDA_BIND_MUTE_MONO(xname, nid, channel, indices, direction) \ | 99 | #define HDA_BIND_MUTE_MONO(xname, nid, channel, indices, direction) \ |
93 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = 0, \ | 100 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = 0, \ |