diff options
author | Jaroslav Kysela <perex@perex.cz> | 2009-12-08 11:45:25 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2009-12-15 03:33:17 -0500 |
commit | 9e3fd8719f624a43575b56a4777b1552399a8be8 (patch) | |
tree | 273a7f8a6e264eb74f966abb18f0a69608f62d88 /sound/pci/hda/patch_analog.c | |
parent | 5b0cb1d850c26893b1468b3a519433a1b7a176be (diff) |
ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc)
The purpose of this changeset is to show information about amplifier
setting in the codec proc file. Something like:
Control: name="Front Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Control: name="Front Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=2, ofs=0
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index d418842373fd..5e2bb181a149 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -832,7 +832,7 @@ static struct snd_kcontrol_new ad1986a_automute_master_mixers[] = { | |||
832 | { | 832 | { |
833 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 833 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
834 | .name = "Master Playback Switch", | 834 | .name = "Master Playback Switch", |
835 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x1a, | 835 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x1a, |
836 | .info = snd_hda_mixer_amp_switch_info, | 836 | .info = snd_hda_mixer_amp_switch_info, |
837 | .get = snd_hda_mixer_amp_switch_get, | 837 | .get = snd_hda_mixer_amp_switch_get, |
838 | .put = ad1986a_hp_master_sw_put, | 838 | .put = ad1986a_hp_master_sw_put, |
@@ -2602,7 +2602,9 @@ static int add_control(struct ad198x_spec *spec, int type, const char *name, | |||
2602 | if (! knew->name) | 2602 | if (! knew->name) |
2603 | return -ENOMEM; | 2603 | return -ENOMEM; |
2604 | if (get_amp_nid_(val)) | 2604 | if (get_amp_nid_(val)) |
2605 | knew->subdevice = HDA_SUBDEV_NID_FLAG | get_amp_nid_(val); | 2605 | knew->subdevice = HDA_SUBDEV_NID_FLAG | |
2606 | HDA_SUBDEV_AMP_FLAG | | ||
2607 | get_amp_nid_(val); | ||
2606 | knew->private_value = val; | 2608 | knew->private_value = val; |
2607 | return 0; | 2609 | return 0; |
2608 | } | 2610 | } |
@@ -3756,7 +3758,7 @@ static struct snd_kcontrol_new ad1884a_laptop_mixers[] = { | |||
3756 | { | 3758 | { |
3757 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 3759 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
3758 | .name = "Master Playback Switch", | 3760 | .name = "Master Playback Switch", |
3759 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x21, | 3761 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x21, |
3760 | .info = snd_hda_mixer_amp_switch_info, | 3762 | .info = snd_hda_mixer_amp_switch_info, |
3761 | .get = snd_hda_mixer_amp_switch_get, | 3763 | .get = snd_hda_mixer_amp_switch_get, |
3762 | .put = ad1884a_mobile_master_sw_put, | 3764 | .put = ad1884a_mobile_master_sw_put, |
@@ -3785,7 +3787,7 @@ static struct snd_kcontrol_new ad1884a_mobile_mixers[] = { | |||
3785 | { | 3787 | { |
3786 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 3788 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
3787 | .name = "Master Playback Switch", | 3789 | .name = "Master Playback Switch", |
3788 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x21, | 3790 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x21, |
3789 | .info = snd_hda_mixer_amp_switch_info, | 3791 | .info = snd_hda_mixer_amp_switch_info, |
3790 | .get = snd_hda_mixer_amp_switch_get, | 3792 | .get = snd_hda_mixer_amp_switch_get, |
3791 | .put = ad1884a_mobile_master_sw_put, | 3793 | .put = ad1884a_mobile_master_sw_put, |
@@ -4127,7 +4129,7 @@ static struct snd_kcontrol_new ad1984a_touchsmart_mixers[] = { | |||
4127 | /* HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT),*/ | 4129 | /* HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT),*/ |
4128 | { | 4130 | { |
4129 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 4131 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
4130 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x21, | 4132 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x21, |
4131 | .name = "Master Playback Switch", | 4133 | .name = "Master Playback Switch", |
4132 | .info = snd_hda_mixer_amp_switch_info, | 4134 | .info = snd_hda_mixer_amp_switch_info, |
4133 | .get = snd_hda_mixer_amp_switch_get, | 4135 | .get = snd_hda_mixer_amp_switch_get, |