diff options
-rw-r--r-- | sound/pci/hda/hda_codec.h | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_proc.c | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 40520e9d5a4b..c12bc4e8840f 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -479,7 +479,7 @@ struct hda_codec_ops { | |||
479 | struct hda_amp_info { | 479 | struct hda_amp_info { |
480 | u32 key; /* hash key */ | 480 | u32 key; /* hash key */ |
481 | u32 amp_caps; /* amp capabilities */ | 481 | u32 amp_caps; /* amp capabilities */ |
482 | u16 vol[2]; /* current volume & mute*/ | 482 | u16 vol[2]; /* current volume & mute */ |
483 | u16 status; /* update flag */ | 483 | u16 status; /* update flag */ |
484 | u16 next; /* next link */ | 484 | u16 next; /* next link */ |
485 | }; | 485 | }; |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index c2f0fe85bf35..d737f17695a3 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -52,10 +52,9 @@ static void print_amp_caps(struct snd_info_buffer *buffer, | |||
52 | struct hda_codec *codec, hda_nid_t nid, int dir) | 52 | struct hda_codec *codec, hda_nid_t nid, int dir) |
53 | { | 53 | { |
54 | unsigned int caps; | 54 | unsigned int caps; |
55 | if (dir == HDA_OUTPUT) | 55 | caps = snd_hda_param_read(codec, nid, |
56 | caps = snd_hda_param_read(codec, nid, AC_PAR_AMP_OUT_CAP); | 56 | dir == HDA_OUTPUT ? |
57 | else | 57 | AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP); |
58 | caps = snd_hda_param_read(codec, nid, AC_PAR_AMP_IN_CAP); | ||
59 | if (caps == -1 || caps == 0) { | 58 | if (caps == -1 || caps == 0) { |
60 | snd_iprintf(buffer, "N/A\n"); | 59 | snd_iprintf(buffer, "N/A\n"); |
61 | return; | 60 | return; |
@@ -74,10 +73,7 @@ static void print_amp_vals(struct snd_info_buffer *buffer, | |||
74 | unsigned int val; | 73 | unsigned int val; |
75 | int i; | 74 | int i; |
76 | 75 | ||
77 | if (dir == HDA_OUTPUT) | 76 | dir = dir == HDA_OUTPUT ? AC_AMP_GET_OUTPUT : AC_AMP_GET_INPUT; |
78 | dir = AC_AMP_GET_OUTPUT; | ||
79 | else | ||
80 | dir = AC_AMP_GET_INPUT; | ||
81 | for (i = 0; i < indices; i++) { | 77 | for (i = 0; i < indices; i++) { |
82 | snd_iprintf(buffer, " ["); | 78 | snd_iprintf(buffer, " ["); |
83 | if (stereo) { | 79 | if (stereo) { |