From owner-svn-src-head@FreeBSD.ORG Fri Mar 30 08:33:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB095106564A; Fri, 30 Mar 2012 08:33:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B603B8FC08; Fri, 30 Mar 2012 08:33:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2U8X8It032243; Fri, 30 Mar 2012 08:33:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2U8X8qM032241; Fri, 30 Mar 2012 08:33:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203300833.q2U8X8qM032241@svn.freebsd.org> From: Alexander Motin Date: Fri, 30 Mar 2012 08:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233692 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 08:33:08 -0000 Author: mav Date: Fri Mar 30 08:33:08 2012 New Revision: 233692 URL: http://svn.freebsd.org/changeset/base/233692 Log: Reenable unsolicited responses on CODEC if hdaa_sense_init() called again. This fixes jack connection events handling after suspend/resume. PR: kern/166382 MFC after: 1 week Modified: head/sys/dev/sound/pci/hda/hdaa.c Modified: head/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa.c Fri Mar 30 05:49:32 2012 (r233691) +++ head/sys/dev/sound/pci/hda/hdaa.c Fri Mar 30 08:33:08 2012 (r233692) @@ -612,10 +612,11 @@ hdaa_sense_init(struct hdaa_devinfo *dev 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));