[alsa-devel] patch for Dell 1210 which using stac9221 codec

zhejiang zhe.jiang at intel.com
Thu Nov 1 03:14:55 CET 2007


On Wed, 2007-10-31 at 09:39 +0100, Takashi Iwai wrote:

> > So,we should patch the patch_sigmatel.c like that?
> 
> Yes, that's what I meant (almost same change I did in my local tree :)
> I'm going to split this to two pieces, the change of m82 pin config
> and the hack for multi-HP outs (also my last change to autocfg
> parser).
> 
> Anyway, could you give your sign-off?  Then I'll apply the patches to
> the HG tree for better testing.

Okay. Thanks

One minor issue:
The mic pin is always in the hp_outs and have the unsolicited response
ability.

If someone just plug the mic jack,the speaker will be muted.

How about this patch?
1.We may only return true in get_pin_presence() when it works as HP.
2.Trigger a unsol_event in stac92xx_io_switch_put();

Thanks!

diff -Nur a/alsa-driver-hg20071031/alsa-kernel/pci/hda/patch_sigmatel.c
b/alsa-driver-hg20071031/alsa-kernel/pci/hda/patch_sigmatel.c
--- a/alsa-driver-hg20071031/alsa-kernel/pci/hda/patch_sigmatel.c
2007-10-23 08:00:10.000000000 +0800
+++ b/alsa-driver-hg20071031/alsa-kernel/pci/hda/patch_sigmatel.c
2007-11-01 09:59:12.000000000 +0800
@@ -1552,6 +1552,9 @@
 			pinctl |= stac92xx_get_vref(codec, nid);
 		stac92xx_auto_set_pinctl(codec, nid, pinctl);
 	}
+
+	codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26);
+
         return 1;
 }
 
@@ -2409,8 +2412,14 @@
 	if (!nid)
 		return 0;
 	if (snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PIN_SENSE, 0x00)
-	    & (1 << 31))
-		return 1;
+	    & (1 << 31)) {
+		if (snd_hda_codec_read(codec, nid,
+			0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0x00) & AC_PINCTL_IN_EN)
+			return 0;
+		else
+			return 1;
+	}
+		
 	return 0;
 }
 


> 
> Thanks,
> 
> Takashi
> 


More information about the Alsa-devel mailing list