Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-07-14 17:26:51 +0200
committerTakashi Iwai <tiwai@suse.de>2011-07-14 17:26:51 +0200
commit40c7644df0e4477515e0280168d9412480404537 (patch)
tree13973b3f9d3aecff8911a202f7079ea576503028
parent0de37e18993ef84fbbbe2c66b2bf84cea4ec7499 (diff)
- ALSA: hda - Add Kconfig for the default buffer size
(bnc#682725). - Update config files. - Delete, replaced with the new upstream patch patches.drivers/alsa-hda-0019-Increase-default-buffer-size.
-rw-r--r--config/i386/debug1
-rw-r--r--config/i386/default1
-rw-r--r--config/i386/desktop1
-rw-r--r--config/i386/pae1
-rw-r--r--config/i386/trace1
-rw-r--r--config/i386/xen1
-rw-r--r--config/ia64/debug1
-rw-r--r--config/ia64/default1
-rw-r--r--config/ia64/trace1
-rw-r--r--config/x86_64/debug1
-rw-r--r--config/x86_64/default1
-rw-r--r--config/x86_64/desktop1
-rw-r--r--config/x86_64/trace1
-rw-r--r--config/x86_64/xen1
-rw-r--r--patches.drivers/alsa-hda-0019-Increase-default-buffer-size22
-rw-r--r--patches.drivers/alsa-hda-Add-Kconfig-for-the-default-buffer-size81
-rw-r--r--series.conf2
17 files changed, 96 insertions, 23 deletions
diff --git a/config/i386/debug b/config/i386/debug
index 07623171b1..3964eefa39 100644
--- a/config/i386/debug
+++ b/config/i386/debug
@@ -4367,6 +4367,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/i386/default b/config/i386/default
index 61f3131c0b..7cd548f948 100644
--- a/config/i386/default
+++ b/config/i386/default
@@ -4364,6 +4364,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/i386/desktop b/config/i386/desktop
index ab73ca31d7..f6e5a83f2c 100644
--- a/config/i386/desktop
+++ b/config/i386/desktop
@@ -4217,6 +4217,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/i386/pae b/config/i386/pae
index 1c58645561..7cb2cd1975 100644
--- a/config/i386/pae
+++ b/config/i386/pae
@@ -4217,6 +4217,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/i386/trace b/config/i386/trace
index 760dcc95b8..c73169ba6e 100644
--- a/config/i386/trace
+++ b/config/i386/trace
@@ -4217,6 +4217,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/i386/xen b/config/i386/xen
index bc3b05c49b..4b055f2b88 100644
--- a/config/i386/xen
+++ b/config/i386/xen
@@ -4038,6 +4038,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/ia64/debug b/config/ia64/debug
index fb50903761..ed72e3d391 100644
--- a/config/ia64/debug
+++ b/config/ia64/debug
@@ -3615,6 +3615,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/ia64/default b/config/ia64/default
index ac49c92082..db57f0a6f7 100644
--- a/config/ia64/default
+++ b/config/ia64/default
@@ -3597,6 +3597,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/ia64/trace b/config/ia64/trace
index c993385cc1..eb4efea377 100644
--- a/config/ia64/trace
+++ b/config/ia64/trace
@@ -3603,6 +3603,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/x86_64/debug b/config/x86_64/debug
index 6105231f2e..fe10bd7306 100644
--- a/config/x86_64/debug
+++ b/config/x86_64/debug
@@ -4129,6 +4129,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/x86_64/default b/config/x86_64/default
index 12652163c3..18980d97dd 100644
--- a/config/x86_64/default
+++ b/config/x86_64/default
@@ -4137,6 +4137,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/x86_64/desktop b/config/x86_64/desktop
index d74f147fd0..0108637f0f 100644
--- a/config/x86_64/desktop
+++ b/config/x86_64/desktop
@@ -4137,6 +4137,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/x86_64/trace b/config/x86_64/trace
index 33fddaee24..d78c957b29 100644
--- a/config/x86_64/trace
+++ b/config/x86_64/trace
@@ -4137,6 +4137,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/config/x86_64/xen b/config/x86_64/xen
index 576a23e4e8..678633f53a 100644
--- a/config/x86_64/xen
+++ b/config/x86_64/xen
@@ -3977,6 +3977,7 @@ CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_TEA575X=m
CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDA_PREALLOC_SIZE=1024
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
diff --git a/patches.drivers/alsa-hda-0019-Increase-default-buffer-size b/patches.drivers/alsa-hda-0019-Increase-default-buffer-size
deleted file mode 100644
index 4dd093c68b..0000000000
--- a/patches.drivers/alsa-hda-0019-Increase-default-buffer-size
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Takashi Iwai <tiwai@suse.de>
-Subject: ALSA: hda - Increase the default buffer size
-Patch-mainline: Never
-References: 682725
-
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
----
- sound/pci/hda/hda_intel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/sound/pci/hda/hda_intel.c
-+++ b/sound/pci/hda/hda_intel.c
-@@ -2057,7 +2057,7 @@
- /* buffer pre-allocation */
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
- snd_dma_pci_data(chip->pci),
-- 1024 * 64, 32 * 1024 * 1024);
-+ 1024 * 1024, 32 * 1024 * 1024);
- return 0;
- }
-
diff --git a/patches.drivers/alsa-hda-Add-Kconfig-for-the-default-buffer-size b/patches.drivers/alsa-hda-Add-Kconfig-for-the-default-buffer-size
new file mode 100644
index 0000000000..9321b1c545
--- /dev/null
+++ b/patches.drivers/alsa-hda-Add-Kconfig-for-the-default-buffer-size
@@ -0,0 +1,81 @@
+From acfa634f7e199193ec28282e82a5a6dd8edebcb7 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 12 Jul 2011 17:27:46 +0200
+Subject: [PATCH] ALSA: hda - Add Kconfig for the default buffer size
+Git-commit: acfa634f7e199193ec28282e82a5a6dd8edebcb7
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
+Patch-mainline: Submitted, to be in 3.1
+References: bnc#682725
+
+Add a Kconfig entry to specify the default buffer size.
+Distros using PulseAudio can choose a larger value here.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/pci/hda/Kconfig | 13 +++++++++++++
+ sound/pci/hda/hda_intel.c | 8 +++++++-
+ 2 files changed, 20 insertions(+), 1 deletions(-)
+
+diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
+index 70762fc..1f1a4ae 100644
+--- a/sound/pci/hda/Kconfig
++++ b/sound/pci/hda/Kconfig
+@@ -14,6 +14,19 @@ menuconfig SND_HDA_INTEL
+
+ if SND_HDA_INTEL
+
++config SND_HDA_PREALLOC_SIZE
++ int "Pre-allocated buffer size for HD-audio driver"
++ range 0 32768
++ default 64
++ help
++ Speficies the default pre-allocated buffer-size in kB for
++ HD-audio driver. A larger buffer (e.g. 2048) is preferred
++ for systems with PulseAudio. The default 64 is chosen just
++ from the compatibility reason.
++
++ Note that the pre-allocation size can be changed dynamically
++ via a proc file (/proc/asound/card*/pcm*/sub*/prealloc), too.
++
+ config SND_HDA_HWDEP
+ bool "Build hwdep interface for HD-audio driver"
+ select SND_HWDEP
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
+index 25619cd..5ce9531 100644
+--- a/sound/pci/hda/hda_intel.c
++++ b/sound/pci/hda/hda_intel.c
+@@ -2075,6 +2075,8 @@ static void azx_pcm_free(struct snd_pcm *pcm)
+ }
+ }
+
++#define MAX_PREALLOC_SIZE (32 * 1024 * 1024)
++
+ static int
+ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
+ struct hda_pcm *cpcm)
+@@ -2083,6 +2085,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
+ struct snd_pcm *pcm;
+ struct azx_pcm *apcm;
+ int pcm_dev = cpcm->device;
++ unsigned int size;
+ int s, err;
+
+ if (pcm_dev >= HDA_MAX_PCMS) {
+@@ -2118,9 +2121,12 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
+ snd_pcm_set_ops(pcm, s, &azx_pcm_ops);
+ }
+ /* buffer pre-allocation */
++ size = CONFIG_SND_HDA_PREALLOC_SIZE * 1024;
++ if (size > MAX_PREALLOC_SIZE)
++ size = MAX_PREALLOC_SIZE;
+ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
+ snd_dma_pci_data(chip->pci),
+- 1024 * 64, 32 * 1024 * 1024);
++ size, MAX_PREALLOC_SIZE);
+ return 0;
+ }
+
+--
+1.7.6
+
diff --git a/series.conf b/series.conf
index 44460ac316..aef6ee33bf 100644
--- a/series.conf
+++ b/series.conf
@@ -425,7 +425,7 @@
##########################################################
# Sound
##########################################################
- patches.drivers/alsa-hda-0019-Increase-default-buffer-size
+ patches.drivers/alsa-hda-Add-Kconfig-for-the-default-buffer-size
########################################################
# Char / serial