]> err.no Git - linux-2.6/commitdiff
[ALSA] hda: Added mono_out_pin to autoconfig
authorMatthew Ranostay <mranostay@embeddedalley.com>
Thu, 24 Jan 2008 10:48:01 +0000 (11:48 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jan 2008 16:30:13 +0000 (17:30 +0100)
Added a mono_out_pin field to autocfg struct, and code to parse
for the mono_out_line.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_local.h

index f6a9a5dd9b7459d13527d0ead11db2a03160e6cb..df927be176af87e1f262b4a6b0809fe1ef0ed757 100644 (file)
@@ -2708,6 +2708,10 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
                case AC_JACK_LINE_OUT:
                        seq = get_defcfg_sequence(def_conf);
                        assoc = get_defcfg_association(def_conf);
+
+                       if (!(wid_caps & AC_WCAP_STEREO))
+                               if (!cfg->mono_out_pin)
+                                       cfg->mono_out_pin = nid;
                        if (!assoc)
                                continue;
                        if (!assoc_line_out)
@@ -2856,6 +2860,7 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
                   cfg->hp_outs, cfg->hp_pins[0],
                   cfg->hp_pins[1], cfg->hp_pins[2],
                   cfg->hp_pins[3], cfg->hp_pins[4]);
+       snd_printd("   mono: mono_out=0x%x\n", cfg->mono_out_pin);
        snd_printd("   inputs: mic=0x%x, fmic=0x%x, line=0x%x, fline=0x%x,"
                   " cd=0x%x, aux=0x%x\n",
                   cfg->input_pins[AUTO_PIN_MIC],
index 448c4ce816c32c7484f046ae4834ce07f001fe3f..8a96047d3c7966a2f9729c24978dc9e9ebf26738 100644 (file)
@@ -332,6 +332,7 @@ struct auto_pin_cfg {
        hda_nid_t input_pins[AUTO_PIN_LAST];
        hda_nid_t dig_out_pin;
        hda_nid_t dig_in_pin;
+       hda_nid_t mono_out_pin;
 };
 
 #define get_defcfg_connect(cfg) \