summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_proc.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-12-10 14:58:34 (GMT)
committerTakashi Iwai <tiwai@suse.de>2013-01-10 09:34:27 (GMT)
commit2f179721c4a2d1035a93e9c908740d87ac9952e2 (patch)
tree57b980082bb37b63b651c0b95651c280524c4129 /sound/pci/hda/hda_proc.c
parentba8111276f2cc10b9851613bc8300cabda3c7e0d (diff)
downloadlinux-fsl-qoriq-2f179721c4a2d1035a93e9c908740d87ac9952e2.tar.xz
ALSA: hda - Fix mono amp values in proc output
The mono widget is always connected to the left channel, thus the left channel amp value also should be referred for mono widgets instead of the right channel. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_proc.c')
-rw-r--r--sound/pci/hda/hda_proc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 045e5d3..740f46a 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -138,16 +138,17 @@ static void print_amp_vals(struct snd_info_buffer *buffer,
dir = dir == HDA_OUTPUT ? AC_AMP_GET_OUTPUT : AC_AMP_GET_INPUT;
for (i = 0; i < indices; i++) {
snd_iprintf(buffer, " [");
+ val = snd_hda_codec_read(codec, nid, 0,
+ AC_VERB_GET_AMP_GAIN_MUTE,
+ AC_AMP_GET_LEFT | dir | i);
+ snd_iprintf(buffer, "0x%02x", val);
if (stereo) {
val = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_AMP_GAIN_MUTE,
- AC_AMP_GET_LEFT | dir | i);
- snd_iprintf(buffer, "0x%02x ", val);
+ AC_AMP_GET_RIGHT | dir | i);
+ snd_iprintf(buffer, " 0x%02x", val);
}
- val = snd_hda_codec_read(codec, nid, 0,
- AC_VERB_GET_AMP_GAIN_MUTE,
- AC_AMP_GET_RIGHT | dir | i);
- snd_iprintf(buffer, "0x%02x]", val);
+ snd_iprintf(buffer, "]");
}
snd_iprintf(buffer, "\n");
}