]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: hda - Connect to primary DAC if no individual DAC is available
authorTakashi Iwai <tiwai@suse.de>
Fri, 6 Mar 2009 11:00:24 +0000 (12:00 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 6 Mar 2009 11:00:24 +0000 (12:00 +0100)
In stac92xx_auto_fill_dac_nids[], connect to the primary DAC if no
individual DAC is available for each pin.  This ensures that the pin
works somehow at least.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_sigmatel.c

index d19090fd2d137a80760dd333412f34de8db65875..ee119259183c203b6828dd0ebbd18508f38a0474 100644 (file)
@@ -2871,6 +2871,16 @@ static hda_nid_t get_unassigned_dac(struct hda_codec *codec, hda_nid_t nid)
                        return conn[j];
                }
        }
+       /* if all DACs are already assigned, connect to the primary DAC */
+       if (conn_len > 1) {
+               for (j = 0; j < conn_len; j++) {
+                       if (conn[j] == spec->multiout.dac_nids[0]) {
+                               snd_hda_codec_write_cache(codec, nid, 0,
+                                                 AC_VERB_SET_CONNECT_SEL, j);
+                               break;
+                       }
+               }
+       }
        return 0;
 }