]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: hda - report selected CA index for Audio InfoFrame
authorWu Fengguang <wfg@linux.intel.com>
Sat, 22 Nov 2008 01:40:52 +0000 (09:40 +0800)
committerTakashi Iwai <tiwai@suse.de>
Sat, 22 Nov 2008 10:14:32 +0000 (11:14 +0100)
Print some CA selecting info, which could be valuable for debugging when
something goes wrong.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_intelhdmi.c

index e10fa1e3dc9b574d408e89e76bfc2efbd841715e..4a48011ae35b8cb58189630fa896d241db125ff0 100644 (file)
@@ -444,14 +444,16 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec,
                    (spk_mask & channel_allocations[i].spk_mask) ==
                                channel_allocations[i].spk_mask) {
                        ai->CA = channel_allocations[i].ca_index;
-                       return 0;
+                       break;
                }
        }
 
        snd_print_channel_allocation(eld->spk_alloc, buf, sizeof(buf));
-       snd_printd(KERN_INFO "failed to setup channel allocation: %d of %s\n",
-                       channels, buf);
-       return -1;
+       snd_printdd(KERN_INFO
+                       "HDMI: select CA 0x%x for %d-channel allocation: %s\n",
+                       ai->CA, channels, buf);
+
+       return ai->CA;
 }
 
 static void hdmi_setup_channel_mapping(struct hda_codec *codec,