aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2007-10-18 11:38:17 -0400
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:06 -0500
commit7f16859a8335449c8bf75ce4edd8040a57e2b678 (patch)
tree7b99b53bc7fdea6c06608ae1277889100729dd50
parentb995d76da070440c1e5687c0c13c8fbe51222ea2 (diff)
[ALSA] hda-codec - Add STAC9228 DMIC support
Added the missing STAC9228 DMIC support. Also added a new vendor id tag for IDT. 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/hda_codec.c1
-rw-r--r--sound/pci/hda/patch_sigmatel.c18
2 files changed, 16 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 8cbe3bf1e317..dacabe52a41c 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -55,6 +55,7 @@ static struct hda_vendor_id hda_vendor_ids[] = {
55 { 0x10ec, "Realtek" }, 55 { 0x10ec, "Realtek" },
56 { 0x1057, "Motorola" }, 56 { 0x1057, "Motorola" },
57 { 0x1106, "VIA" }, 57 { 0x1106, "VIA" },
58 { 0x111d, "IDT" },
58 { 0x11d4, "Analog Devices" }, 59 { 0x11d4, "Analog Devices" },
59 { 0x13f6, "C-Media" }, 60 { 0x13f6, "C-Media" },
60 { 0x14f1, "Conexant" }, 61 { 0x14f1, "Conexant" },
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 04012237096c..86cd3f67b9fb 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -204,6 +204,11 @@ static hda_nid_t stac927x_mux_nids[3] = {
204 0x15, 0x16, 0x17 204 0x15, 0x16, 0x17
205}; 205};
206 206
207#define STAC927X_NUM_DMICS 2
208static hda_nid_t stac927x_dmic_nids[STAC927X_NUM_DMICS + 1] = {
209 0x13, 0x14, 0
210};
211
207static hda_nid_t stac9205_adc_nids[2] = { 212static hda_nid_t stac9205_adc_nids[2] = {
208 0x12, 0x13 213 0x12, 0x13
209}; 214};
@@ -2688,7 +2693,6 @@ static int patch_stac927x(struct hda_codec *codec)
2688 spec->mux_nids = stac927x_mux_nids; 2693 spec->mux_nids = stac927x_mux_nids;
2689 spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids); 2694 spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
2690 spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids); 2695 spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
2691 spec->num_dmics = 0;
2692 spec->init = d965_core_init; 2696 spec->init = d965_core_init;
2693 spec->mixer = stac927x_mixer; 2697 spec->mixer = stac927x_mixer;
2694 break; 2698 break;
@@ -2697,7 +2701,6 @@ static int patch_stac927x(struct hda_codec *codec)
2697 spec->mux_nids = stac927x_mux_nids; 2701 spec->mux_nids = stac927x_mux_nids;
2698 spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids); 2702 spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
2699 spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids); 2703 spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
2700 spec->num_dmics = 0;
2701 spec->init = d965_core_init; 2704 spec->init = d965_core_init;
2702 spec->mixer = stac927x_mixer; 2705 spec->mixer = stac927x_mixer;
2703 break; 2706 break;
@@ -2706,11 +2709,20 @@ static int patch_stac927x(struct hda_codec *codec)
2706 spec->mux_nids = stac927x_mux_nids; 2709 spec->mux_nids = stac927x_mux_nids;
2707 spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids); 2710 spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
2708 spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids); 2711 spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
2709 spec->num_dmics = 0;
2710 spec->init = stac927x_core_init; 2712 spec->init = stac927x_core_init;
2711 spec->mixer = stac927x_mixer; 2713 spec->mixer = stac927x_mixer;
2712 } 2714 }
2713 2715
2716 switch (codec->subsystem_id) {
2717 case 0x1028020A: /* STAC 9228 */
2718 case 0x10280209: /* STAC 9228 */
2719 spec->dmic_nids = stac927x_dmic_nids;
2720 spec->num_dmics = STAC927X_NUM_DMICS;
2721 break;
2722 default:
2723 spec->num_dmics = 0;
2724 }
2725
2714 spec->multiout.dac_nids = spec->dac_nids; 2726 spec->multiout.dac_nids = spec->dac_nids;
2715 /* GPIO0 High = Enable EAPD */ 2727 /* GPIO0 High = Enable EAPD */
2716 spec->gpio_mask = spec->gpio_data = 0x00000001; 2728 spec->gpio_mask = spec->gpio_data = 0x00000001;