aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-11-14 08:03:33 -0500
committerTakashi Iwai <tiwai@suse.de>2008-11-14 08:03:33 -0500
commit127e82e3bfaad29e78ff5d4b1c41ab5e2d69c17f (patch)
treed760e57a331e217112c10f3758e70b16cd1514a7 /sound/pci/hda/patch_sigmatel.c
parentcd80bc6f4811b48eb68716c8255bf7e5f0006caa (diff)
ALSA: hda - Support Headphone and Speaker volumes control on VAIO
Split the bound Master control to individual Headphone and Speaker volume controls for VAIO with STAC982x codecs. The Master controls is still created as a vmaster. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 58d832c3835a..66c12d3e9c79 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -5132,29 +5132,11 @@ static struct hda_verb vaio_ar_init[] = {
5132 {} 5132 {}
5133}; 5133};
5134 5134
5135/* bind volumes of both NID 0x02 and 0x05 */
5136static struct hda_bind_ctls vaio_bind_master_vol = {
5137 .ops = &snd_hda_bind_vol,
5138 .values = {
5139 HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT),
5140 HDA_COMPOSE_AMP_VAL(0x05, 3, 0, HDA_OUTPUT),
5141 0
5142 },
5143};
5144
5145/* bind volumes of both NID 0x02 and 0x05 */
5146static struct hda_bind_ctls vaio_bind_master_sw = {
5147 .ops = &snd_hda_bind_sw,
5148 .values = {
5149 HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT),
5150 HDA_COMPOSE_AMP_VAL(0x05, 3, 0, HDA_OUTPUT),
5151 0,
5152 },
5153};
5154
5155static struct snd_kcontrol_new vaio_mixer[] = { 5135static struct snd_kcontrol_new vaio_mixer[] = {
5156 HDA_BIND_VOL("Master Playback Volume", &vaio_bind_master_vol), 5136 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x02, 0, HDA_OUTPUT),
5157 HDA_BIND_SW("Master Playback Switch", &vaio_bind_master_sw), 5137 HDA_CODEC_MUTE("Headphone Playback Switch", 0x02, 0, HDA_OUTPUT),
5138 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x05, 0, HDA_OUTPUT),
5139 HDA_CODEC_MUTE("Speaker Playback Switch", 0x05, 0, HDA_OUTPUT),
5158 /* HDA_CODEC_VOLUME("CD Capture Volume", 0x07, 0, HDA_INPUT), */ 5140 /* HDA_CODEC_VOLUME("CD Capture Volume", 0x07, 0, HDA_INPUT), */
5159 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_INPUT), 5141 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_INPUT),
5160 HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_INPUT), 5142 HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_INPUT),
@@ -5170,8 +5152,10 @@ static struct snd_kcontrol_new vaio_mixer[] = {
5170}; 5152};
5171 5153
5172static struct snd_kcontrol_new vaio_ar_mixer[] = { 5154static struct snd_kcontrol_new vaio_ar_mixer[] = {
5173 HDA_BIND_VOL("Master Playback Volume", &vaio_bind_master_vol), 5155 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x02, 0, HDA_OUTPUT),
5174 HDA_BIND_SW("Master Playback Switch", &vaio_bind_master_sw), 5156 HDA_CODEC_MUTE("Headphone Playback Switch", 0x02, 0, HDA_OUTPUT),
5157 HDA_CODEC_VOLUME("Speaker Playback Volume", 0x05, 0, HDA_OUTPUT),
5158 HDA_CODEC_MUTE("Speaker Playback Switch", 0x05, 0, HDA_OUTPUT),
5175 /* HDA_CODEC_VOLUME("CD Capture Volume", 0x07, 0, HDA_INPUT), */ 5159 /* HDA_CODEC_VOLUME("CD Capture Volume", 0x07, 0, HDA_INPUT), */
5176 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_INPUT), 5160 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_INPUT),
5177 HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_INPUT), 5161 HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_INPUT),