[alsa-devel] No sound with Sony VAIO VPCZ1 (ALC889)

Takashi Iwai tiwai at suse.de
Fri Jul 5 14:45:23 CEST 2013


At Fri, 05 Jul 2013 14:29:42 +0200,
Takashi Iwai wrote:
> 
> At Fri, 05 Jul 2013 14:00:45 +0200,
> Tormen wrote:
> > 
> > Hi,
> > 
> > Thanks for your answer! :))
> > 
> > On 05/07/13 07:29, Takashi Iwai wrote:
> > > At Fri, 05 Jul 2013 00:53:48 +0200,
> > > Tormen wrote:
> > >> Hi again,
> > >>
> > >> I digged again into google and stumbled across this thread from a year ago:
> > >> http://mailman.alsa-project.org/pipermail/alsa-devel/2012-March/050504.html
> > >>
> > >> I have the same Notebook than Adam.
> > >>
> > >> The thread stopped there. I contacted Adam and he confirmed me something
> > >> I also had noticed (but forgotten):
> > >>       The sound output via the speakers broke (went silent) between 3.1
> > >> and 3.2.
> > >>       It was working though for sometime between 3.2 and 3.9.6 - I
> > >> confirmed it to be working in 3.7!
> > >>       And now it is broken again.
> > > So, the speaker worked on *your* machine with 3.7 kernel?
> > Yes.
> > 
> > > Then I need alsa-info.sh output in the working state.
> > *WORKING* sound (speakers play sound and everything else (from what I've 
> > seen so far) seems as it should)
> > uname -a:
> > Linux seven 3.7-trunk-amd64 #1 SMP Debian 3.7.8-1~experimental.1 x86_64 
> > GNU/Linux
> > http://www.alsa-project.org/db/?f=3012ed619f55c49b279c24b74a8192f7a3ccd3e3
> > 
> > This was without pulseaudio, without /etc/asound.conf and without any 
> > kernel module parameters to snd and snd-intel-hda.
> > I had also tried 3.9.6 under this conditions, but same problem.
> > 
> > I guess you need more debug? Unfortunately alsa-compile complained that 
> > the linux-source-3.7 package vanished in the meantime from experimental.
> > But I guess I can figure that out if you need more debug output (as in 
> > the debian 3.7 kernel image I am using CONFIG_SND_DEBUG is not set).
> > 
> > > Didn't you read my previous reply...? 
> > Sorry, I had missed it.
> > 
> > > Give alsa-info.sh outputs (don't paste, use attachments). At best, 
> > > give the outputs from both working and non-working kernels. Without 
> > > these, I cannot debug further. thanks, Takashi 
> > *NON-working* sound (speakers don't play any sound, headphone out works 
> > fine)
> > uname -a:
> > Linux seven 3.9-0.bpo.1-amd64 #1 SMP Debian 3.9.6-1~bpo70+1 x86_64 GNU/Linux
> > http://www.alsa-project.org/db/?f=af6f9823cfa865872e84f9d4da569b2a72b071b0
> > 
> > This is the debian 3.9.6 kernel + alsa-compile to get "debug=2" for 
> > snd.ko module to work as by default the CONFIG_SND_DEBUG is not set in 
> > debian kernels.
> 
> OK, looking at two outputs, the difference is that the recent kernel
> allows the 5.1 output configuration with two mic jacks.  But, this
> looks rather strange as a laptop.  Does the machine have really two
> microphone jacks?  The BIOS sets pins 0x18 and 0x19 are mic jacks.
> 
> You have three items in "Capture Source", Internal Mic, Mic and Mic 1.
> Which inputs are working actually?  If one of the last two is bogus,
> we can disable it, then we can the unused pin.  For example, a patch
> to disable the pin 0x19 would be like below. 

Alternatively, the patch below will make the parser behavior like
3.7, i.e. ignoring the multi-I/O configuration.  Meanwhile, this will
keep two mic jacks, thus no automatic input source switching with this
configuration.


Takashi

---
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index c3c912d..42a0a39 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -454,6 +454,8 @@ The generic parser supports the following hints:
 - need_dac_fix (bool): limits the DACs depending on the channel count
 - primary_hp (bool): probe headphone jacks as the primary outputs;
   default true
+- multi_io (bool): try probing multi-I/O config (e.g. shared
+  line-in/surround, mic/clfe jacks)
 - multi_cap_vol (bool): provide multiple capture volumes
 - inv_dmic_split (bool): provide split internal mic volume/switch for
   phase-inverted digital mics
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 8e77cbb..0d34094 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -142,6 +142,9 @@ static void parse_user_hints(struct hda_codec *codec)
 	val = snd_hda_get_bool_hint(codec, "primary_hp");
 	if (val >= 0)
 		spec->no_primary_hp = !val;
+	val = snd_hda_get_bool_hint(codec, "multi_io");
+	if (val >= 0)
+		spec->no_multi_io = !val;
 	val = snd_hda_get_bool_hint(codec, "multi_cap_vol");
 	if (val >= 0)
 		spec->multi_cap_vol = !!val;
@@ -1541,7 +1544,8 @@ static int fill_and_eval_dacs(struct hda_codec *codec,
 					      cfg->speaker_pins,
 					      spec->multiout.extra_out_nid,
 					      spec->speaker_paths);
-			if (fill_mio_first && cfg->line_outs == 1 &&
+			if (!spec->no_multi_io &&
+			    fill_mio_first && cfg->line_outs == 1 &&
 			    cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) {
 				err = fill_multi_ios(codec, cfg->line_out_pins[0], true);
 				if (!err)
@@ -1554,7 +1558,7 @@ static int fill_and_eval_dacs(struct hda_codec *codec,
 				   spec->private_dac_nids, spec->out_paths,
 				   spec->main_out_badness);
 
-	if (fill_mio_first &&
+	if (!spec->no_multi_io && fill_mio_first &&
 	    cfg->line_outs == 1 && cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) {
 		/* try to fill multi-io first */
 		err = fill_multi_ios(codec, cfg->line_out_pins[0], false);
@@ -1582,7 +1586,8 @@ static int fill_and_eval_dacs(struct hda_codec *codec,
 			return err;
 		badness += err;
 	}
-	if (cfg->line_outs == 1 && cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) {
+	if (!spec->no_multi_io &&
+	    cfg->line_outs == 1 && cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) {
 		err = fill_multi_ios(codec, cfg->line_out_pins[0], false);
 		if (err < 0)
 			return err;
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index e199a85..48d4402 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -220,6 +220,7 @@ struct hda_gen_spec {
 	unsigned int hp_mic:1; /* Allow HP as a mic-in */
 	unsigned int suppress_hp_mic_detect:1; /* Don't detect HP/mic */
 	unsigned int no_primary_hp:1; /* Don't prefer HP pins to speaker pins */
+	unsigned int no_multi_io:1; /* Don't try multi I/O config */
 	unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */
 	unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */
 	unsigned int own_eapd_ctl:1; /* set EAPD by own function */
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 14ac9b0..a4a4344 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1840,8 +1840,10 @@ static void alc882_fixup_no_primary_hp(struct hda_codec *codec,
 				       const struct hda_fixup *fix, int action)
 {
 	struct alc_spec *spec = codec->spec;
-	if (action == HDA_FIXUP_ACT_PRE_PROBE)
+	if (action == HDA_FIXUP_ACT_PRE_PROBE) {
 		spec->gen.no_primary_hp = 1;
+		spec->gen.no_multi_io = 1;
+	}
 }
 
 static const struct hda_fixup alc882_fixups[] = {


More information about the Alsa-devel mailing list