diff options
-rw-r--r-- | sound/pci/hda/hda_codec.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 11 | ||||
-rw-r--r-- | sound/pci/hda/hda_proc.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 12 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 18 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_via.c | 4 |
9 files changed, 50 insertions, 23 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 20100b1548e1..c9af15ed7f10 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1723,19 +1723,22 @@ EXPORT_SYMBOL_HDA(snd_hda_find_mixer_ctl); | |||
1723 | * | 1723 | * |
1724 | * snd_hda_ctl_add() checks the control subdev id field whether | 1724 | * snd_hda_ctl_add() checks the control subdev id field whether |
1725 | * #HDA_SUBDEV_NID_FLAG bit is set. If set (and @nid is zero), the lower | 1725 | * #HDA_SUBDEV_NID_FLAG bit is set. If set (and @nid is zero), the lower |
1726 | * bits value is taken as the NID to assign. | 1726 | * bits value is taken as the NID to assign. The #HDA_NID_ITEM_AMP bit |
1727 | * specifies if kctl->private_value is a HDA amplifier value. | ||
1727 | */ | 1728 | */ |
1728 | int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid, | 1729 | int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid, |
1729 | struct snd_kcontrol *kctl) | 1730 | struct snd_kcontrol *kctl) |
1730 | { | 1731 | { |
1731 | int err; | 1732 | int err; |
1733 | unsigned short flags = 0; | ||
1732 | struct hda_nid_item *item; | 1734 | struct hda_nid_item *item; |
1733 | 1735 | ||
1734 | if (kctl->id.subdevice & HDA_SUBDEV_NID_FLAG) { | 1736 | if (kctl->id.subdevice & HDA_SUBDEV_AMP_FLAG) |
1735 | if (nid == 0) | 1737 | flags |= HDA_NID_ITEM_AMP; |
1736 | nid = kctl->id.subdevice & 0xffff; | 1738 | if ((kctl->id.subdevice & HDA_SUBDEV_NID_FLAG) != 0 && nid == 0) |
1739 | nid = kctl->id.subdevice & 0xffff; | ||
1740 | if (kctl->id.subdevice & 0xf0000000) | ||
1737 | kctl->id.subdevice = 0; | 1741 | kctl->id.subdevice = 0; |
1738 | } | ||
1739 | err = snd_ctl_add(codec->bus->card, kctl); | 1742 | err = snd_ctl_add(codec->bus->card, kctl); |
1740 | if (err < 0) | 1743 | if (err < 0) |
1741 | return err; | 1744 | return err; |
@@ -1744,6 +1747,7 @@ int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid, | |||
1744 | return -ENOMEM; | 1747 | return -ENOMEM; |
1745 | item->kctl = kctl; | 1748 | item->kctl = kctl; |
1746 | item->nid = nid; | 1749 | item->nid = nid; |
1750 | item->flags = flags; | ||
1747 | return 0; | 1751 | return 0; |
1748 | } | 1752 | } |
1749 | EXPORT_SYMBOL_HDA(snd_hda_ctl_add); | 1753 | EXPORT_SYMBOL_HDA(snd_hda_ctl_add); |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 98cf3f4f3755..0a256471f812 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -31,6 +31,7 @@ | |||
31 | * in snd_hda_ctl_add(), so that this value won't appear in the outside. | 31 | * in snd_hda_ctl_add(), so that this value won't appear in the outside. |
32 | */ | 32 | */ |
33 | #define HDA_SUBDEV_NID_FLAG (1U << 31) | 33 | #define HDA_SUBDEV_NID_FLAG (1U << 31) |
34 | #define HDA_SUBDEV_AMP_FLAG (1U << 30) | ||
34 | 35 | ||
35 | /* | 36 | /* |
36 | * for mixer controls | 37 | * for mixer controls |
@@ -42,7 +43,7 @@ | |||
42 | /* mono volume with index (index=0,1,...) (channel=1,2) */ | 43 | /* mono volume with index (index=0,1,...) (channel=1,2) */ |
43 | #define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \ | 44 | #define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \ |
44 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \ | 45 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \ |
45 | .subdevice = HDA_SUBDEV_NID_FLAG | (nid), \ | 46 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | (nid), \ |
46 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \ | 47 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \ |
47 | SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | 48 | SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ |
48 | SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, \ | 49 | SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, \ |
@@ -63,7 +64,7 @@ | |||
63 | /* mono mute switch with index (index=0,1,...) (channel=1,2) */ | 64 | /* mono mute switch with index (index=0,1,...) (channel=1,2) */ |
64 | #define HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \ | 65 | #define HDA_CODEC_MUTE_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \ |
65 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \ | 66 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \ |
66 | .subdevice = HDA_SUBDEV_NID_FLAG | (nid), \ | 67 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | (nid), \ |
67 | .info = snd_hda_mixer_amp_switch_info, \ | 68 | .info = snd_hda_mixer_amp_switch_info, \ |
68 | .get = snd_hda_mixer_amp_switch_get, \ | 69 | .get = snd_hda_mixer_amp_switch_get, \ |
69 | .put = snd_hda_mixer_amp_switch_put, \ | 70 | .put = snd_hda_mixer_amp_switch_put, \ |
@@ -81,7 +82,7 @@ | |||
81 | /* special beep mono mute switch with index (index=0,1,...) (channel=1,2) */ | 82 | /* special beep mono mute switch with index (index=0,1,...) (channel=1,2) */ |
82 | #define HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \ | 83 | #define HDA_CODEC_MUTE_BEEP_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \ |
83 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \ | 84 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \ |
84 | .subdevice = HDA_SUBDEV_NID_FLAG | (nid), \ | 85 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | (nid), \ |
85 | .info = snd_hda_mixer_amp_switch_info, \ | 86 | .info = snd_hda_mixer_amp_switch_info, \ |
86 | .get = snd_hda_mixer_amp_switch_get, \ | 87 | .get = snd_hda_mixer_amp_switch_get, \ |
87 | .put = snd_hda_mixer_amp_switch_put_beep, \ | 88 | .put = snd_hda_mixer_amp_switch_put_beep, \ |
@@ -466,10 +467,14 @@ u32 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid); | |||
466 | u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid); | 467 | u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid); |
467 | int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid); | 468 | int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid); |
468 | 469 | ||
470 | /* flags for hda_nid_item */ | ||
471 | #define HDA_NID_ITEM_AMP (1<<0) | ||
472 | |||
469 | struct hda_nid_item { | 473 | struct hda_nid_item { |
470 | struct snd_kcontrol *kctl; | 474 | struct snd_kcontrol *kctl; |
471 | unsigned int index; | 475 | unsigned int index; |
472 | hda_nid_t nid; | 476 | hda_nid_t nid; |
477 | unsigned short flags; | ||
473 | }; | 478 | }; |
474 | 479 | ||
475 | int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid, | 480 | int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid, |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 2e27d6a8b446..f97d35de66c4 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -76,6 +76,14 @@ static void print_nid_array(struct snd_info_buffer *buffer, | |||
76 | " Control: name=\"%s\", index=%i, device=%i\n", | 76 | " Control: name=\"%s\", index=%i, device=%i\n", |
77 | kctl->id.name, kctl->id.index + item->index, | 77 | kctl->id.name, kctl->id.index + item->index, |
78 | kctl->id.device); | 78 | kctl->id.device); |
79 | if (item->flags & HDA_NID_ITEM_AMP) | ||
80 | snd_iprintf(buffer, | ||
81 | " ControlAmp: chs=%lu, dir=%s, " | ||
82 | "idx=%lu, ofs=%lu\n", | ||
83 | get_amp_channels(kctl), | ||
84 | get_amp_direction(kctl) ? "Out" : "In", | ||
85 | get_amp_index(kctl), | ||
86 | get_amp_offset(kctl)); | ||
79 | } | 87 | } |
80 | } | 88 | } |
81 | } | 89 | } |
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, |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index d0b8c6dc7322..e51f6658aa2c 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -500,6 +500,7 @@ static int add_mute(struct hda_codec *codec, const char *name, int index, | |||
500 | knew.private_value = pval; | 500 | knew.private_value = pval; |
501 | snprintf(tmp, sizeof(tmp), "%s %s Switch", name, dir_sfx[dir]); | 501 | snprintf(tmp, sizeof(tmp), "%s %s Switch", name, dir_sfx[dir]); |
502 | *kctlp = snd_ctl_new1(&knew, codec); | 502 | *kctlp = snd_ctl_new1(&knew, codec); |
503 | (*kctlp)->id.subdevice = HDA_SUBDEV_AMP_FLAG; | ||
503 | return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp); | 504 | return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp); |
504 | } | 505 | } |
505 | 506 | ||
@@ -513,6 +514,7 @@ static int add_volume(struct hda_codec *codec, const char *name, | |||
513 | knew.private_value = pval; | 514 | knew.private_value = pval; |
514 | snprintf(tmp, sizeof(tmp), "%s %s Volume", name, dir_sfx[dir]); | 515 | snprintf(tmp, sizeof(tmp), "%s %s Volume", name, dir_sfx[dir]); |
515 | *kctlp = snd_ctl_new1(&knew, codec); | 516 | *kctlp = snd_ctl_new1(&knew, codec); |
517 | (*kctlp)->id.subdevice = HDA_SUBDEV_AMP_FLAG; | ||
516 | return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp); | 518 | return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp); |
517 | } | 519 | } |
518 | 520 | ||
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index a09c03c3f62b..b68650af40a9 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -2178,6 +2178,7 @@ static struct snd_kcontrol_new cxt5066_mixer_master_olpc[] = { | |||
2178 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | | 2178 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | |
2179 | SNDRV_CTL_ELEM_ACCESS_TLV_READ | | 2179 | SNDRV_CTL_ELEM_ACCESS_TLV_READ | |
2180 | SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, | 2180 | SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, |
2181 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x10, | ||
2181 | .info = snd_hda_mixer_amp_volume_info, | 2182 | .info = snd_hda_mixer_amp_volume_info, |
2182 | .get = snd_hda_mixer_amp_volume_get, | 2183 | .get = snd_hda_mixer_amp_volume_get, |
2183 | .put = snd_hda_mixer_amp_volume_put, | 2184 | .put = snd_hda_mixer_amp_volume_put, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6b0b8728f6b7..87bf7bd6292a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4414,7 +4414,9 @@ static int add_control(struct alc_spec *spec, int type, const char *name, | |||
4414 | if (!knew->name) | 4414 | if (!knew->name) |
4415 | return -ENOMEM; | 4415 | return -ENOMEM; |
4416 | if (get_amp_nid_(val)) | 4416 | if (get_amp_nid_(val)) |
4417 | knew->subdevice = HDA_SUBDEV_NID_FLAG | get_amp_nid_(val); | 4417 | knew->subdevice = HDA_SUBDEV_NID_FLAG | |
4418 | HDA_SUBDEV_AMP_FLAG | | ||
4419 | get_amp_nid_(val); | ||
4418 | knew->private_value = val; | 4420 | knew->private_value = val; |
4419 | return 0; | 4421 | return 0; |
4420 | } | 4422 | } |
@@ -10919,7 +10921,7 @@ static struct snd_kcontrol_new alc262_fujitsu_mixer[] = { | |||
10919 | { | 10921 | { |
10920 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 10922 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
10921 | .name = "Master Playback Switch", | 10923 | .name = "Master Playback Switch", |
10922 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | 10924 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x14, |
10923 | .info = snd_hda_mixer_amp_switch_info, | 10925 | .info = snd_hda_mixer_amp_switch_info, |
10924 | .get = snd_hda_mixer_amp_switch_get, | 10926 | .get = snd_hda_mixer_amp_switch_get, |
10925 | .put = alc262_fujitsu_master_sw_put, | 10927 | .put = alc262_fujitsu_master_sw_put, |
@@ -10960,7 +10962,7 @@ static struct snd_kcontrol_new alc262_lenovo_3000_mixer[] = { | |||
10960 | { | 10962 | { |
10961 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 10963 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
10962 | .name = "Master Playback Switch", | 10964 | .name = "Master Playback Switch", |
10963 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x1b, | 10965 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x1b, |
10964 | .info = snd_hda_mixer_amp_switch_info, | 10966 | .info = snd_hda_mixer_amp_switch_info, |
10965 | .get = snd_hda_mixer_amp_switch_get, | 10967 | .get = snd_hda_mixer_amp_switch_get, |
10966 | .put = alc262_lenovo_3000_master_sw_put, | 10968 | .put = alc262_lenovo_3000_master_sw_put, |
@@ -12137,7 +12139,7 @@ static struct snd_kcontrol_new alc268_acer_aspire_one_mixer[] = { | |||
12137 | { | 12139 | { |
12138 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 12140 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
12139 | .name = "Master Playback Switch", | 12141 | .name = "Master Playback Switch", |
12140 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | 12142 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x14, |
12141 | .info = snd_hda_mixer_amp_switch_info, | 12143 | .info = snd_hda_mixer_amp_switch_info, |
12142 | .get = snd_hda_mixer_amp_switch_get, | 12144 | .get = snd_hda_mixer_amp_switch_get, |
12143 | .put = alc268_acer_master_sw_put, | 12145 | .put = alc268_acer_master_sw_put, |
@@ -12153,7 +12155,7 @@ static struct snd_kcontrol_new alc268_acer_mixer[] = { | |||
12153 | { | 12155 | { |
12154 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 12156 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
12155 | .name = "Master Playback Switch", | 12157 | .name = "Master Playback Switch", |
12156 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | 12158 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x14, |
12157 | .info = snd_hda_mixer_amp_switch_info, | 12159 | .info = snd_hda_mixer_amp_switch_info, |
12158 | .get = snd_hda_mixer_amp_switch_get, | 12160 | .get = snd_hda_mixer_amp_switch_get, |
12159 | .put = alc268_acer_master_sw_put, | 12161 | .put = alc268_acer_master_sw_put, |
@@ -12171,7 +12173,7 @@ static struct snd_kcontrol_new alc268_acer_dmic_mixer[] = { | |||
12171 | { | 12173 | { |
12172 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 12174 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
12173 | .name = "Master Playback Switch", | 12175 | .name = "Master Playback Switch", |
12174 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | 12176 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x14, |
12175 | .info = snd_hda_mixer_amp_switch_info, | 12177 | .info = snd_hda_mixer_amp_switch_info, |
12176 | .get = snd_hda_mixer_amp_switch_get, | 12178 | .get = snd_hda_mixer_amp_switch_get, |
12177 | .put = alc268_acer_master_sw_put, | 12179 | .put = alc268_acer_master_sw_put, |
@@ -13124,7 +13126,7 @@ static struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = { | |||
13124 | { | 13126 | { |
13125 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 13127 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
13126 | .name = "Master Playback Switch", | 13128 | .name = "Master Playback Switch", |
13127 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | 13129 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x14, |
13128 | .info = snd_hda_mixer_amp_switch_info, | 13130 | .info = snd_hda_mixer_amp_switch_info, |
13129 | .get = snd_hda_mixer_amp_switch_get, | 13131 | .get = snd_hda_mixer_amp_switch_get, |
13130 | .put = alc268_acer_master_sw_put, | 13132 | .put = alc268_acer_master_sw_put, |
@@ -13145,7 +13147,7 @@ static struct snd_kcontrol_new alc269_lifebook_mixer[] = { | |||
13145 | { | 13147 | { |
13146 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 13148 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
13147 | .name = "Master Playback Switch", | 13149 | .name = "Master Playback Switch", |
13148 | .subdevice = HDA_SUBDEV_NID_FLAG | 0x14, | 13150 | .subdevice = HDA_SUBDEV_NID_FLAG | HDA_SUBDEV_AMP_FLAG | 0x14, |
13149 | .info = snd_hda_mixer_amp_switch_info, | 13151 | .info = snd_hda_mixer_amp_switch_info, |
13150 | .get = snd_hda_mixer_amp_switch_get, | 13152 | .get = snd_hda_mixer_amp_switch_get, |
13151 | .put = alc268_acer_master_sw_put, | 13153 | .put = alc268_acer_master_sw_put, |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3d59f8325848..1ee586b65b63 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -2702,7 +2702,8 @@ stac_control_new(struct sigmatel_spec *spec, | |||
2702 | return NULL; | 2702 | return NULL; |
2703 | } | 2703 | } |
2704 | if (nid) | 2704 | if (nid) |
2705 | knew->subdevice = HDA_SUBDEV_NID_FLAG | nid; | 2705 | knew->subdevice = HDA_SUBDEV_NID_FLAG | |
2706 | HDA_SUBDEV_AMP_FLAG | nid; | ||
2706 | return knew; | 2707 | return knew; |
2707 | } | 2708 | } |
2708 | 2709 | ||
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 64995e8e3a72..b94cdee5eb53 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -458,7 +458,9 @@ static int via_add_control(struct via_spec *spec, int type, const char *name, | |||
458 | if (!knew->name) | 458 | if (!knew->name) |
459 | return -ENOMEM; | 459 | return -ENOMEM; |
460 | if (get_amp_nid_(val)) | 460 | if (get_amp_nid_(val)) |
461 | knew->subdevice = HDA_SUBDEV_NID_FLAG | get_amp_nid_(val); | 461 | knew->subdevice = HDA_SUBDEV_NID_FLAG | |
462 | HDA_SUBDEV_AMP_FLAG | | ||
463 | get_amp_nid_(val); | ||
462 | knew->private_value = val; | 464 | knew->private_value = val; |
463 | return 0; | 465 | return 0; |
464 | } | 466 | } |