Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2012 10:35:41 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        Brandon Gooch <jamesbrandongooch@gmail.com>
Cc:        freebsd-bugs@freebsd.org, eadler@freebsd.org
Subject:   Re: kern/166382: [patch] snd_hda(4) is in a bad state after suspend/resume cycle
Message-ID:  <4F7410CD.1000200@FreeBSD.org>
In-Reply-To: <CALBk6yJ3Zegx-YN3BuOjr-qav-qXW_VSSgOY=sGW4KCBNS3yNA@mail.gmail.com>
References:  <201203250422.q2P4MsBX047524@freefall.freebsd.org> <CALBk6yJ3Zegx-YN3BuOjr-qav-qXW_VSSgOY=sGW4KCBNS3yNA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------090809010902010702030901
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 03/29/12 03:26, Brandon Gooch wrote:
> On Sat, Mar 24, 2012 at 11:22 PM,<eadler@freebsd.org>  wrote:
>> Synopsis: [patch] snd_hda(4) is in a bad state after suspend/resume cycle
>>
>> Responsible-Changed-From-To: freebsd-bugs->mav
>> Responsible-Changed-By: eadler
>> Responsible-Changed-When: Sun Mar 25 04:22:54 UTC 2012
>> Responsible-Changed-Why:
>> over to maintainer
>>
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=166382
>
> Hey mav, thanks for taking a look and providing a patch!
> Unfortunately, it doesn't fix the suspend/resume issue  The headphone
> jack sense polling doesn't work after resume unless the callback is
> reinitialized.
>
> Does it hurt to reinit the callback in the case of both polling and
> non-polling configuartions?

Polling is always bad. It is needed only if CODEC can't send unsolicited 
responses for jack events. I think I see the real problem: unsolicited 
responses are not reconfigured on resume. Please try attached patch.

-- 
Alexander Motin

--------------090809010902010702030901
Content-Type: text/plain;
 name="hdaa.c.resume.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="hdaa.c.resume.patch"

Index: hdaa.c
===================================================================
--- hdaa.c	(revision 233600)
+++ hdaa.c	(working copy)
@@ -612,10 +612,11 @@
 		if (w == NULL || w->enable == 0 || w->type !=
 		    HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
 			continue;
-		if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap) &&
-		    w->unsol < 0) {
-			w->unsol = HDAC_UNSOL_ALLOC(
-			    device_get_parent(devinfo->dev), devinfo->dev, w->nid);
+		if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap)) {
+			if (w->unsol < 0)
+				w->unsol = HDAC_UNSOL_ALLOC(
+				    device_get_parent(devinfo->dev),
+				    devinfo->dev, w->nid);
 			hda_command(devinfo->dev,
 			    HDA_CMD_SET_UNSOLICITED_RESPONSE(0, w->nid,
 			    HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE | w->unsol));

--------------090809010902010702030901--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F7410CD.1000200>