aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-01-20 12:24:13 -0500
committerTakashi Iwai <tiwai@suse.de>2009-01-20 12:24:13 -0500
commit2297bd6e526ce1469279284ffda9140f8d60ea84 (patch)
tree569b8e25c2169e64f91f1a6a8c819420f5589a80 /sound/pci/hda/hda_codec.c
parent41b5b01afb71226653282951965d5efa9d7b843d (diff)
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/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c8
1 files changed, 8 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,
3392 case AC_JACK_SPDIF_OUT: 3392 case AC_JACK_SPDIF_OUT:
3393 case AC_JACK_DIG_OTHER_OUT: 3393 case AC_JACK_DIG_OTHER_OUT:
3394 cfg->dig_out_pin = nid; 3394 cfg->dig_out_pin = nid;
3395 if (loc == AC_JACK_LOC_HDMI)
3396 cfg->dig_out_type = HDA_PCM_TYPE_HDMI;
3397 else
3398 cfg->dig_out_type = HDA_PCM_TYPE_SPDIF;
3395 break; 3399 break;
3396 case AC_JACK_SPDIF_IN: 3400 case AC_JACK_SPDIF_IN:
3397 case AC_JACK_DIG_OTHER_IN: 3401 case AC_JACK_DIG_OTHER_IN:
3398 cfg->dig_in_pin = nid; 3402 cfg->dig_in_pin = nid;
3403 if (loc == AC_JACK_LOC_HDMI)
3404 cfg->dig_in_type = HDA_PCM_TYPE_HDMI;
3405 else
3406 cfg->dig_in_type = HDA_PCM_TYPE_SPDIF;
3399 break; 3407 break;
3400 } 3408 }
3401 } 3409 }