Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2012 15:44:20 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230465 - head/sys/dev/sound/pci/hda
Message-ID:  <201201221544.q0MFiKDS082236@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) || \



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