]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] HDA codec - little code & comment cleanup
authorJaroslav Kysela <perex@suse.cz>
Wed, 5 Jul 2006 15:39:14 +0000 (17:39 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sat, 23 Sep 2006 08:37:31 +0000 (10:37 +0200)
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/hda/hda_codec.h
sound/pci/hda/hda_proc.c

index 40520e9d5a4b2b3ef3a2b36fbb6c0a47d4ba2243..c12bc4e8840f04d0b7443646485d1e641f8b0430 100644 (file)
@@ -479,7 +479,7 @@ struct hda_codec_ops {
 struct hda_amp_info {
        u32 key;                /* hash key */
        u32 amp_caps;           /* amp capabilities */
-       u16 vol[2];             /* current volume & mute*/
+       u16 vol[2];             /* current volume & mute */
        u16 status;             /* update flag */
        u16 next;               /* next link */
 };
index c2f0fe85bf35c901966899f5d9c78274667027ad..d737f17695a33acc62fd772202068a67b4f7618b 100644 (file)
@@ -52,10 +52,9 @@ static void print_amp_caps(struct snd_info_buffer *buffer,
                           struct hda_codec *codec, hda_nid_t nid, int dir)
 {
        unsigned int caps;
-       if (dir == HDA_OUTPUT)
-               caps = snd_hda_param_read(codec, nid, AC_PAR_AMP_OUT_CAP);
-       else
-               caps = snd_hda_param_read(codec, nid, AC_PAR_AMP_IN_CAP);
+       caps = snd_hda_param_read(codec, nid,
+                                 dir == HDA_OUTPUT ?
+                                   AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP);
        if (caps == -1 || caps == 0) {
                snd_iprintf(buffer, "N/A\n");
                return;
@@ -74,10 +73,7 @@ static void print_amp_vals(struct snd_info_buffer *buffer,
        unsigned int val;
        int i;
 
-       if (dir == HDA_OUTPUT)
-               dir = AC_AMP_GET_OUTPUT;
-       else
-               dir = AC_AMP_GET_INPUT;
+       dir = dir == HDA_OUTPUT ? AC_AMP_GET_OUTPUT : AC_AMP_GET_INPUT;
        for (i = 0; i < indices; i++) {
                snd_iprintf(buffer, " [");
                if (stereo) {