]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - sound/pci/hda/hda_proc.c
ALSA: hda: move open coded tricks into get_wcaps_channels()
[~shefty/rdma-dev.git] / sound / pci / hda / hda_proc.c
index a721eb08a290e29e0e468d84ebdc5eb69593e1fa..95f24e4729f83c5eede0328f26bef18f2021a68c 100644 (file)
@@ -515,9 +515,7 @@ static void print_codec_info(struct snd_info_entry *entry,
                snd_iprintf(buffer, "Node 0x%02x [%s] wcaps 0x%x:", nid,
                            get_wid_type_name(wid_type), wid_caps);
                if (wid_caps & AC_WCAP_STEREO) {
-                       unsigned int chans;
-                       chans = (wid_caps & AC_WCAP_CHAN_CNT_EXT) >> 13;
-                       chans = ((chans << 1) | 1) + 1;
+                       unsigned int chans = get_wcaps_channels(wid_caps);
                        if (chans == 2)
                                snd_iprintf(buffer, " Stereo");
                        else