Skip to contentSkip to conversation

hda: STAC92xx mono mixer controls

PATCH Applied Matthew Ranostay 2 participants 3 messages Jan 21, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 hda: STAC92xx mono mixer controls

Added mono mixer volume/switch controls for STAC9205 and STAC925x codecs.

---

pci/hda/patch_sigmatel.c +8 -0
diff -r 4177ec41bbef pci/hda/patch_sigmatel.c
@@ -572,6 +572,7 @@ static struct hda_verb stac925x_core_ini
 static struct hda_verb stac925x_core_init[] = {
 	/* set dac0mux for dac converter */
 	{ 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
+	{ 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	{}
 };
 
@@ -600,6 +601,7 @@ static struct hda_verb stac9205_core_ini
 static struct hda_verb stac9205_core_init[] = {
 	/* set master volume and direct control */	
 	{ 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
+	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	{}
 };
 
@@ -748,6 +750,9 @@ static struct snd_kcontrol_new stac92hd7
 
 static struct snd_kcontrol_new stac925x_mixer[] = {
 	STAC_INPUT_SOURCE(1),
+	HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x10, 0x1, 0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x10, 0x1, 0, HDA_OUTPUT),
+
 	HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT),
 	HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT),
 	HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT),
@@ -757,6 +762,9 @@ static struct snd_kcontrol_new stac9205_
 static struct snd_kcontrol_new stac9205_mixer[] = {
 	STAC_INPUT_SOURCE(2),
 	STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0, 1),
+
+	HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x14, 0x1, 0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x14, 0x1, 0, HDA_OUTPUT),
 
 	HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT),
 	HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT),
#1 lore raw

At Mon, 21 Jan 2008 12:12:31 -0500,

Quoted 4 lines · Matthew Ranostay

Added mono mixer volume/switch controls for STAC9205 and STAC925x codecs.

Shouldn't they be also dynamically created? Or, BIOS won't set them up properly?

Takashi

Quoted 41 lines

---
diff -r 4177ec41bbef pci/hda/patch_sigmatel.c

pci/hda/patch_sigmatel.c +8 -0
@@ -572,6 +572,7 @@ static struct hda_verb stac925x_core_ini
 static struct hda_verb stac925x_core_init[] = {
 	/* set dac0mux for dac converter */
 	{ 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
+	{ 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	{}
 };
 
@@ -600,6 +601,7 @@ static struct hda_verb stac9205_core_ini
 static struct hda_verb stac9205_core_init[] = {
 	/* set master volume and direct control */	
 	{ 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
+	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	{}
 };
 
@@ -748,6 +750,9 @@ static struct snd_kcontrol_new stac92hd7
 
 static struct snd_kcontrol_new stac925x_mixer[] = {
 	STAC_INPUT_SOURCE(1),
+	HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x10, 0x1, 0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x10, 0x1, 0, HDA_OUTPUT),
+
 	HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT),
 	HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT),
 	HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT),
@@ -757,6 +762,9 @@ static struct snd_kcontrol_new stac9205_
 static struct snd_kcontrol_new stac9205_mixer[] = {
 	STAC_INPUT_SOURCE(2),
 	STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0, 1),
+
+	HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x14, 0x1, 0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x14, 0x1, 0, HDA_OUTPUT),
 
 	HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT),
 	HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT),
#2 lore raw
Quoted 8 lines · Takashi Iwai

At Mon, 21 Jan 2008 12:12:31 -0500,

Quoted 3 lines · Matthew Ranostay

Added mono mixer volume/switch controls for STAC9205 and STAC925x codecs.

Shouldn't they be also dynamically created? Or, BIOS won't set them up properly?

Actually that would be the best solution, I'll get back to you with an updated patch.

Quoted 46 lines

Takashi

Quoted 41 lines

---
diff -r 4177ec41bbef pci/hda/patch_sigmatel.c

pci/hda/patch_sigmatel.c +8 -0
@@ -572,6 +572,7 @@ static struct hda_verb stac925x_core_ini
 static struct hda_verb stac925x_core_init[] = {
 	/* set dac0mux for dac converter */
 	{ 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
+	{ 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	{}
 };
 
@@ -600,6 +601,7 @@ static struct hda_verb stac9205_core_ini
 static struct hda_verb stac9205_core_init[] = {
 	/* set master volume and direct control */	
 	{ 0x24, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
+	{ 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	{}
 };
 
@@ -748,6 +750,9 @@ static struct snd_kcontrol_new stac92hd7
 
 static struct snd_kcontrol_new stac925x_mixer[] = {
 	STAC_INPUT_SOURCE(1),
+	HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x10, 0x1, 0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x10, 0x1, 0, HDA_OUTPUT),
+
 	HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT),
 	HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT),
 	HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT),
@@ -757,6 +762,9 @@ static struct snd_kcontrol_new stac9205_
 static struct snd_kcontrol_new stac9205_mixer[] = {
 	STAC_INPUT_SOURCE(2),
 	STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0, 1),
+
+	HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x14, 0x1, 0, HDA_OUTPUT),
+	HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x14, 0x1, 0, HDA_OUTPUT),
 
 	HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT),
 	HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT),