summaryrefslogtreecommitdiffstats
path: root/hda_intel-prealloc-4mb-dmabuffer.patch
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-07-29 16:46:31 -0700
committerJesse Keating <jkeating@redhat.com>2010-07-29 16:46:31 -0700
commit7a32965a104c3363e8505fe566531fcf071cced7 (patch)
treee45cb84552b2b022f49047bbddd9d887753c35bc /hda_intel-prealloc-4mb-dmabuffer.patch
parent64ba2e5ffde5f2418eb26c700cb0ab62b04e5013 (diff)
downloadkernel-7a32965a104c3363e8505fe566531fcf071cced7.tar.gz
kernel-7a32965a104c3363e8505fe566531fcf071cced7.tar.xz
kernel-7a32965a104c3363e8505fe566531fcf071cced7.zip
initial srpm import
Diffstat (limited to 'hda_intel-prealloc-4mb-dmabuffer.patch')
-rw-r--r--hda_intel-prealloc-4mb-dmabuffer.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/hda_intel-prealloc-4mb-dmabuffer.patch b/hda_intel-prealloc-4mb-dmabuffer.patch
new file mode 100644
index 000000000..36e6aca4f
--- /dev/null
+++ b/hda_intel-prealloc-4mb-dmabuffer.patch
@@ -0,0 +1,47 @@
+From c69fcbd1f60b0842f7c1ad2c95692ffd19c4932b Mon Sep 17 00:00:00 2001
+From: Kyle McMartin <kyle@phobos.i.jkkm.org>
+Date: Mon, 29 Mar 2010 23:56:08 -0400
+Subject: hda_intel-prealloc-4mb-dmabuffer
+
+---
+ sound/pci/hda/hda_intel.c | 14 +++++++++++++-
+ 1 files changed, 13 insertions(+), 1 deletions(-)
+
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
+index 4bb9067..37db515 100644
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -1986,6 +1986,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
+ struct azx_pcm *apcm;
+ int pcm_dev = cpcm->device;
+ int s, err;
++ size_t prealloc_min = 64*1024; /* 64KB */
+
+ if (pcm_dev >= HDA_MAX_PCMS) {
+ snd_printk(KERN_ERR SFX "Invalid PCM device number %d\n",
+@@ -2019,10 +2020,21 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
+ if (cpcm->stream[s].substreams)
+ snd_pcm_set_ops(pcm, s, &azx_pcm_ops);
+ }
++
+ /* buffer pre-allocation */
++
++ /* subtle, don't allocate a big buffer for modems...
++ * also, don't just test 32BIT_MASK, since azx supports
++ * 64-bit DMA in some cases.
++ */
++ /* lennart wants a 2.2MB buffer for 2sec of 48khz */
++ if (pcm->dev_class == SNDRV_PCM_CLASS_GENERIC &&
++ chip->pci->dma_mask >= DMA_32BIT_MASK)
++ prealloc_min = 4 * 1024 * 1024; /* 4MB */
++
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(chip->pci),
+- 1024 * 64, 32 * 1024 * 1024);
++ prealloc_min, 32 * 1024 * 1024);
+ return 0;
+ }
+
+--
+1.7.0.1
+