aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-08-08 03:32:37 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-20 11:43:04 -0400
commitb32bd480ca3f42a49174b0e4e960bc4a40a28741 (patch)
tree6935b3a2c6872eee83c43c85416929709e38be62 /sound
parent39d165aba321f11d3c6653acb33b4d2d2d68065e (diff)
ALSA: hda - Fix missing mute controls for CX5051
commit f69910ddbd8c29391958cf82b598dd78fe5c8640 upstream. We've added a fake mute control (setting the amp volume to zero) for CX5051 at commit [3868137e: ALSA: hda - Add a fake mute feature], but this feature was overlooked in the generic parser implementation. Now the driver lacks of mute controls on these codecs. The fix is just to check both AC_AMPCAP_MUTE and AC_AMPCAP_MIN_MUTE bits in each place checking the amp capabilities. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59001 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_generic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 24400cffb8f3..ad22decad02b 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -519,7 +519,7 @@ static bool same_amp_caps(struct hda_codec *codec, hda_nid_t nid1,
519} 519}
520 520
521#define nid_has_mute(codec, nid, dir) \ 521#define nid_has_mute(codec, nid, dir) \
522 check_amp_caps(codec, nid, dir, AC_AMPCAP_MUTE) 522 check_amp_caps(codec, nid, dir, (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE))
523#define nid_has_volume(codec, nid, dir) \ 523#define nid_has_volume(codec, nid, dir) \
524 check_amp_caps(codec, nid, dir, AC_AMPCAP_NUM_STEPS) 524 check_amp_caps(codec, nid, dir, AC_AMPCAP_NUM_STEPS)
525 525
@@ -621,7 +621,7 @@ static int get_amp_val_to_activate(struct hda_codec *codec, hda_nid_t nid,
621 if (enable) 621 if (enable)
622 val = (caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT; 622 val = (caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT;
623 } 623 }
624 if (caps & AC_AMPCAP_MUTE) { 624 if (caps & (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE)) {
625 if (!enable) 625 if (!enable)
626 val |= HDA_AMP_MUTE; 626 val |= HDA_AMP_MUTE;
627 } 627 }
@@ -645,7 +645,7 @@ static unsigned int get_amp_mask_to_modify(struct hda_codec *codec,
645{ 645{
646 unsigned int mask = 0xff; 646 unsigned int mask = 0xff;
647 647
648 if (caps & AC_AMPCAP_MUTE) { 648 if (caps & (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE)) {
649 if (is_ctl_associated(codec, nid, dir, idx, NID_PATH_MUTE_CTL)) 649 if (is_ctl_associated(codec, nid, dir, idx, NID_PATH_MUTE_CTL))
650 mask &= ~0x80; 650 mask &= ~0x80;
651 } 651 }