summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai2009-01-20 18:24:13 +0100
committerTakashi Iwai2009-01-20 18:24:13 +0100
commit2297bd6e526ce1469279284ffda9140f8d60ea84 (patch)
tree569b8e25c2169e64f91f1a6a8c819420f5589a80 /sound
parentALSA: hda - Don't break the PCM creation loop (diff)
downloadkernel-qcow2-linux-2297bd6e526ce1469279284ffda9140f8d60ea84.tar.gz
kernel-qcow2-linux-2297bd6e526ce1469279284ffda9140f8d60ea84.tar.xz
kernel-qcow2-linux-2297bd6e526ce1469279284ffda9140f8d60ea84.zip
ALSA: hda - Check HDMI jack types in the auto configuration
Add dig_out_type and dig_in_type fields to autocfg struct. A proper HDA_PCM_TYPE_* value is assigned to these fields according to the pin-jack location type value. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c8
-rw-r--r--sound/pci/hda/hda_local.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 0129e95672ae..dd419ce43d92 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3392,10 +3392,18 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec,
case AC_JACK_SPDIF_OUT:
case AC_JACK_DIG_OTHER_OUT:
cfg->dig_out_pin = nid;
+ if (loc == AC_JACK_LOC_HDMI)
+ cfg->dig_out_type = HDA_PCM_TYPE_HDMI;
+ else
+ cfg->dig_out_type = HDA_PCM_TYPE_SPDIF;
break;
case AC_JACK_SPDIF_IN:
case AC_JACK_DIG_OTHER_IN:
cfg->dig_in_pin = nid;
+ if (loc == AC_JACK_LOC_HDMI)
+ cfg->dig_in_type = HDA_PCM_TYPE_HDMI;
+ else
+ cfg->dig_in_type = HDA_PCM_TYPE_SPDIF;
break;
}
}
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 1dd8716c387f..a4ecd77a451a 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -355,6 +355,8 @@ struct auto_pin_cfg {
hda_nid_t dig_out_pin;
hda_nid_t dig_in_pin;
hda_nid_t mono_out_pin;
+ int dig_out_type; /* HDA_PCM_TYPE_XXX */
+ int dig_in_type; /* HDA_PCM_TYPE_XXX */
};
#define get_defcfg_connect(cfg) \