aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2008-09-26 10:06:40 -0400
committerJaroslav Kysela <perex@perex.cz>2008-10-10 07:41:38 -0400
commitb2c4f4d71f7a161630681678cbba84bd695bfd1e (patch)
treee329f15f19991c21badb42fc2c2f2e606d587788
parent97c889a78b70f0ac0949967bf174d1a6a28bfb5c (diff)
ALSA: hda: 92xx S/PDIF In support
Add support for S/PDIF IN on reference boards quirks. Also disable the IEC958 capture switch on boards with GPIO0 enabled. Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--sound/pci/hda/patch_sigmatel.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 6e0a18bca23b..2191735068e1 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1245,7 +1245,7 @@ static int stac92xx_build_controls(struct hda_codec *codec)
1245 return err; 1245 return err;
1246 spec->multiout.share_spdif = 1; 1246 spec->multiout.share_spdif = 1;
1247 } 1247 }
1248 if (spec->dig_in_nid) { 1248 if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) {
1249 err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); 1249 err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
1250 if (err < 0) 1250 if (err < 0)
1251 return err; 1251 return err;
@@ -4079,10 +4079,6 @@ again:
4079 memcpy(&spec->private_dimux, &stac92hd73xx_dmux, 4079 memcpy(&spec->private_dimux, &stac92hd73xx_dmux,
4080 sizeof(stac92hd73xx_dmux)); 4080 sizeof(stac92hd73xx_dmux));
4081 4081
4082 /* GPIO0 High = Enable EAPD */
4083 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
4084 spec->gpio_data = 0x01;
4085
4086 switch (spec->board_config) { 4082 switch (spec->board_config) {
4087 case STAC_DELL_M6: 4083 case STAC_DELL_M6:
4088 spec->init = dell_eq_core_init; 4084 spec->init = dell_eq_core_init;
@@ -4120,6 +4116,11 @@ again:
4120 spec->num_dmics = STAC92HD73XX_NUM_DMICS; 4116 spec->num_dmics = STAC92HD73XX_NUM_DMICS;
4121 spec->num_smuxes = ARRAY_SIZE(stac92hd73xx_smux_nids); 4117 spec->num_smuxes = ARRAY_SIZE(stac92hd73xx_smux_nids);
4122 } 4118 }
4119 if (spec->board_config > STAC_92HD73XX_REF) {
4120 /* GPIO0 High = Enable EAPD */
4121 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;
4122 spec->gpio_data = 0x01;
4123 }
4123 spec->dinput_mux = &spec->private_dimux; 4124 spec->dinput_mux = &spec->private_dimux;
4124 4125
4125 spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids); 4126 spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids);
@@ -4356,10 +4357,12 @@ again:
4356 spec->aloopback_mask = 0x20; 4357 spec->aloopback_mask = 0x20;
4357 spec->aloopback_shift = 0; 4358 spec->aloopback_shift = 0;
4358 4359
4359 /* GPIO0 High = EAPD */ 4360 if (spec->board_config > STAC_92HD71BXX_REF) {
4360 spec->gpio_mask = 0x01; 4361 /* GPIO0 = EAPD */
4361 spec->gpio_dir = 0x01; 4362 spec->gpio_mask = 0x01;
4362 spec->gpio_data = 0x01; 4363 spec->gpio_dir = 0x01;
4364 spec->gpio_data = 0x01;
4365 }
4363 4366
4364 spec->powerdown_adcs = 1; 4367 spec->powerdown_adcs = 1;
4365 spec->digbeep_nid = 0x26; 4368 spec->digbeep_nid = 0x26;
@@ -4601,9 +4604,11 @@ static int patch_stac927x(struct hda_codec *codec)
4601 spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); 4604 spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids);
4602 break; 4605 break;
4603 default: 4606 default:
4604 /* GPIO0 High = Enable EAPD */ 4607 if (spec->board_config > STAC_D965_REF) {
4605 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; 4608 /* GPIO0 High = Enable EAPD */
4606 spec->gpio_data = 0x01; 4609 spec->eapd_mask = spec->gpio_mask = 0x01;
4610 spec->gpio_dir = spec->gpio_data = 0x01;
4611 }
4607 spec->num_dmics = 0; 4612 spec->num_dmics = 0;
4608 4613
4609 spec->init = stac927x_core_init; 4614 spec->init = stac927x_core_init;
@@ -4717,6 +4722,9 @@ static int patch_stac9205(struct hda_codec *codec)
4717 */ 4722 */
4718 spec->gpio_data = 0x01; 4723 spec->gpio_data = 0x01;
4719 break; 4724 break;
4725 case STAC_9205_REF:
4726 /* SPDIF-In enabled */
4727 break;
4720 default: 4728 default:
4721 /* GPIO0 High = EAPD */ 4729 /* GPIO0 High = EAPD */
4722 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; 4730 spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1;