[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: ALSA CVS update
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2003-09-30 10:02:13
[Download RAW message or body]
ChangeSet 1.1267.77.5, 2003/09/30 12:02:13+02:00, perex@suse.cz
ALSA CVS update
D:2003/09/30 09:58:53
C:Generic drivers
A:Jaroslav Kysela <perex@suse.cz>
F:drivers/dummy.c:1.25->1.26
L:Added emu10k1 emulation by Takashi
# This patch includes the following deltas:
# ChangeSet 1.1267.77.4 -> 1.1267.77.5
# sound/drivers/dummy.c 1.19 -> 1.20
#
dummy.c | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+)
diff -Nru a/sound/drivers/dummy.c b/sound/drivers/dummy.c
--- a/sound/drivers/dummy.c Thu Oct 9 09:06:38 2003
+++ b/sound/drivers/dummy.c Thu Oct 9 09:06:38 2003
@@ -41,6 +41,20 @@
#define MAX_PCM_SUBSTREAMS 16
#define MAX_MIDI_DEVICES 2
+#if 0 /* emu10k1 emulation */
+#define MAX_BUFFER_SIZE (128 * 1024)
+static int emu10k1_playback_constraints(snd_pcm_runtime_t *runtime)
+{
+ int err;
+ if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+ return err;
+ if ((err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX)) < 0)
+ return err;
+ return 0;
+}
+#define add_playback_constraints emu10k1_playback_constraints
+#endif
+
#if 0 /* RME9652 emulation */
#define MAX_BUFFER_SIZE (26 * 64 * 1024)
#define USE_FORMATS SNDRV_PCM_FMTBIT_S32_LE
@@ -102,6 +116,12 @@
#ifndef USE_PERIODS_MAX
#define USE_PERIODS_MAX 1024
#endif
+#ifndef add_playback_constraints
+#define add_playback_constraints(x) 0
+#endif
+#ifndef add_capture_constraints
+#define add_capture_constraints(x) 0
+#endif
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
@@ -325,6 +345,7 @@
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_card_dummy_pcm_t *dpcm;
+ int err;
dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL);
if (dpcm == NULL)
@@ -347,6 +368,11 @@
}
if (substream->pcm->device & 2)
runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID);
+ if ((err = add_playback_constraints(runtime)) < 0) {
+ snd_magic_kfree(dpcm);
+ return err;
+ }
+
return 0;
}
@@ -354,6 +380,7 @@
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_card_dummy_pcm_t *dpcm;
+ int err;
dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL);
if (dpcm == NULL)
@@ -377,6 +404,11 @@
}
if (substream->pcm->device & 2)
runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID);
+ if ((err = add_capture_constraints(runtime)) < 0) {
+ snd_magic_kfree(dpcm);
+ return err;
+ }
+
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic