[ALSA] HDA codec - little code & comment cleanup
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
@@ -479,7 +479,7 @@ struct hda_codec_ops {
|
|||||||
struct hda_amp_info {
|
struct hda_amp_info {
|
||||||
u32 key; /* hash key */
|
u32 key; /* hash key */
|
||||||
u32 amp_caps; /* amp capabilities */
|
u32 amp_caps; /* amp capabilities */
|
||||||
u16 vol[2]; /* current volume & mute*/
|
u16 vol[2]; /* current volume & mute */
|
||||||
u16 status; /* update flag */
|
u16 status; /* update flag */
|
||||||
u16 next; /* next link */
|
u16 next; /* next link */
|
||||||
};
|
};
|
||||||
|
@@ -52,10 +52,9 @@ static void print_amp_caps(struct snd_info_buffer *buffer,
|
|||||||
struct hda_codec *codec, hda_nid_t nid, int dir)
|
struct hda_codec *codec, hda_nid_t nid, int dir)
|
||||||
{
|
{
|
||||||
unsigned int caps;
|
unsigned int caps;
|
||||||
if (dir == HDA_OUTPUT)
|
caps = snd_hda_param_read(codec, nid,
|
||||||
caps = snd_hda_param_read(codec, nid, AC_PAR_AMP_OUT_CAP);
|
dir == HDA_OUTPUT ?
|
||||||
else
|
AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP);
|
||||||
caps = snd_hda_param_read(codec, nid, AC_PAR_AMP_IN_CAP);
|
|
||||||
if (caps == -1 || caps == 0) {
|
if (caps == -1 || caps == 0) {
|
||||||
snd_iprintf(buffer, "N/A\n");
|
snd_iprintf(buffer, "N/A\n");
|
||||||
return;
|
return;
|
||||||
@@ -74,10 +73,7 @@ static void print_amp_vals(struct snd_info_buffer *buffer,
|
|||||||
unsigned int val;
|
unsigned int val;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (dir == HDA_OUTPUT)
|
dir = dir == HDA_OUTPUT ? AC_AMP_GET_OUTPUT : AC_AMP_GET_INPUT;
|
||||||
dir = AC_AMP_GET_OUTPUT;
|
|
||||||
else
|
|
||||||
dir = AC_AMP_GET_INPUT;
|
|
||||||
for (i = 0; i < indices; i++) {
|
for (i = 0; i < indices; i++) {
|
||||||
snd_iprintf(buffer, " [");
|
snd_iprintf(buffer, " [");
|
||||||
if (stereo) {
|
if (stereo) {
|
||||||
|
Reference in New Issue
Block a user