summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-01-22 15:44:20 +0000
committermav <mav@FreeBSD.org>2012-01-22 15:44:20 +0000
commitfc1df62a26053d47f27ceb29ae7488c5b0ed82fb (patch)
tree399529107cd4e435a41fb060ff565631df4f5145
parent47a267281a18c3ec6dae857fa3d241f0291d5d7e (diff)
downloadFreeBSD-src-fc1df62a26053d47f27ceb29ae7488c5b0ed82fb.zip
FreeBSD-src-fc1df62a26053d47f27ceb29ae7488c5b0ed82fb.tar.gz
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.
-rw-r--r--sys/dev/sound/pci/hda/hdaa.c11
-rw-r--r--sys/dev/sound/pci/hda/hdac.c11
-rw-r--r--sys/dev/sound/pci/hda/hdac.h12
3 files changed, 12 insertions, 22 deletions
diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c
index dbed570..5f9badb 100644
--- a/sys/dev/sound/pci/hda/hdaa.c
+++ b/sys/dev/sound/pci/hda/hdaa.c
@@ -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");
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index da23e72..9c32cff 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -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 {
diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h
index d4fa32b..71fae4f 100644
--- a/sys/dev/sound/pci/hda/hdac.h
+++ b/sys/dev/sound/pci/hda/hdac.h
@@ -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) || \
OpenPOWER on IntegriCloud