From owner-svn-src-all@FreeBSD.ORG Sun Jan 22 15:44:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47AE5106564A; Sun, 22 Jan 2012 15:44:21 +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 1C87F8FC13; Sun, 22 Jan 2012 15:44:21 +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 q0MFiLAk082240; Sun, 22 Jan 2012 15:44:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0MFiKDS082236; Sun, 22 Jan 2012 15:44:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201201221544.q0MFiKDS082236@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Jan 2012 15:44:20 +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: r230465 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2012 15:44:21 -0000 Author: mav Date: Sun Jan 22 15:44:20 2012 New Revision: 230465 URL: http://svn.freebsd.org/changeset/base/230465 Log: Increase snd_hda(4) default maximal buffer size from 16K to 64K and maximal from 64K to 256K. We usually don't need 750 sound interrupts per second (1.3ms latency) when playing 192K/24/8 stream. 187 should be better. On usual 48K/16/2 it is just enough for hw.snd.latency=9 at hw.snd.latency_profile=1 with 23 and 6 interrupts per second. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/dev/sound/pci/hda/hdaa.c head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/hda/hdac.h Modified: head/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa.c Sun Jan 22 14:04:42 2012 (r230464) +++ head/sys/dev/sound/pci/hda/hdaa.c Sun Jan 22 15:44:20 2012 (r230465) @@ -74,17 +74,6 @@ static const struct { #define HDAA_QUIRKS_TAB_LEN \ (sizeof(hdaa_quirks_tab) / sizeof(hdaa_quirks_tab[0])) -#define HDA_BDL_MIN 2 -#define HDA_BDL_MAX 256 -#define HDA_BDL_DEFAULT HDA_BDL_MIN - -#define HDA_BLK_MIN HDA_DMA_ALIGNMENT -#define HDA_BLK_ALIGN (~(HDA_BLK_MIN - 1)) - -#define HDA_BUFSZ_MIN 4096 -#define HDA_BUFSZ_MAX 65536 -#define HDA_BUFSZ_DEFAULT 16384 - #define HDA_PARSE_MAXDEPTH 10 MALLOC_DEFINE(M_HDAA, "hdaa", "HDA Audio"); Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sun Jan 22 14:04:42 2012 (r230464) +++ head/sys/dev/sound/pci/hda/hdac.c Sun Jan 22 15:44:20 2012 (r230465) @@ -70,17 +70,6 @@ static const struct { #define HDAC_QUIRKS_TAB_LEN \ (sizeof(hdac_quirks_tab) / sizeof(hdac_quirks_tab[0])) -#define HDA_BDL_MIN 2 -#define HDA_BDL_MAX 256 -#define HDA_BDL_DEFAULT HDA_BDL_MIN - -#define HDA_BLK_MIN HDA_DMA_ALIGNMENT -#define HDA_BLK_ALIGN (~(HDA_BLK_MIN - 1)) - -#define HDA_BUFSZ_MIN 4096 -#define HDA_BUFSZ_MAX 65536 -#define HDA_BUFSZ_DEFAULT 16384 - MALLOC_DEFINE(M_HDAC, "hdac", "HDA Controller"); static const struct { Modified: head/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.h Sun Jan 22 14:04:42 2012 (r230464) +++ head/sys/dev/sound/pci/hda/hdac.h Sun Jan 22 15:44:20 2012 (r230465) @@ -521,6 +521,18 @@ ****************************************************************************/ #define HDA_DMA_ALIGNMENT 128 + +#define HDA_BDL_MIN 2 +#define HDA_BDL_MAX 256 +#define HDA_BDL_DEFAULT HDA_BDL_MIN + +#define HDA_BLK_MIN HDA_DMA_ALIGNMENT +#define HDA_BLK_ALIGN (~(HDA_BLK_MIN - 1)) + +#define HDA_BUFSZ_MIN (HDA_BDL_MIN * HDA_BLK_MIN) +#define HDA_BUFSZ_MAX 262144 +#define HDA_BUFSZ_DEFAULT 65536 + #define HDA_GPIO_MAX 8 #define HDA_DEV_MATCH(fl, v) ((fl) == (v) || \