Skip to contentSkip to conversation

hda: STAC9228 DMIC Support

PATCH In review Matthew Ranostay 2 participants 4 messages Oct 17, 2007 – Oct 18, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hda: STAC9228 DMIC Support

Added DMIC support for STAC9228 cards, as well as adding terminators to other hda_nid DMIC arrays, and added a new Vendor ID tag.
---

pci/hda/hda_codec.c +1 -0
diff -r e91f57f8127a pci/hda/hda_codec.c
@@ -55,6 +55,7 @@ static struct hda_vendor_id hda_vendor_i
 	{ 0x10ec, "Realtek" },
 	{ 0x1057, "Motorola" },
 	{ 0x1106, "VIA" },
+	{ 0x111d, "IDT" },
 	{ 0x11d4, "Analog Devices" },
 	{ 0x13f6, "C-Media" },
 	{ 0x14f1, "Conexant" },
pci/hda/patch_sigmatel.c +21 -7
diff -r e91f57f8127a pci/hda/patch_sigmatel.c
@@ -182,8 +182,9 @@ static hda_nid_t stac925x_dac_nids[1] = 
         0x02,
 };
 
-static hda_nid_t stac925x_dmic_nids[1] = {
-	0x15, 
+static hda_nid_t stac925x_dmic_nids[2] = {
+        0x15, 
+        0x00, /* terminator */
 };
 
 static hda_nid_t stac922x_adc_nids[2] = {
@@ -202,6 +203,11 @@ static hda_nid_t stac927x_mux_nids[3] = 
         0x15, 0x16, 0x17
 };
 
+static hda_nid_t stac927x_dmic_nids[3] = {
+        0x13, 0x14,
+        0x00, /* terminator */
+};
+
 static hda_nid_t stac9205_adc_nids[2] = {
         0x12, 0x13
 };
@@ -210,8 +216,9 @@ static hda_nid_t stac9205_mux_nids[2] = 
         0x19, 0x1a
 };
 
-static hda_nid_t stac9205_dmic_nids[2] = {
+static hda_nid_t stac9205_dmic_nids[3] = {
         0x17, 0x18,
+        0x00, /* terminator */
 };
 
 static hda_nid_t stac9200_pin_nids[8] = {
@@ -2716,7 +2723,6 @@ static int patch_stac927x(struct hda_cod
 		spec->mux_nids = stac927x_mux_nids;
 		spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
 		spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
-		spec->num_dmics = 0;
 		spec->init = d965_core_init;
 		spec->mixer = stac927x_mixer;
 		break;
@@ -2725,7 +2731,6 @@ static int patch_stac927x(struct hda_cod
 		spec->mux_nids = stac927x_mux_nids;
 		spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
 		spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
-		spec->num_dmics = 0;
 		spec->init = d965_core_init;
 		spec->mixer = stac927x_mixer;
 		break;
@@ -2734,9 +2739,18 @@ static int patch_stac927x(struct hda_cod
 		spec->mux_nids = stac927x_mux_nids;
 		spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
 		spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
-		spec->num_dmics = 0;
 		spec->init = stac927x_core_init;
 		spec->mixer = stac927x_mixer;
+	}
+
+	switch (codec->subsystem_id) {
+	case 0x1028020A: /* STAC 9228 */
+	case 0x10280209: /* STAC 9228 */
+		spec->dmic_nids = stac927x_dmic_nids;
+		spec->num_dmics = 2;
+		break;
+	default:
+		spec->num_dmics = 0;
 	}
 
 	spec->multiout.dac_nids = spec->dac_nids;
@@ -2798,7 +2812,7 @@ static int patch_stac9205(struct hda_cod
 	spec->mux_nids = stac9205_mux_nids;
 	spec->num_muxes = ARRAY_SIZE(stac9205_mux_nids);
 	spec->dmic_nids = stac9205_dmic_nids;
-	spec->num_dmics = ARRAY_SIZE(stac9205_dmic_nids);
+	spec->num_dmics = 2;
 	spec->dmux_nid = 0x1d;
 
 	spec->init = stac9205_core_init;

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Wed, 17 Oct 2007 14:44:27 -0400,

Quoted 5 lines · Matthew Ranostay

Added DMIC support for STAC9228 cards, as well as adding terminators to other hda_nid DMIC arrays, and added a new Vendor ID tag.
---

Thanks. But, the similar fix was already committed to HG tree (and merged to Linus kernel tree, too). Could you regenerate the patch for adding the missing things in your patch?

Takashi

#2 lore raw
Quoted 13 lines · Takashi Iwai

At Wed, 17 Oct 2007 14:44:27 -0400,

Quoted 4 lines · Matthew Ranostay

Added DMIC support for STAC9228 cards, as well as adding terminators to other hda_nid DMIC arrays, and added a new Vendor ID tag.
---

Thanks. But, the similar fix was already committed to HG tree (and merged to Linus kernel tree, too). Could you regenerate the patch for adding the missing things in your patch?

Ok recreated the patch below, by the way your hg-mirror.alsa-project.org HG tree seems to be out of sync with hg.alsa-project.org.

Quoted 2 lines

Takashi

Added DMIC support for STAC9228 cards, and a new vendor id tag. --

pci/hda/hda_codec.c +1 -0
diff -r fb9512ce24e0 pci/hda/hda_codec.c
@@ -55,6 +55,7 @@ static struct hda_vendor_id hda_vendor_i
 	{ 0x10ec, "Realtek" },
 	{ 0x1057, "Motorola" },
 	{ 0x1106, "VIA" },
+	{ 0x111d, "IDT" },
 	{ 0x11d4, "Analog Devices" },
 	{ 0x13f6, "C-Media" },
 	{ 0x14f1, "Conexant" },
pci/hda/patch_sigmatel.c +15 -3
diff -r fb9512ce24e0 pci/hda/patch_sigmatel.c
@@ -202,6 +202,11 @@ static hda_nid_t stac927x_adc_nids[3] = 
 
 static hda_nid_t stac927x_mux_nids[3] = {
         0x15, 0x16, 0x17
+};
+
+#define STAC927X_NUM_DMICS 2
+static hda_nid_t stac927x_dmic_nids[STAC927X_NUM_DMICS + 1] = {
+        0x13, 0x14, 0
 };
 
 static hda_nid_t stac9205_adc_nids[2] = {
@@ -2739,7 +2744,6 @@ static int patch_stac927x(struct hda_cod
 		spec->mux_nids = stac927x_mux_nids;
 		spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
 		spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
-		spec->num_dmics = 0;
 		spec->init = d965_core_init;
 		spec->mixer = stac927x_mixer;
 		break;
@@ -2748,7 +2752,6 @@ static int patch_stac927x(struct hda_cod
 		spec->mux_nids = stac927x_mux_nids;
 		spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
 		spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
-		spec->num_dmics = 0;
 		spec->init = d965_core_init;
 		spec->mixer = stac927x_mixer;
 		break;
@@ -2757,9 +2760,18 @@ static int patch_stac927x(struct hda_cod
 		spec->mux_nids = stac927x_mux_nids;
 		spec->num_muxes = ARRAY_SIZE(stac927x_mux_nids);
 		spec->num_adcs = ARRAY_SIZE(stac927x_adc_nids);
-		spec->num_dmics = 0;
 		spec->init = stac927x_core_init;
 		spec->mixer = stac927x_mixer;
+	}
+
+	switch (codec->subsystem_id) {
+	case 0x1028020A: /* STAC 9228 */
+	case 0x10280209: /* STAC 9228 */
+		spec->dmic_nids = stac927x_dmic_nids;
+		spec->num_dmics = STAC927X_NUM_DMICS;
+		break;
+	default:
+		spec->num_dmics = 0;	
 	}
 
 	spec->multiout.dac_nids = spec->dac_nids;

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#3 lore raw

At Thu, 18 Oct 2007 11:22:56 -0400,

Quoted 11 lines · Matthew Ranostay
Quoted 9 lines · Takashi Iwai

At Wed, 17 Oct 2007 14:44:27 -0400,

Quoted 5 lines · Matthew Ranostay

Added DMIC support for STAC9228 cards, as well as adding terminators to other hda_nid DMIC arrays, and added a new Vendor ID tag.
---

Quoted 7 lines
Quoted 5 lines

Thanks. But, the similar fix was already committed to HG tree (and merged to Linus kernel tree, too). Could you regenerate the patch for adding the missing things in your patch?

Ok recreated the patch below, by the way your hg-mirror.alsa-project.org HG tree seems to be out of sync with hg.alsa-project.org.

Yeah, this happens sometimes...

Quoted 5 lines
Quoted 2 lines

Takashi

Added DMIC support for STAC9228 cards, and a new vendor id tag. --

Thanks, now committed to ALSA HG tree.

Takashi