Skip to contentSkip to conversation

Dmux mixer conflict

PATCH In review Matthew Ranostay 2 participants 3 messages Dec 18, 2007 – Dec 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Dmux mixer conflict

DMUX mixers need to be created before input source mixers, otherwise some STAC9228 codecs fail to record correctly or at all.

---

pci/hda/patch_sigmatel.c +6 -5
diff -r fbe3540c8df4 pci/hda/patch_sigmatel.c
@@ -834,15 +834,16 @@ static int stac92xx_build_controls(struc
 	if (err < 0)
 		return err;
 
-	for (i = 0; i < spec->num_mixers; i++) {
-		err = snd_hda_add_new_ctls(codec, spec->mixers[i]);
-		if (err < 0)
-			return err;
-	}
 	if (spec->num_dmuxes > 0) {
 		stac_dmux_mixer.count = spec->num_dmuxes;
 		err = snd_ctl_add(codec->bus->card,
 				  snd_ctl_new1(&stac_dmux_mixer, codec));
+		if (err < 0)
+			return err;
+	}
+
+	for (i = 0; i < spec->num_mixers; i++) {
+		err = snd_hda_add_new_ctls(codec, spec->mixers[i]);
 		if (err < 0)
 			return err;
 	}

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

#1 lore raw

At Tue, 18 Dec 2007 17:40:05 -0500,

Quoted 6 lines · Matthew Ranostay

DMUX mixers need to be created before input source mixers, otherwise some STAC9228 codecs fail to record correctly or at all.

---

The fix looks doubtful. The order of mixer elements should be irrelevant with the functionality.

I suspect it might be the result of failure of 'alsactl restore'. Some distros don't call alsactl properly with -F option. (This option is set default in the latest HG version now.)

Takashi

Quoted 25 lines

diff -r fbe3540c8df4 pci/hda/patch_sigmatel.c

pci/hda/patch_sigmatel.c +6 -5
@@ -834,15 +834,16 @@ static int stac92xx_build_controls(struc
 	if (err < 0)
 		return err;
 
-	for (i = 0; i < spec->num_mixers; i++) {
-		err = snd_hda_add_new_ctls(codec, spec->mixers[i]);
-		if (err < 0)
-			return err;
-	}
 	if (spec->num_dmuxes > 0) {
 		stac_dmux_mixer.count = spec->num_dmuxes;
 		err = snd_ctl_add(codec->bus->card,
 				  snd_ctl_new1(&stac_dmux_mixer, codec));
+		if (err < 0)
+			return err;
+	}
+
+	for (i = 0; i < spec->num_mixers; i++) {
+		err = snd_hda_add_new_ctls(codec, spec->mixers[i]);
 		if (err < 0)
 			return err;
 	}
#2 lore raw
Quoted 39 lines · Takashi Iwai

At Tue, 18 Dec 2007 17:40:05 -0500,

Quoted 6 lines · Matthew Ranostay

DMUX mixers need to be created before input source mixers, otherwise some STAC9228 codecs fail to record correctly or at all.

---

The fix looks doubtful. The order of mixer elements should be irrelevant with the functionality.

I suspect it might be the result of failure of 'alsactl restore'. Some distros don't call alsactl properly with -F option. (This option is set default in the latest HG version now.)

Takashi

Quoted 18 lines

diff -r fbe3540c8df4 pci/hda/patch_sigmatel.c

pci/hda/patch_sigmatel.c +2 -5
@@ -834,15 +834,16 @@ static int stac92xx_build_controls(struc
 	if (err < 0)
 		return err;
 
-	for (i = 0; i < spec->num_mixers; i++) {
-		err = snd_hda_add_new_ctls(codec, spec->mixers[i]);
-		if (err < 0)
-			return err;
-	}
 	if (spec->num_dmuxes > 0) {
 		stac_dmux_mixer.count = spec->num_dmuxes;
 		err = snd_ctl_add(codec->bus->card,
 				  snd_ctl_new1(&stac_dmux_mixer, codec));
+		if (err < 0)
+			return err;
Quoted 10 lines

pci/hda/patch_sigmatel.c static int stac92xx_build_controls(struc · line 849

Quoted 8 lines
pci/hda/patch_sigmatel.c +4 -0
+	}
+
+	for (i = 0; i < spec->num_mixers; i++) {
+		err = snd_hda_add_new_ctls(codec, spec->mixers[i]);
 		if (err < 0)
 			return err;
 	}

Ok thanks, I tried that and now it works as before.

-Matt Ranostay