Commit 2f179721 authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
parent ba811127
...@@ -138,16 +138,17 @@ static void print_amp_vals(struct snd_info_buffer *buffer, ...@@ -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; dir = dir == HDA_OUTPUT ? AC_AMP_GET_OUTPUT : AC_AMP_GET_INPUT;
for (i = 0; i < indices; i++) { for (i = 0; i < indices; i++) {
snd_iprintf(buffer, " ["); 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) { if (stereo) {
val = snd_hda_codec_read(codec, nid, 0, val = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_AMP_GAIN_MUTE, AC_VERB_GET_AMP_GAIN_MUTE,
AC_AMP_GET_LEFT | dir | i); AC_AMP_GET_RIGHT | dir | i);
snd_iprintf(buffer, "0x%02x ", val); snd_iprintf(buffer, " 0x%02x", val);
} }
val = snd_hda_codec_read(codec, nid, 0, snd_iprintf(buffer, "]");
AC_VERB_GET_AMP_GAIN_MUTE,
AC_AMP_GET_RIGHT | dir | i);
snd_iprintf(buffer, "0x%02x]", val);
} }
snd_iprintf(buffer, "\n"); snd_iprintf(buffer, "\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment