===================================================================
ChangeSet@1.605.2.13, 2002-09-25 15:23:53+02:00, perex@pnote.perex-int.cz
ALSA update 2002/06/26
- Enhanced bitmasks in PCM - added support for more formats by Takashi and me
- RME32 driver - added support for ADAT (Digi 32/8)
include/sound/asound.h | 41 +++++---
include/sound/pcm.h | 90 ++++++++++-------
include/sound/pcm_params.h | 88 +++++++++++------
include/sound/version.h | 2
sound/core/ioctl32/pcm32.c | 89 +++++++++++++++++
sound/core/oss/io.c | 1
sound/core/oss/pcm_oss.c | 21 ++--
sound/core/oss/pcm_plugin.c | 26 ++---
sound/core/oss/pcm_plugin.h | 4
sound/core/pcm.c | 12 ++
sound/core/pcm_lib.c | 26 ++++-
sound/core/pcm_misc.c | 116 +++++++++++++++++++++-
sound/core/pcm_native.c | 138 ++++++++++++++++++++++++---
sound/core/seq/oss/Makefile | 6 -
sound/isa/Makefile | 2
sound/isa/ad1848/ad1848_lib.c | 2
sound/isa/cs423x/cs4231_lib.c | 1
sound/isa/es18xx.c | 1
sound/isa/gus/gus_pcm.c | 1
sound/pci/korg1212/korg1212.c | 1
sound/pci/rme32.c | 212 +++++++++++++++++++++++++++++++++++++++---
sound/pci/rme96.c | 1
sound/pci/via8233.c | 4
23 files changed, 736 insertions(+), 149 deletions(-)
diff -Nru a/include/sound/asound.h b/include/sound/asound.h
--- a/include/sound/asound.h Sun Sep 29 20:20:12 2002
+++ b/include/sound/asound.h Sun Sep 29 20:20:12 2002
@@ -128,7 +128,7 @@
* *
*****************************************************************************/
-#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1)
+#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 2)
typedef unsigned long sndrv_pcm_uframes_t;
typedef long sndrv_pcm_sframes_t;
@@ -191,7 +191,19 @@
SNDRV_PCM_FORMAT_MPEG,
SNDRV_PCM_FORMAT_GSM,
SNDRV_PCM_FORMAT_SPECIAL = 31,
- SNDRV_PCM_FORMAT_LAST = 31,
+ SNDRV_PCM_FORMAT_S24_3LE = 32, /* in three bytes */
+ SNDRV_PCM_FORMAT_S24_3BE, /* in three bytes */
+ SNDRV_PCM_FORMAT_U24_3LE, /* in three bytes */
+ SNDRV_PCM_FORMAT_U24_3BE, /* in three bytes */
+ SNDRV_PCM_FORMAT_S20_3LE, /* in three bytes */
+ SNDRV_PCM_FORMAT_S20_3BE, /* in three bytes */
+ SNDRV_PCM_FORMAT_U20_3LE, /* in three bytes */
+ SNDRV_PCM_FORMAT_U20_3BE, /* in three bytes */
+ SNDRV_PCM_FORMAT_S18_3LE, /* in three bytes */
+ SNDRV_PCM_FORMAT_S18_3BE, /* in three bytes */
+ SNDRV_PCM_FORMAT_U18_3LE, /* in three bytes */
+ SNDRV_PCM_FORMAT_U18_3BE, /* in three bytes */
+ SNDRV_PCM_FORMAT_LAST = SNDRV_PCM_FORMAT_U18_3BE,
#ifdef SNDRV_LITTLE_ENDIAN
SNDRV_PCM_FORMAT_S16 = SNDRV_PCM_FORMAT_S16_LE,
@@ -284,7 +296,7 @@
SNDRV_PCM_HW_PARAM_SUBFORMAT, /* Subformat */
SNDRV_PCM_HW_PARAM_LAST_MASK = SNDRV_PCM_HW_PARAM_SUBFORMAT,
- SNDRV_PCM_HW_PARAM_SAMPLE_BITS, /* Bits per sample */
+ SNDRV_PCM_HW_PARAM_SAMPLE_BITS = 8, /* Bits per sample */
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL = SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
SNDRV_PCM_HW_PARAM_FRAME_BITS, /* Bits per frame */
SNDRV_PCM_HW_PARAM_CHANNELS, /* Channels */
@@ -298,8 +310,7 @@
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, /* Size of buffer in frames */
SNDRV_PCM_HW_PARAM_BUFFER_BYTES, /* Size of buffer in bytes */
SNDRV_PCM_HW_PARAM_TICK_TIME, /* Approx tick duration in us */
- SNDRV_PCM_HW_PARAM_LAST_INTERVAL = SNDRV_PCM_HW_PARAM_TICK_TIME,
- SNDRV_PCM_HW_PARAM_LAST = SNDRV_PCM_HW_PARAM_LAST_INTERVAL,
+ SNDRV_PCM_HW_PARAM_LAST_INTERVAL = SNDRV_PCM_HW_PARAM_TICK_TIME
};
#define SNDRV_PCM_HW_PARAMS_RUNTIME (1<<0)
@@ -312,20 +323,28 @@
empty:1;
};
+#define SNDRV_MASK_MAX 256
+
+struct sndrv_mask {
+ u_int32_t bits[(SNDRV_MASK_MAX+31)/32];
+};
+
struct sndrv_pcm_hw_params {
unsigned int flags;
- unsigned int masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
- SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
+ struct sndrv_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
+ SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
+ struct sndrv_mask mres[5]; /* reserved masks */
struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
- unsigned int rmask;
- unsigned int cmask;
+ struct sndrv_interval ires[9]; /* reserved intervals */
+ unsigned int rmask; /* W: requested masks */
+ unsigned int cmask; /* R: changed masks */
unsigned int info; /* R: Info flags for returned setup */
unsigned int msbits; /* R: used most significant bits */
unsigned int rate_num; /* R: rate numerator */
unsigned int rate_den; /* R: rate denominator */
sndrv_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */
- unsigned char reserved[64];
+ unsigned char reserved[64]; /* reserved for future */
};
enum sndrv_pcm_tstamp {
@@ -345,7 +364,7 @@
sndrv_pcm_uframes_t silence_threshold; /* min distance from noise for silence filling */
sndrv_pcm_uframes_t silence_size; /* silence block size */
sndrv_pcm_uframes_t boundary; /* pointers wrap point */
- unsigned char reserved[64];
+ unsigned char reserved[64]; /* reserved for future */
};
struct sndrv_pcm_channel_info {
diff -Nru a/include/sound/pcm.h b/include/sound/pcm.h
--- a/include/sound/pcm.h Sun Sep 29 20:20:12 2002
+++ b/include/sound/pcm.h Sun Sep 29 20:20:12 2002
@@ -48,6 +48,7 @@
typedef struct sndrv_pcm_status snd_pcm_status_t;
typedef struct sndrv_pcm_mmap_status snd_pcm_mmap_status_t;
typedef struct sndrv_pcm_mmap_control snd_pcm_mmap_control_t;
+typedef struct sndrv_mask snd_mask_t;
#define _snd_pcm_substream_chip(substream) ((substream)->pcm->private_data)
#define snd_pcm_substream_chip(substream) snd_magic_cast1(chip_t, _snd_pcm_substream_chip(substream), return -ENXIO)
@@ -67,7 +68,7 @@
typedef struct _snd_pcm_hardware {
unsigned int info; /* SNDRV_PCM_INFO_* */
- unsigned int formats; /* SNDRV_PCM_FMTBIT_* */
+ u64 formats; /* SNDRV_PCM_FMTBIT_* */
unsigned int rates; /* SNDRV_PCM_RATE_* */
unsigned int rate_min; /* min rate */
unsigned int rate_max; /* max rate */
@@ -148,32 +149,44 @@
SNDRV_PCM_RATE_88200|SNDRV_PCM_RATE_96000)
#define SNDRV_PCM_RATE_8000_192000 (SNDRV_PCM_RATE_8000_96000|SNDRV_PCM_RATE_176400|\
SNDRV_PCM_RATE_192000)
-#define SNDRV_PCM_FMTBIT_S8 (1 << SNDRV_PCM_FORMAT_S8)
-#define SNDRV_PCM_FMTBIT_U8 (1 << SNDRV_PCM_FORMAT_U8)
-#define SNDRV_PCM_FMTBIT_S16_LE (1 << SNDRV_PCM_FORMAT_S16_LE)
-#define SNDRV_PCM_FMTBIT_S16_BE (1 << SNDRV_PCM_FORMAT_S16_BE)
-#define SNDRV_PCM_FMTBIT_U16_LE (1 << SNDRV_PCM_FORMAT_U16_LE)
-#define SNDRV_PCM_FMTBIT_U16_BE (1 << SNDRV_PCM_FORMAT_U16_BE)
-#define SNDRV_PCM_FMTBIT_S24_LE (1 << SNDRV_PCM_FORMAT_S24_LE)
-#define SNDRV_PCM_FMTBIT_S24_BE (1 << SNDRV_PCM_FORMAT_S24_BE)
-#define SNDRV_PCM_FMTBIT_U24_LE (1 << SNDRV_PCM_FORMAT_U24_LE)
-#define SNDRV_PCM_FMTBIT_U24_BE (1 << SNDRV_PCM_FORMAT_U24_BE)
-#define SNDRV_PCM_FMTBIT_S32_LE (1 << SNDRV_PCM_FORMAT_S32_LE)
-#define SNDRV_PCM_FMTBIT_S32_BE (1 << SNDRV_PCM_FORMAT_S32_BE)
-#define SNDRV_PCM_FMTBIT_U32_LE (1 << SNDRV_PCM_FORMAT_U32_LE)
-#define SNDRV_PCM_FMTBIT_U32_BE (1 << SNDRV_PCM_FORMAT_U32_BE)
-#define SNDRV_PCM_FMTBIT_FLOAT_LE (1 << SNDRV_PCM_FORMAT_FLOAT_LE)
-#define SNDRV_PCM_FMTBIT_FLOAT_BE (1 << SNDRV_PCM_FORMAT_FLOAT_BE)
-#define SNDRV_PCM_FMTBIT_FLOAT64_LE (1 << SNDRV_PCM_FORMAT_FLOAT64_LE)
-#define SNDRV_PCM_FMTBIT_FLOAT64_BE (1 << SNDRV_PCM_FORMAT_FLOAT64_BE)
-#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE (1 << SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE)
-#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE (1 << SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE)
-#define SNDRV_PCM_FMTBIT_MU_LAW (1 << SNDRV_PCM_FORMAT_MU_LAW)
-#define SNDRV_PCM_FMTBIT_A_LAW (1 << SNDRV_PCM_FORMAT_A_LAW)
-#define SNDRV_PCM_FMTBIT_IMA_ADPCM (1 << SNDRV_PCM_FORMAT_IMA_ADPCM)
-#define SNDRV_PCM_FMTBIT_MPEG (1 << SNDRV_PCM_FORMAT_MPEG)
-#define SNDRV_PCM_FMTBIT_GSM (1 << SNDRV_PCM_FORMAT_GSM)
-#define SNDRV_PCM_FMTBIT_SPECIAL (1 << SNDRV_PCM_FORMAT_SPECIAL)
+#define SNDRV_PCM_FMTBIT_S8 (1ULL << SNDRV_PCM_FORMAT_S8)
+#define SNDRV_PCM_FMTBIT_U8 (1ULL << SNDRV_PCM_FORMAT_U8)
+#define SNDRV_PCM_FMTBIT_S16_LE (1ULL << SNDRV_PCM_FORMAT_S16_LE)
+#define SNDRV_PCM_FMTBIT_S16_BE (1ULL << SNDRV_PCM_FORMAT_S16_BE)
+#define SNDRV_PCM_FMTBIT_U16_LE (1ULL << SNDRV_PCM_FORMAT_U16_LE)
+#define SNDRV_PCM_FMTBIT_U16_BE (1ULL << SNDRV_PCM_FORMAT_U16_BE)
+#define SNDRV_PCM_FMTBIT_S24_LE (1ULL << SNDRV_PCM_FORMAT_S24_LE)
+#define SNDRV_PCM_FMTBIT_S24_BE (1ULL << SNDRV_PCM_FORMAT_S24_BE)
+#define SNDRV_PCM_FMTBIT_U24_LE (1ULL << SNDRV_PCM_FORMAT_U24_LE)
+#define SNDRV_PCM_FMTBIT_U24_BE (1ULL << SNDRV_PCM_FORMAT_U24_BE)
+#define SNDRV_PCM_FMTBIT_S32_LE (1ULL << SNDRV_PCM_FORMAT_S32_LE)
+#define SNDRV_PCM_FMTBIT_S32_BE (1ULL << SNDRV_PCM_FORMAT_S32_BE)
+#define SNDRV_PCM_FMTBIT_U32_LE (1ULL << SNDRV_PCM_FORMAT_U32_LE)
+#define SNDRV_PCM_FMTBIT_U32_BE (1ULL << SNDRV_PCM_FORMAT_U32_BE)
+#define SNDRV_PCM_FMTBIT_FLOAT_LE (1ULL << SNDRV_PCM_FORMAT_FLOAT_LE)
+#define SNDRV_PCM_FMTBIT_FLOAT_BE (1ULL << SNDRV_PCM_FORMAT_FLOAT_BE)
+#define SNDRV_PCM_FMTBIT_FLOAT64_LE (1ULL << SNDRV_PCM_FORMAT_FLOAT64_LE)
+#define SNDRV_PCM_FMTBIT_FLOAT64_BE (1ULL << SNDRV_PCM_FORMAT_FLOAT64_BE)
+#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE (1ULL << SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE)
+#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE (1ULL << SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE)
+#define SNDRV_PCM_FMTBIT_MU_LAW (1ULL << SNDRV_PCM_FORMAT_MU_LAW)
+#define SNDRV_PCM_FMTBIT_A_LAW (1ULL << SNDRV_PCM_FORMAT_A_LAW)
+#define SNDRV_PCM_FMTBIT_IMA_ADPCM (1ULL << SNDRV_PCM_FORMAT_IMA_ADPCM)
+#define SNDRV_PCM_FMTBIT_MPEG (1ULL << SNDRV_PCM_FORMAT_MPEG)
+#define SNDRV_PCM_FMTBIT_GSM (1ULL << SNDRV_PCM_FORMAT_GSM)
+#define SNDRV_PCM_FMTBIT_SPECIAL (1ULL << SNDRV_PCM_FORMAT_SPECIAL)
+#define SNDRV_PCM_FMTBIT_S24_3LE (1ULL << SNDRV_PCM_FORMAT_S24_3LE)
+#define SNDRV_PCM_FMTBIT_U24_3LE (1ULL << SNDRV_PCM_FORMAT_U24_3LE)
+#define SNDRV_PCM_FMTBIT_S24_3BE (1ULL << SNDRV_PCM_FORMAT_S24_3BE)
+#define SNDRV_PCM_FMTBIT_U24_3BE (1ULL << SNDRV_PCM_FORMAT_U24_3BE)
+#define SNDRV_PCM_FMTBIT_S20_3LE (1ULL << SNDRV_PCM_FORMAT_S20_3LE)
+#define SNDRV_PCM_FMTBIT_U20_3LE (1ULL << SNDRV_PCM_FORMAT_U20_3LE)
+#define SNDRV_PCM_FMTBIT_S20_3BE (1ULL << SNDRV_PCM_FORMAT_S20_3BE)
+#define SNDRV_PCM_FMTBIT_U20_3BE (1ULL << SNDRV_PCM_FORMAT_U20_3BE)
+#define SNDRV_PCM_FMTBIT_S18_3LE (1ULL << SNDRV_PCM_FORMAT_S18_3LE)
+#define SNDRV_PCM_FMTBIT_U18_3LE (1ULL << SNDRV_PCM_FORMAT_U18_3LE)
+#define SNDRV_PCM_FMTBIT_S18_3BE (1ULL << SNDRV_PCM_FORMAT_S18_3BE)
+#define SNDRV_PCM_FMTBIT_U18_3BE (1ULL << SNDRV_PCM_FORMAT_U18_3BE)
#ifdef SNDRV_LITTLE_ENDIAN
#define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE
@@ -217,8 +230,8 @@
};
typedef struct _snd_pcm_hw_constraints {
- unsigned int masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
- SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
+ snd_mask_t masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
+ SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
snd_interval_t intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
unsigned int rules_num;
@@ -226,8 +239,8 @@
snd_pcm_hw_rule_t *rules;
} snd_pcm_hw_constraints_t;
-static inline unsigned int *constrs_mask(snd_pcm_hw_constraints_t *constrs,
- snd_pcm_hw_param_t var)
+static inline snd_mask_t *constrs_mask(snd_pcm_hw_constraints_t *constrs,
+ snd_pcm_hw_param_t var)
{
return &constrs->masks[var - SNDRV_PCM_HW_PARAM_FIRST_MASK];
}
@@ -648,13 +661,10 @@
var <= SNDRV_PCM_HW_PARAM_LAST_INTERVAL;
}
-typedef unsigned int snd_mask_t;
-#define SND_MASK_MAX 32
-
static inline snd_mask_t *hw_param_mask(snd_pcm_hw_params_t *params,
snd_pcm_hw_param_t var)
{
- return (snd_mask_t*)¶ms->masks[var - SNDRV_PCM_HW_PARAM_FIRST_MASK];
+ return ¶ms->masks[var - SNDRV_PCM_HW_PARAM_FIRST_MASK];
}
static inline snd_interval_t *hw_param_interval(snd_pcm_hw_params_t *params,
@@ -675,9 +685,9 @@
return (const snd_interval_t *)hw_param_interval((snd_pcm_hw_params_t*) params, var);
}
-#define params_access(p) (ffs(*hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS)) - 1)
-#define params_format(p) (ffs(*hw_param_mask((p), SNDRV_PCM_HW_PARAM_FORMAT)) - 1)
-#define params_subformat(p) (ffs(*hw_param_mask((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) - 1)
+#define params_access(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS))
+#define params_format(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_FORMAT))
+#define params_subformat(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_SUBFORMAT))
#define params_channels(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min
#define params_rate(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_RATE)->min
#define params_period_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min
@@ -735,7 +745,9 @@
int snd_pcm_hw_constraints_complete(snd_pcm_substream_t *substream);
int snd_pcm_hw_constraint_mask(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
- unsigned int mask);
+ u_int32_t mask);
+int snd_pcm_hw_constraint_mask64(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
+ u_int64_t mask);
int snd_pcm_hw_constraint_minmax(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
unsigned int min, unsigned int max);
int snd_pcm_hw_constraint_integer(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var);
diff -Nru a/include/sound/pcm_params.h b/include/sound/pcm_params.h
--- a/include/sound/pcm_params.h Sun Sep 29 20:20:12 2002
+++ b/include/sound/pcm_params.h Sun Sep 29 20:20:12 2002
@@ -36,10 +36,14 @@
snd_pcm_hw_param_t var, unsigned int val, int dir);
/* To share the same code we have alsa-lib */
-#define snd_mask_bits(mask) (*(mask))
#define INLINE static inline
#define assert(a) (void)(a)
+#define SNDRV_MASK_BITS 64 /* we use so far 64bits only */
+#define SNDRV_MASK_SIZE (SNDRV_MASK_BITS / 32)
+#define MASK_OFS(i) ((i) >> 5)
+#define MASK_BIT(i) (1U << ((i) & 31))
+
INLINE unsigned int ld2(u_int32_t v)
{
unsigned r = 0;
@@ -72,91 +76,119 @@
INLINE void snd_mask_none(snd_mask_t *mask)
{
- snd_mask_bits(mask) = 0;
+ memset(mask, 0, sizeof(*mask));
}
INLINE void snd_mask_any(snd_mask_t *mask)
{
- snd_mask_bits(mask) = ~0U;
-}
-
-INLINE void snd_mask_load(snd_mask_t *mask, unsigned int msk)
-{
- snd_mask_bits(mask) = msk;
+ memset(mask, 0xff, SNDRV_MASK_SIZE * sizeof(u_int32_t));
}
INLINE int snd_mask_empty(const snd_mask_t *mask)
{
- return snd_mask_bits(mask) == 0;
+ int i;
+ for (i = 0; i < SNDRV_MASK_SIZE; i++)
+ if (mask->bits[i])
+ return 0;
+ return 1;
}
INLINE unsigned int snd_mask_min(const snd_mask_t *mask)
{
+ int i;
assert(!snd_mask_empty(mask));
- return ffs(snd_mask_bits(mask)) - 1;
+ for (i = 0; i < SNDRV_MASK_SIZE; i++) {
+ if (mask->bits[i])
+ return ffs(mask->bits[i]) - 1 + (i << 5);
+ }
+ return 0;
}
INLINE unsigned int snd_mask_max(const snd_mask_t *mask)
{
+ int i;
assert(!snd_mask_empty(mask));
- return ld2(snd_mask_bits(mask));
+ for (i = SNDRV_MASK_SIZE - 1; i >= 0; i--) {
+ if (mask->bits[i])
+ return ld2(mask->bits[i]) + (i << 5);
+ }
+ return 0;
}
INLINE void snd_mask_set(snd_mask_t *mask, unsigned int val)
{
- assert(val <= SND_MASK_MAX);
- snd_mask_bits(mask) |= (1U << val);
+ assert(val <= SNDRV_MASK_BITS);
+ mask->bits[MASK_OFS(val)] |= MASK_BIT(val);
}
INLINE void snd_mask_reset(snd_mask_t *mask, unsigned int val)
{
- assert(val <= SND_MASK_MAX);
- snd_mask_bits(mask) &= ~(1U << val);
+ assert(val <= SNDRV_MASK_BITS);
+ mask->bits[MASK_OFS(val)] &= ~MASK_BIT(val);
}
INLINE void snd_mask_set_range(snd_mask_t *mask, unsigned int from, unsigned int to)
{
- assert(to <= SND_MASK_MAX && from <= to);
- snd_mask_bits(mask) |= ((1U << (from - to + 1)) - 1) << from;
+ int i;
+ assert(to <= SNDRV_MASK_BITS && from <= to);
+ for (i = from; i <= to; i++)
+ mask->bits[MASK_OFS(i)] |= MASK_BIT(i);
}
INLINE void snd_mask_reset_range(snd_mask_t *mask, unsigned int from, unsigned int to)
{
- assert(to <= SND_MASK_MAX && from <= to);
- snd_mask_bits(mask) &= ~(((1U << (from - to + 1)) - 1) << from);
+ int i;
+ assert(to <= SNDRV_MASK_BITS && from <= to);
+ for (i = from; i <= to; i++)
+ mask->bits[MASK_OFS(i)] &= ~MASK_BIT(i);
}
INLINE void snd_mask_leave(snd_mask_t *mask, unsigned int val)
{
- assert(val <= SND_MASK_MAX);
- snd_mask_bits(mask) &= 1U << val;
+ unsigned int v;
+ assert(val <= SNDRV_MASK_BITS);
+ v = mask->bits[MASK_OFS(val)] & MASK_BIT(val);
+ snd_mask_none(mask);
+ mask->bits[MASK_OFS(val)] = v;
}
INLINE void snd_mask_intersect(snd_mask_t *mask, const snd_mask_t *v)
{
- snd_mask_bits(mask) &= snd_mask_bits(v);
+ int i;
+ for (i = 0; i < SNDRV_MASK_SIZE; i++)
+ mask->bits[i] &= v->bits[i];
}
INLINE int snd_mask_eq(const snd_mask_t *mask, const snd_mask_t *v)
{
- return snd_mask_bits(mask) == snd_mask_bits(v);
+ return ! memcmp(mask, v, SNDRV_MASK_SIZE * sizeof(u_int32_t));
}
INLINE void snd_mask_copy(snd_mask_t *mask, const snd_mask_t *v)
{
- snd_mask_bits(mask) = snd_mask_bits(v);
+ *mask = *v;
}
INLINE int snd_mask_test(const snd_mask_t *mask, unsigned int val)
{
- assert(val <= SND_MASK_MAX);
- return snd_mask_bits(mask) & (1U << val);
+ assert(val <= SNDRV_MASK_BITS);
+ return mask->bits[MASK_OFS(val)] & MASK_BIT(val);
}
INLINE int snd_mask_single(const snd_mask_t *mask)
{
+ int i, c = 0;
assert(!snd_mask_empty(mask));
- return !(snd_mask_bits(mask) & (snd_mask_bits(mask) - 1));
+ for (i = 0; i < SNDRV_MASK_SIZE; i++) {
+ if (! mask->bits[i])
+ continue;
+ if (mask->bits[i] & (mask->bits[i] - 1))
+ return 0;
+ if (c)
+ return 0;
+ c++;
+ }
+ return 1;
}
INLINE int snd_mask_refine(snd_mask_t *mask, const snd_mask_t *v)
@@ -204,7 +236,7 @@
assert(!snd_mask_empty(mask));
if (snd_mask_max(mask) <= val)
return 0;
- snd_mask_reset_range(mask, val + 1, SND_MASK_MAX);
+ snd_mask_reset_range(mask, val + 1, SNDRV_MASK_BITS);
if (snd_mask_empty(mask))
return -EINVAL;
return 1;
diff -Nru a/include/sound/version.h b/include/sound/version.h
--- a/include/sound/version.h Sun Sep 29 20:20:12 2002
+++ b/include/sound/version.h Sun Sep 29 20:20:12 2002
@@ -1,3 +1,3 @@
/* include/version.h. Generated automatically by configure. */
#define CONFIG_SND_VERSION "0.9.0rc2"
-#define CONFIG_SND_DATE " (Fri Jun 21 12:21:17 2002 UTC)"
+#define CONFIG_SND_DATE " (Wed Jun 26 18:12:42 2002 UTC)"
diff -Nru a/sound/core/ioctl32/pcm32.c b/sound/core/ioctl32/pcm32.c
--- a/sound/core/ioctl32/pcm32.c Sun Sep 29 20:20:12 2002
+++ b/sound/core/ioctl32/pcm32.c Sun Sep 29 20:20:12 2002
@@ -303,12 +303,94 @@
}
+struct sndrv_pcm_hw_params_old32 {
+ u32 flags;
+ u32 masks[SNDRV_PCM_HW_PARAM_SUBFORMAT -
+ SNDRV_PCM_HW_PARAM_ACCESS + 1];
+ struct sndrv_interval32 intervals[SNDRV_PCM_HW_PARAM_TICK_TIME -
+ SNDRV_PCM_HW_PARAM_SAMPLE_BITS + 1];
+ u32 rmask;
+ u32 cmask;
+ u32 info;
+ u32 msbits;
+ u32 rate_num;
+ u32 rate_den;
+ u32 fifo_size;
+ unsigned char reserved[64];
+} __attribute__((packed));
+
+#define __OLD_TO_NEW_MASK(x) ((x&7)|((x&0x07fffff8)<<5))
+#define __NEW_TO_OLD_MASK(x) ((x&7)|((x&0xffffff00)>>5))
+
+static void snd_pcm_hw_convert_from_old_params(snd_pcm_hw_params_t *params, struct sndrv_pcm_hw_params_old32 *oparams)
+{
+ unsigned int i;
+
+ memset(params, 0, sizeof(*params));
+ params->flags = oparams->flags;
+ for (i = 0; i < sizeof(oparams->masks) / sizeof(unsigned int); i++)
+ params->masks[i].bits[0] = oparams->masks[i];
+ memcpy(params->intervals, oparams->intervals, sizeof(oparams->intervals));
+ params->rmask = __OLD_TO_NEW_MASK(oparams->rmask);
+ params->cmask = __OLD_TO_NEW_MASK(oparams->cmask);
+ params->info = oparams->info;
+ params->msbits = oparams->msbits;
+ params->rate_num = oparams->rate_num;
+ params->rate_den = oparams->rate_den;
+ params->fifo_size = oparams->fifo_size;
+}
+
+static void snd_pcm_hw_convert_to_old_params(struct sndrv_pcm_hw_params_old32 *oparams, snd_pcm_hw_params_t *params)
+{
+ unsigned int i;
+
+ memset(oparams, 0, sizeof(*oparams));
+ oparams->flags = params->flags;
+ for (i = 0; i < sizeof(oparams->masks) / sizeof(unsigned int); i++)
+ oparams->masks[i] = params->masks[i].bits[0];
+ memcpy(oparams->intervals, params->intervals, sizeof(oparams->intervals));
+ oparams->rmask = __NEW_TO_OLD_MASK(params->rmask);
+ oparams->cmask = __NEW_TO_OLD_MASK(params->cmask);
+ oparams->info = params->info;
+ oparams->msbits = params->msbits;
+ oparams->rate_num = params->rate_num;
+ oparams->rate_den = params->rate_den;
+ oparams->fifo_size = params->fifo_size;
+}
+
+static int _snd_ioctl32_pcm_hw_params_old(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
+{
+ struct sndrv_pcm_hw_params_old32 data32;
+ struct sndrv_pcm_hw_params data;
+ mm_segment_t oldseg = get_fs();
+ int err;
+ set_fs(KERNEL_DS);
+ if (copy_from_user(&data32, (void*)arg, sizeof(data32))) {
+ err = -EFAULT;
+ goto __err;
+ }
+ snd_pcm_hw_convert_from_old_params(&data, &data32);
+ err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
+ if (err < 0)
+ goto __err;
+ snd_pcm_hw_convert_to_old_params(&data32, &data);
+ if (copy_to_user((void*)arg, &data32, sizeof(data32))) {
+ err = -EFAULT;
+ goto __err;
+ }
+ __err: set_fs(oldseg);
+ return err;
+}
+
+
/*
*/
DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_refine, pcm_hw_params, SNDRV_PCM_IOCTL_HW_REFINE);
-DEFINE_ALSA_IOCTL_ENTRY(pcm_sw_params, pcm_sw_params, SNDRV_PCM_IOCTL_SW_PARAMS);
DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_params, pcm_hw_params, SNDRV_PCM_IOCTL_HW_PARAMS);
+DEFINE_ALSA_IOCTL_ENTRY(pcm_sw_params, pcm_sw_params, SNDRV_PCM_IOCTL_SW_PARAMS);
+DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_refine_old, pcm_hw_params_old, SNDRV_PCM_IOCTL_HW_REFINE);
+DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_params_old, pcm_hw_params_old, SNDRV_PCM_IOCTL_HW_PARAMS);
DEFINE_ALSA_IOCTL_ENTRY(pcm_status, pcm_status, SNDRV_PCM_IOCTL_STATUS);
DEFINE_ALSA_IOCTL_ENTRY(pcm_delay, pcm_sframes_str, SNDRV_PCM_IOCTL_DELAY);
DEFINE_ALSA_IOCTL_ENTRY(pcm_channel_info, pcm_channel_info, SNDRV_PCM_IOCTL_CHANNEL_INFO);
@@ -335,6 +417,9 @@
SNDRV_PCM_IOCTL_READI_FRAMES32 = _IOR('A', 0x51, struct sndrv_xferi32),
SNDRV_PCM_IOCTL_WRITEN_FRAMES32 = _IOW('A', 0x52, struct sndrv_xfern32),
SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct sndrv_xfern32),
+ SNDRV_PCM_IOCTL_HW_REFINE_OLD32 = _IOWR('A', 0x10, struct sndrv_pcm_hw_params_old32),
+ SNDRV_PCM_IOCTL_HW_PARAMS_OLD32 = _IOWR('A', 0x11, struct sndrv_pcm_hw_params_old32),
+
};
struct ioctl32_mapper pcm_mappers[] = {
@@ -342,6 +427,8 @@
{ SNDRV_PCM_IOCTL_INFO, NULL },
{ SNDRV_PCM_IOCTL_HW_REFINE32, AP(pcm_hw_refine) },
{ SNDRV_PCM_IOCTL_HW_PARAMS32, AP(pcm_hw_params) },
+ { SNDRV_PCM_IOCTL_HW_REFINE_OLD32, AP(pcm_hw_refine_old) },
+ { SNDRV_PCM_IOCTL_HW_PARAMS_OLD32, AP(pcm_hw_params_old) },
{ SNDRV_PCM_IOCTL_HW_FREE, NULL },
{ SNDRV_PCM_IOCTL_SW_PARAMS32, AP(pcm_sw_params) },
{ SNDRV_PCM_IOCTL_STATUS32, AP(pcm_status) },
diff -Nru a/sound/core/oss/io.c b/sound/core/oss/io.c
--- a/sound/core/oss/io.c Sun Sep 29 20:20:12 2002
+++ b/sound/core/oss/io.c Sun Sep 29 20:20:12 2002
@@ -24,6 +24,7 @@
#include <linux/time.h>
#include <sound/core.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include "pcm_plugin.h"
#define pcm_write(plug,buf,count) snd_pcm_oss_write3(plug,buf,count,1)
diff -Nru a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
--- a/sound/core/oss/pcm_oss.c Sun Sep 29 20:20:12 2002
+++ b/sound/core/oss/pcm_oss.c Sun Sep 29 20:20:12 2002
@@ -267,8 +267,8 @@
int err;
int direct;
int format, sformat, n;
- unsigned int sformat_mask;
- unsigned int mask;
+ snd_mask_t sformat_mask;
+ snd_mask_t mask;
if (atomic_read(&runtime->mmap_count)) {
direct = 1;
@@ -280,12 +280,13 @@
_snd_pcm_hw_params_any(&sparams);
_snd_pcm_hw_param_setinteger(&sparams, SNDRV_PCM_HW_PARAM_PERIODS);
_snd_pcm_hw_param_min(&sparams, SNDRV_PCM_HW_PARAM_PERIODS, 2, 0);
+ snd_mask_none(&mask);
if (atomic_read(&runtime->mmap_count))
- mask = 1 << SNDRV_PCM_ACCESS_MMAP_INTERLEAVED;
+ snd_mask_set(&mask, SNDRV_PCM_ACCESS_MMAP_INTERLEAVED);
else {
- mask = 1 << SNDRV_PCM_ACCESS_RW_INTERLEAVED;
+ snd_mask_set(&mask, SNDRV_PCM_ACCESS_RW_INTERLEAVED);
if (!direct)
- mask |= 1 << SNDRV_PCM_ACCESS_RW_NONINTERLEAVED;
+ snd_mask_set(&mask, SNDRV_PCM_ACCESS_RW_NONINTERLEAVED);
}
err = snd_pcm_hw_param_mask(substream, &sparams, SNDRV_PCM_HW_PARAM_ACCESS, &mask);
if (err < 0) {
@@ -301,11 +302,11 @@
if (direct)
sformat = format;
else
- sformat = snd_pcm_plug_slave_format(format, sformat_mask);
+ sformat = snd_pcm_plug_slave_format(format, &sformat_mask);
- if (sformat < 0 || !(sformat_mask & (1 << sformat))) {
+ if (sformat < 0 || !snd_mask_test(&sformat_mask, sformat)) {
for (sformat = 0; sformat <= SNDRV_PCM_FORMAT_LAST; sformat++) {
- if ((sformat_mask & (1 << sformat)) &&
+ if (snd_mask_test(&sformat_mask, sformat) &&
snd_pcm_oss_format_to(sformat) >= 0)
break;
}
@@ -935,7 +936,7 @@
int direct;
snd_pcm_hw_params_t params;
unsigned int formats = 0;
- unsigned int format_mask;
+ snd_mask_t format_mask;
int fmt;
if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
return err;
@@ -955,7 +956,7 @@
snd_assert(err >= 0, return err);
format_mask = *hw_param_mask(¶ms, SNDRV_PCM_HW_PARAM_FORMAT);
for (fmt = 0; fmt < 32; ++fmt) {
- if (format_mask & (1 << fmt)) {
+ if (snd_mask_test(&format_mask, fmt)) {
int f = snd_pcm_oss_format_to(fmt);
if (f >= 0)
formats |= f;
diff -Nru a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
--- a/sound/core/oss/pcm_plugin.c Sun Sep 29 20:20:12 2002
+++ b/sound/core/oss/pcm_plugin.c Sun Sep 29 20:20:12 2002
@@ -31,6 +31,7 @@
#include <linux/vmalloc.h>
#include <sound/core.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include "pcm_plugin.h"
#define snd_pcm_plug_first(plug) ((plug)->runtime->oss.plugin_first)
@@ -280,20 +281,23 @@
return frames;
}
-unsigned int snd_pcm_plug_formats(unsigned int formats)
+static int snd_pcm_plug_formats(snd_mask_t *mask, int format)
{
- int linfmts = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |
+ snd_mask_t formats = *mask;
+ u64 linfmts = (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 |
SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_U16_BE | SNDRV_PCM_FMTBIT_S16_BE |
SNDRV_PCM_FMTBIT_U24_LE | SNDRV_PCM_FMTBIT_S24_LE |
SNDRV_PCM_FMTBIT_U24_BE | SNDRV_PCM_FMTBIT_S24_BE |
SNDRV_PCM_FMTBIT_U32_LE | SNDRV_PCM_FMTBIT_S32_LE |
SNDRV_PCM_FMTBIT_U32_BE | SNDRV_PCM_FMTBIT_S32_BE);
- formats |= SNDRV_PCM_FMTBIT_MU_LAW;
+ snd_mask_set(&formats, SNDRV_PCM_FORMAT_MU_LAW);
- if (formats & linfmts)
- formats |= linfmts;
- return formats;
+ if (formats.bits[0] & (u32)linfmts)
+ formats.bits[0] |= (u32)linfmts;
+ if (formats.bits[1] & (u32)(linfmts >> 32))
+ formats.bits[1] |= (u32)(linfmts >> 32);
+ return snd_mask_test(&formats, format);
}
static int preferred_formats[] = {
@@ -313,11 +317,11 @@
SNDRV_PCM_FORMAT_U8
};
-int snd_pcm_plug_slave_format(int format, unsigned int format_mask)
+int snd_pcm_plug_slave_format(int format, snd_mask_t *format_mask)
{
- if (format_mask & (1 << format))
+ if (snd_mask_test(format_mask, format))
return format;
- if ((snd_pcm_plug_formats(format_mask) & (1 << format)) == 0)
+ if (! snd_pcm_plug_formats(format_mask, format))
return -EINVAL;
if (snd_pcm_format_linear(format)) {
int width = snd_pcm_format_width(format);
@@ -333,7 +337,7 @@
for (sgn = 0; sgn < 2; ++sgn) {
format1 = snd_pcm_build_linear_format(width1, unsignd1, big1);
if (format1 >= 0 &&
- format_mask & (1 << format1))
+ snd_mask_test(format_mask, format1))
goto _found;
unsignd1 = !unsignd1;
}
@@ -354,7 +358,7 @@
case SNDRV_PCM_FORMAT_MU_LAW:
for (i = 0; i < sizeof(preferred_formats) / sizeof(preferred_formats[0]); ++i) {
int format1 = preferred_formats[i];
- if (format_mask & (1 << format1))
+ if (snd_mask_test(format_mask, format1))
return format1;
}
default:
diff -Nru a/sound/core/oss/pcm_plugin.h b/sound/core/oss/pcm_plugin.h
--- a/sound/core/oss/pcm_plugin.h Sun Sep 29 20:20:12 2002
+++ b/sound/core/oss/pcm_plugin.h Sun Sep 29 20:20:12 2002
@@ -197,13 +197,11 @@
snd_pcm_plugin_format_t *dst_format,
snd_pcm_plugin_t **r_plugin);
-unsigned int snd_pcm_plug_formats(unsigned int formats);
-
int snd_pcm_plug_format_plugins(snd_pcm_plug_t *substream,
snd_pcm_hw_params_t *params,
snd_pcm_hw_params_t *slave_params);
-int snd_pcm_plug_slave_format(int format, unsigned int format_mask);
+int snd_pcm_plug_slave_format(int format, snd_mask_t *format_mask);
int snd_pcm_plugin_append(snd_pcm_plugin_t *plugin);
diff -Nru a/sound/core/pcm.c b/sound/core/pcm.c
--- a/sound/core/pcm.c Sun Sep 29 20:20:12 2002
+++ b/sound/core/pcm.c Sun Sep 29 20:20:13 2002
@@ -184,6 +184,18 @@
FORMAT(MPEG),
FORMAT(GSM),
FORMAT(SPECIAL),
+ FORMAT(S24_3LE),
+ FORMAT(S24_3BE),
+ FORMAT(U24_3LE),
+ FORMAT(U24_3BE),
+ FORMAT(S20_3LE),
+ FORMAT(S20_3BE),
+ FORMAT(U20_3LE),
+ FORMAT(U20_3BE),
+ FORMAT(S18_3LE),
+ FORMAT(S18_3BE),
+ FORMAT(U18_3LE),
+ FORMAT(U18_3BE),
};
char *snd_pcm_subformat_names[] = {
diff -Nru a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
--- a/sound/core/pcm_lib.c Sun Sep 29 20:20:12 2002
+++ b/sound/core/pcm_lib.c Sun Sep 29 20:20:12 2002
@@ -810,12 +810,26 @@
}
int snd_pcm_hw_constraint_mask(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
- unsigned int mask)
+ u_int32_t mask)
{
snd_pcm_hw_constraints_t *constrs = &runtime->hw_constraints;
- unsigned int *maskp = constrs_mask(constrs, var);
- *maskp &= mask;
- if (*maskp == 0)
+ snd_mask_t *maskp = constrs_mask(constrs, var);
+ *maskp->bits &= mask;
+ memset(maskp->bits + 1, 0, (SNDRV_MASK_MAX-32) / 8); /* clear rest */
+ if (*maskp->bits == 0)
+ return -EINVAL;
+ return 0;
+}
+
+int snd_pcm_hw_constraint_mask64(snd_pcm_runtime_t *runtime, snd_pcm_hw_param_t var,
+ u_int64_t mask)
+{
+ snd_pcm_hw_constraints_t *constrs = &runtime->hw_constraints;
+ snd_mask_t *maskp = constrs_mask(constrs, var);
+ maskp->bits[0] &= (u_int32_t)mask;
+ maskp->bits[1] &= (u_int32_t)(mask >> 32);
+ memset(maskp->bits + 2, 0, (SNDRV_MASK_MAX-64) / 8); /* clear rest */
+ if (! maskp->bits[0] && ! maskp->bits[1])
return -EINVAL;
return 0;
}
@@ -982,7 +996,9 @@
{
unsigned int k;
memset(params, 0, sizeof(*params));
- for (k = 0; k <= SNDRV_PCM_HW_PARAM_LAST; k++)
+ for (k = SNDRV_PCM_HW_PARAM_FIRST_MASK; k <= SNDRV_PCM_HW_PARAM_LAST_MASK; k++)
+ _snd_pcm_hw_param_any(params, k);
+ for (k = SNDRV_PCM_HW_PARAM_FIRST_INTERVAL; k <= SNDRV_PCM_HW_PARAM_LAST_INTERVAL; k++)
_snd_pcm_hw_param_any(params, k);
params->info = ~0U;
}
diff -Nru a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c
--- a/sound/core/pcm_misc.c Sun Sep 29 20:20:12 2002
+++ b/sound/core/pcm_misc.c Sun Sep 29 20:20:12 2002
@@ -41,6 +41,12 @@
case SNDRV_PCM_FORMAT_S24_BE:
case SNDRV_PCM_FORMAT_S32_LE:
case SNDRV_PCM_FORMAT_S32_BE:
+ case SNDRV_PCM_FORMAT_S24_3LE:
+ case SNDRV_PCM_FORMAT_S24_3BE:
+ case SNDRV_PCM_FORMAT_S20_3LE:
+ case SNDRV_PCM_FORMAT_S20_3BE:
+ case SNDRV_PCM_FORMAT_S18_3LE:
+ case SNDRV_PCM_FORMAT_S18_3BE:
return 1;
case SNDRV_PCM_FORMAT_U8:
case SNDRV_PCM_FORMAT_U16_LE:
@@ -49,6 +55,12 @@
case SNDRV_PCM_FORMAT_U24_BE:
case SNDRV_PCM_FORMAT_U32_LE:
case SNDRV_PCM_FORMAT_U32_BE:
+ case SNDRV_PCM_FORMAT_U24_3LE:
+ case SNDRV_PCM_FORMAT_U24_3BE:
+ case SNDRV_PCM_FORMAT_U20_3LE:
+ case SNDRV_PCM_FORMAT_U20_3BE:
+ case SNDRV_PCM_FORMAT_U18_3LE:
+ case SNDRV_PCM_FORMAT_U18_3BE:
return 0;
default:
return -EINVAL;
@@ -82,6 +94,12 @@
case SNDRV_PCM_FORMAT_FLOAT_LE:
case SNDRV_PCM_FORMAT_FLOAT64_LE:
case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE:
+ case SNDRV_PCM_FORMAT_S24_3LE:
+ case SNDRV_PCM_FORMAT_S20_3LE:
+ case SNDRV_PCM_FORMAT_S18_3LE:
+ case SNDRV_PCM_FORMAT_U24_3LE:
+ case SNDRV_PCM_FORMAT_U20_3LE:
+ case SNDRV_PCM_FORMAT_U18_3LE:
return 1;
case SNDRV_PCM_FORMAT_S16_BE:
case SNDRV_PCM_FORMAT_U16_BE:
@@ -92,6 +110,12 @@
case SNDRV_PCM_FORMAT_FLOAT_BE:
case SNDRV_PCM_FORMAT_FLOAT64_BE:
case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE:
+ case SNDRV_PCM_FORMAT_S24_3BE:
+ case SNDRV_PCM_FORMAT_S20_3BE:
+ case SNDRV_PCM_FORMAT_S18_3BE:
+ case SNDRV_PCM_FORMAT_U24_3BE:
+ case SNDRV_PCM_FORMAT_U20_3BE:
+ case SNDRV_PCM_FORMAT_U18_3BE:
return 0;
default:
return -EINVAL;
@@ -128,10 +152,24 @@
case SNDRV_PCM_FORMAT_U16_LE:
case SNDRV_PCM_FORMAT_U16_BE:
return 16;
+ case SNDRV_PCM_FORMAT_S18_3LE:
+ case SNDRV_PCM_FORMAT_S18_3BE:
+ case SNDRV_PCM_FORMAT_U18_3LE:
+ case SNDRV_PCM_FORMAT_U18_3BE:
+ return 18;
+ case SNDRV_PCM_FORMAT_S20_3LE:
+ case SNDRV_PCM_FORMAT_S20_3BE:
+ case SNDRV_PCM_FORMAT_U20_3LE:
+ case SNDRV_PCM_FORMAT_U20_3BE:
+ return 20;
case SNDRV_PCM_FORMAT_S24_LE:
case SNDRV_PCM_FORMAT_S24_BE:
case SNDRV_PCM_FORMAT_U24_LE:
case SNDRV_PCM_FORMAT_U24_BE:
+ case SNDRV_PCM_FORMAT_S24_3LE:
+ case SNDRV_PCM_FORMAT_S24_3BE:
+ case SNDRV_PCM_FORMAT_U24_3LE:
+ case SNDRV_PCM_FORMAT_U24_3BE:
return 24;
case SNDRV_PCM_FORMAT_S32_LE:
case SNDRV_PCM_FORMAT_S32_BE:
@@ -167,6 +205,19 @@
case SNDRV_PCM_FORMAT_U16_LE:
case SNDRV_PCM_FORMAT_U16_BE:
return 16;
+ case SNDRV_PCM_FORMAT_S18_3LE:
+ case SNDRV_PCM_FORMAT_S18_3BE:
+ case SNDRV_PCM_FORMAT_U18_3LE:
+ case SNDRV_PCM_FORMAT_U18_3BE:
+ case SNDRV_PCM_FORMAT_S20_3LE:
+ case SNDRV_PCM_FORMAT_S20_3BE:
+ case SNDRV_PCM_FORMAT_U20_3LE:
+ case SNDRV_PCM_FORMAT_U20_3BE:
+ case SNDRV_PCM_FORMAT_S24_3LE:
+ case SNDRV_PCM_FORMAT_S24_3BE:
+ case SNDRV_PCM_FORMAT_U24_3LE:
+ case SNDRV_PCM_FORMAT_U24_3BE:
+ return 24;
case SNDRV_PCM_FORMAT_S24_LE:
case SNDRV_PCM_FORMAT_S24_BE:
case SNDRV_PCM_FORMAT_U24_LE:
@@ -204,6 +255,19 @@
case SNDRV_PCM_FORMAT_U16_LE:
case SNDRV_PCM_FORMAT_U16_BE:
return samples * 2;
+ case SNDRV_PCM_FORMAT_S18_3LE:
+ case SNDRV_PCM_FORMAT_S18_3BE:
+ case SNDRV_PCM_FORMAT_U18_3LE:
+ case SNDRV_PCM_FORMAT_U18_3BE:
+ case SNDRV_PCM_FORMAT_S20_3LE:
+ case SNDRV_PCM_FORMAT_S20_3BE:
+ case SNDRV_PCM_FORMAT_U20_3LE:
+ case SNDRV_PCM_FORMAT_U20_3BE:
+ case SNDRV_PCM_FORMAT_S24_3LE:
+ case SNDRV_PCM_FORMAT_S24_3BE:
+ case SNDRV_PCM_FORMAT_U24_3LE:
+ case SNDRV_PCM_FORMAT_U24_3BE:
+ return samples * 3;
case SNDRV_PCM_FORMAT_S24_LE:
case SNDRV_PCM_FORMAT_S24_BE:
case SNDRV_PCM_FORMAT_U24_LE:
@@ -243,6 +307,12 @@
case SNDRV_PCM_FORMAT_S24_BE:
case SNDRV_PCM_FORMAT_S32_LE:
case SNDRV_PCM_FORMAT_S32_BE:
+ case SNDRV_PCM_FORMAT_S24_3LE:
+ case SNDRV_PCM_FORMAT_S24_3BE:
+ case SNDRV_PCM_FORMAT_S20_3LE:
+ case SNDRV_PCM_FORMAT_S20_3BE:
+ case SNDRV_PCM_FORMAT_S18_3LE:
+ case SNDRV_PCM_FORMAT_S18_3BE:
return 0;
case SNDRV_PCM_FORMAT_U8:
return 0x8080808080808080ULL;
@@ -273,6 +343,15 @@
case SNDRV_PCM_FORMAT_U32_BE:
return 0x8000000080000000ULL;
#endif
+ case SNDRV_PCM_FORMAT_U24_3LE:
+ case SNDRV_PCM_FORMAT_U24_3BE:
+ return 0x0000800000800000ULL;
+ case SNDRV_PCM_FORMAT_U20_3LE:
+ case SNDRV_PCM_FORMAT_U20_3BE:
+ return 0x0000080000080000ULL;
+ case SNDRV_PCM_FORMAT_U18_3LE:
+ case SNDRV_PCM_FORMAT_U18_3BE:
+ return 0x0000020000020000ULL;
case SNDRV_PCM_FORMAT_FLOAT_LE:
{
union {
@@ -379,20 +458,45 @@
}
case 16: {
u_int16_t silence = snd_pcm_format_silence_64(format);
- while (samples-- > 0)
- *((u_int16_t *)data)++ = silence;
+ if (! silence)
+ memset(data, 0, samples * 2);
+ else {
+ while (samples-- > 0)
+ *((u_int16_t *)data)++ = silence;
+ }
break;
}
+ case 24: {
+ u_int32_t silence = snd_pcm_format_silence_64(format);
+ if (! silence)
+ memset(data, 0, samples * 3);
+ else {
+ /* FIXME: rewrite in the more better way.. */
+ int i;
+ while (samples-- > 0) {
+ for (i = 0; i < 3; i++)
+ *((u_int8_t *)data)++ = silence >> (i * 8);
+ }
+ }
+ }
case 32: {
u_int32_t silence = snd_pcm_format_silence_64(format);
- while (samples-- > 0)
- *((u_int32_t *)data)++ = silence;
+ if (! silence)
+ memset(data, 0, samples * 4);
+ else {
+ while (samples-- > 0)
+ *((u_int32_t *)data)++ = silence;
+ }
break;
}
case 64: {
u_int64_t silence = snd_pcm_format_silence_64(format);
- while (samples-- > 0)
- *((u_int64_t *)data)++ = silence;
+ if (! silence)
+ memset(data, 0, samples * 8);
+ else {
+ while (samples-- > 0)
+ *((u_int64_t *)data)++ = silence;
+ }
break;
}
default:
diff -Nru a/sound/core/pcm_native.c b/sound/core/pcm_native.c
--- a/sound/core/pcm_native.c Sun Sep 29 20:20:12 2002
+++ b/sound/core/pcm_native.c Sun Sep 29 20:20:12 2002
@@ -32,6 +32,36 @@
#include <sound/pcm_params.h>
#include <sound/minors.h>
+/*
+ * Compatibility
+ */
+
+struct sndrv_pcm_hw_params_old {
+ unsigned int flags;
+ unsigned int masks[SNDRV_PCM_HW_PARAM_SUBFORMAT -
+ SNDRV_PCM_HW_PARAM_ACCESS + 1];
+ struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_TICK_TIME -
+ SNDRV_PCM_HW_PARAM_SAMPLE_BITS + 1];
+ unsigned int rmask;
+ unsigned int cmask;
+ unsigned int info;
+ unsigned int msbits;
+ unsigned int rate_num;
+ unsigned int rate_den;
+ sndrv_pcm_uframes_t fifo_size;
+ unsigned char reserved[64];
+};
+
+#define SNDRV_PCM_IOCTL_HW_REFINE_OLD _IOWR('A', 0x10, struct sndrv_pcm_hw_params_old)
+#define SNDRV_PCM_IOCTL_HW_PARAMS_OLD _IOWR('A', 0x11, struct sndrv_pcm_hw_params_old)
+
+static int snd_pcm_hw_refine_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old * _oparams);
+static int snd_pcm_hw_params_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old * _oparams);
+
+/*
+ *
+ */
+
static rwlock_t pcm_link_lock = RW_LOCK_UNLOCKED;
static inline mm_segment_t snd_enter_user(void)
@@ -52,6 +82,8 @@
__MOD_DEC_USE_COUNT(module);
}
+
+
int snd_pcm_info(snd_pcm_substream_t * substream, snd_pcm_info_t *info)
{
snd_pcm_runtime_t * runtime;
@@ -121,7 +153,7 @@
snd_mask_t *m = NULL;
snd_pcm_hw_constraints_t *constrs = &substream->runtime->hw_constraints;
unsigned int rstamps[constrs->rules_num];
- unsigned int vstamps[SNDRV_PCM_HW_PARAM_LAST + 1];
+ unsigned int vstamps[SNDRV_PCM_HW_PARAM_LAST_INTERVAL + 1];
unsigned int stamp = 2;
int changed, again;
@@ -187,7 +219,7 @@
for (k = 0; k < constrs->rules_num; k++)
rstamps[k] = 0;
- for (k = 0; k <= SNDRV_PCM_HW_PARAM_LAST; k++)
+ for (k = 0; k <= SNDRV_PCM_HW_PARAM_LAST_INTERVAL; k++)
vstamps[k] = (params->rmask & (1 << k)) ? 1 : 0;
do {
again = 0;
@@ -211,7 +243,7 @@
printk("%s = ", snd_pcm_hw_param_names[r->var]);
if (hw_is_mask(r->var)) {
m = hw_param_mask(params, r->var);
- printk("%x", *m);
+ printk("%x", *m->bits);
} else {
i = hw_param_interval(params, r->var);
if (i->empty)
@@ -228,7 +260,7 @@
if (r->var >= 0) {
printk(" -> ");
if (hw_is_mask(r->var))
- printk("%x", *m);
+ printk("%x", *m->bits);
else {
if (i->empty)
printk("empty");
@@ -1369,16 +1401,17 @@
{
unsigned int k;
snd_interval_t *i = hw_param_interval(params, rule->deps[0]);
- unsigned int m = ~0U;
- unsigned int *mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
+ snd_mask_t m;
+ snd_mask_t *mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
+ snd_mask_any(&m);
for (k = 0; k <= SNDRV_PCM_FORMAT_LAST; ++k) {
int bits;
- if (!(*mask & (1U << k)))
+ if (! snd_mask_test(mask, k))
continue;
bits = snd_pcm_format_physical_width(k);
snd_assert(bits > 0, continue);
if ((unsigned)bits < i->min || (unsigned)bits > i->max)
- m &= ~(1U << k);
+ snd_mask_reset(&m, k);
}
return snd_mask_refine(mask, &m);
}
@@ -1394,7 +1427,7 @@
t.openmax = 0;
for (k = 0; k <= SNDRV_PCM_FORMAT_LAST; ++k) {
int bits;
- if (!(*hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT) & (1U << k)))
+ if (! snd_mask_test(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), k))
continue;
bits = snd_pcm_format_physical_width(k);
snd_assert(bits > 0, continue);
@@ -1582,7 +1615,8 @@
err = snd_pcm_hw_constraint_mask(runtime, SNDRV_PCM_HW_PARAM_ACCESS, mask);
snd_assert(err >= 0, return -EINVAL);
- err = snd_pcm_hw_constraint_mask(runtime, SNDRV_PCM_HW_PARAM_FORMAT, hw->formats);
+ err = snd_pcm_hw_constraint_mask64(runtime, SNDRV_PCM_HW_PARAM_FORMAT, hw->formats);
+ //err = snd_pcm_hw_constraint_mask(runtime, SNDRV_PCM_HW_PARAM_FORMAT, hw->formats);
snd_assert(err >= 0, return -EINVAL);
err = snd_pcm_hw_constraint_mask(runtime, SNDRV_PCM_HW_PARAM_SUBFORMAT, 1 << SNDRV_PCM_SUBFORMAT_STD);
@@ -1808,12 +1842,7 @@
snd_assert(substream != NULL, return -ENXIO);
snd_assert(!atomic_read(&substream->runtime->mmap_count), );
pcm = substream->pcm;
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- if ((substream->ffile->f_flags & O_NONBLOCK) ||
- snd_pcm_playback_drain(substream) == -ERESTARTSYS)
- snd_pcm_playback_drop(substream);
- } else
- snd_pcm_capture_drop(substream);
+ snd_pcm_capture_drop(substream);
fasync_helper(-1, file, 0, &substream->runtime->fasync);
down(&pcm->open_mutex);
snd_pcm_release_file(pcm_file);
@@ -2053,6 +2082,10 @@
return snd_pcm_resume(substream);
case SNDRV_PCM_IOCTL_XRUN:
return snd_pcm_xrun(substream);
+ case SNDRV_PCM_IOCTL_HW_REFINE_OLD:
+ return snd_pcm_hw_refine_old_user(substream, (struct sndrv_pcm_hw_params_old *) arg);
+ case SNDRV_PCM_IOCTL_HW_PARAMS_OLD:
+ return snd_pcm_hw_params_old_user(substream, (struct sndrv_pcm_hw_params_old *) arg);
}
snd_printd("unknown ioctl = 0x%x\n", cmd);
return -ENOTTY;
@@ -2723,6 +2756,79 @@
if (err < 0)
return err;
return 0;
+}
+
+/*
+ * To be removed helpers to keep binary compatibility
+ */
+
+#define __OLD_TO_NEW_MASK(x) ((x&7)|((x&0x07fffff8)<<5))
+#define __NEW_TO_OLD_MASK(x) ((x&7)|((x&0xffffff00)>>5))
+
+static void snd_pcm_hw_convert_from_old_params(snd_pcm_hw_params_t *params, struct sndrv_pcm_hw_params_old *oparams)
+{
+ unsigned int i;
+
+ memset(params, 0, sizeof(*params));
+ params->flags = oparams->flags;
+ for (i = 0; i < sizeof(oparams->masks) / sizeof(unsigned int); i++)
+ params->masks[i].bits[0] = oparams->masks[i];
+ memcpy(params->intervals, oparams->intervals, sizeof(oparams->intervals));
+ params->rmask = __OLD_TO_NEW_MASK(oparams->rmask);
+ params->cmask = __OLD_TO_NEW_MASK(oparams->cmask);
+ params->info = oparams->info;
+ params->msbits = oparams->msbits;
+ params->rate_num = oparams->rate_num;
+ params->rate_den = oparams->rate_den;
+ params->fifo_size = oparams->fifo_size;
+}
+
+static void snd_pcm_hw_convert_to_old_params(struct sndrv_pcm_hw_params_old *oparams, snd_pcm_hw_params_t *params)
+{
+ unsigned int i;
+
+ memset(oparams, 0, sizeof(*oparams));
+ oparams->flags = params->flags;
+ for (i = 0; i < sizeof(oparams->masks) / sizeof(unsigned int); i++)
+ oparams->masks[i] = params->masks[i].bits[0];
+ memcpy(oparams->intervals, params->intervals, sizeof(oparams->intervals));
+ oparams->rmask = __NEW_TO_OLD_MASK(params->rmask);
+ oparams->cmask = __NEW_TO_OLD_MASK(params->cmask);
+ oparams->info = params->info;
+ oparams->msbits = params->msbits;
+ oparams->rate_num = params->rate_num;
+ oparams->rate_den = params->rate_den;
+ oparams->fifo_size = params->fifo_size;
+}
+
+static int snd_pcm_hw_refine_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old * _oparams)
+{
+ snd_pcm_hw_params_t params;
+ struct sndrv_pcm_hw_params_old oparams;
+ int err;
+ if (copy_from_user(&oparams, _oparams, sizeof(oparams)))
+ return -EFAULT;
+ snd_pcm_hw_convert_from_old_params(¶ms, &oparams);
+ err = snd_pcm_hw_refine(substream, ¶ms);
+ snd_pcm_hw_convert_to_old_params(&oparams, ¶ms);
+ if (copy_to_user(_oparams, &oparams, sizeof(oparams)))
+ return -EFAULT;
+ return err;
+}
+
+static int snd_pcm_hw_params_old_user(snd_pcm_substream_t * substream, struct sndrv_pcm_hw_params_old * _oparams)
+{
+ snd_pcm_hw_params_t params;
+ struct sndrv_pcm_hw_params_old oparams;
+ int err;
+ if (copy_from_user(&oparams, _oparams, sizeof(oparams)))
+ return -EFAULT;
+ snd_pcm_hw_convert_from_old_params(¶ms, &oparams);
+ err = snd_pcm_hw_params(substream, ¶ms);
+ snd_pcm_hw_convert_to_old_params(&oparams, ¶ms);
+ if (copy_to_user(_oparams, &oparams, sizeof(oparams)))
+ return -EFAULT;
+ return err;
}
/*
diff -Nru a/sound/core/seq/oss/Makefile b/sound/core/seq/oss/Makefile
--- a/sound/core/seq/oss/Makefile Sun Sep 29 20:20:12 2002
+++ b/sound/core/seq/oss/Makefile Sun Sep 29 20:20:12 2002
@@ -7,8 +7,8 @@
seq_oss_event.o seq_oss_rw.o seq_oss_synth.o \
seq_oss_midi.o seq_oss_readq.o seq_oss_writeq.o
-obj-$(CONFIG_SND_SEQUENCER) += snd-seq-oss.o
-
ifeq ($(CONFIG_SND_SEQUENCER_OSS),y)
- include $(TOPDIR)/Rules.make
+ obj-$(CONFIG_SND_SEQUENCER) += snd-seq-oss.o
endif
+
+include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/Makefile b/sound/isa/Makefile
--- a/sound/isa/Makefile Sun Sep 29 20:20:12 2002
+++ b/sound/isa/Makefile Sun Sep 29 20:20:12 2002
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-mod-subdirs := ad1816a ad1848 cs423x es1688 gus opti9xx sb wavefront
-
snd-als100-objs := als100.o
snd-azt2320-objs := azt2320.o
snd-cmi8330-objs := cmi8330.o
diff -Nru a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
--- a/sound/isa/ad1848/ad1848_lib.c Sun Sep 29 20:20:12 2002
+++ b/sound/isa/ad1848/ad1848_lib.c Sun Sep 29 20:20:12 2002
@@ -24,11 +24,13 @@
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/delay.h>
+#include <linux/init.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <sound/core.h>
#include <sound/ad1848.h>
+#include <sound/pcm_params.h>
MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
MODULE_DESCRIPTION("Routines for control of AD1848/AD1847/CS4248");
diff -Nru a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c
--- a/sound/isa/cs423x/cs4231_lib.c Sun Sep 29 20:20:12 2002
+++ b/sound/isa/cs423x/cs4231_lib.c Sun Sep 29 20:20:12 2002
@@ -35,6 +35,7 @@
#include <linux/ioport.h>
#include <sound/core.h>
#include <sound/cs4231.h>
+#include <sound/pcm_params.h>
MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
MODULE_DESCRIPTION("Routines for control of CS4231(A)/CS4232/InterWave & compatible chips");
diff -Nru a/sound/isa/es18xx.c b/sound/isa/es18xx.c
--- a/sound/isa/es18xx.c Sun Sep 29 20:20:12 2002
+++ b/sound/isa/es18xx.c Sun Sep 29 20:20:12 2002
@@ -78,6 +78,7 @@
#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include <sound/mpu401.h>
#include <sound/opl3.h>
#define SNDRV_LEGACY_AUTO_PROBE
diff -Nru a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c
--- a/sound/isa/gus/gus_pcm.c Sun Sep 29 20:20:12 2002
+++ b/sound/isa/gus/gus_pcm.c Sun Sep 29 20:20:12 2002
@@ -32,6 +32,7 @@
#include <sound/core.h>
#include <sound/control.h>
#include <sound/gus.h>
+#include <sound/pcm_params.h>
#include "gus_tables.h"
#define chip_t snd_gus_card_t
diff -Nru a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
--- a/sound/pci/korg1212/korg1212.c Sun Sep 29 20:20:12 2002
+++ b/sound/pci/korg1212/korg1212.c Sun Sep 29 20:20:12 2002
@@ -29,6 +29,7 @@
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#define SNDRV_GET_ID
#include <sound/initval.h>
diff -Nru a/sound/pci/rme32.c b/sound/pci/rme32.c
--- a/sound/pci/rme32.c Sun Sep 29 20:20:12 2002
+++ b/sound/pci/rme32.c Sun Sep 29 20:20:12 2002
@@ -23,8 +23,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
- * ToDo: - ADAT (32/8)
- * - full duplex (32, 32/8, 32Pro)
+ * ToDo: full duplex (32, 32/8, 32Pro)
*/
#include <sound/driver.h>
@@ -37,6 +36,7 @@
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include <sound/asoundef.h>
#define SNDRV_GET_ID
#include <sound/initval.h>
@@ -327,6 +327,54 @@
fifo_size: 0,
};
+/*
+ * Digital output capabilites (ADAT)
+ */
+static snd_pcm_hardware_t snd_rme32_playback_adat_info =
+{
+ info: (SNDRV_PCM_INFO_MMAP |
+ SNDRV_PCM_INFO_MMAP_VALID |
+ SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_PAUSE),
+ formats: SNDRV_PCM_FMTBIT_S16_LE,
+ rates: (SNDRV_PCM_RATE_44100 |
+ SNDRV_PCM_RATE_48000),
+ rate_min: 44100,
+ rate_max: 48000,
+ channels_min: 8,
+ channels_max: 8,
+ buffer_bytes_max: RME32_BUFFER_SIZE,
+ period_bytes_min: RME32_BLOCK_SIZE,
+ period_bytes_max: RME32_BLOCK_SIZE,
+ periods_min: RME32_BUFFER_SIZE / RME32_BLOCK_SIZE,
+ periods_max: RME32_BUFFER_SIZE / RME32_BLOCK_SIZE,
+ fifo_size: 0,
+};
+
+/*
+ * Digital input capabilites (ADAT)
+ */
+static snd_pcm_hardware_t snd_rme32_capture_adat_info =
+{
+ info: (SNDRV_PCM_INFO_MMAP |
+ SNDRV_PCM_INFO_MMAP_VALID |
+ SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_PAUSE),
+ formats: SNDRV_PCM_FMTBIT_S16_LE,
+ rates: (SNDRV_PCM_RATE_44100 |
+ SNDRV_PCM_RATE_48000),
+ rate_min: 44100,
+ rate_max: 48000,
+ channels_min: 8,
+ channels_max: 8,
+ buffer_bytes_max: RME32_BUFFER_SIZE,
+ period_bytes_min: RME32_BLOCK_SIZE,
+ period_bytes_max: RME32_BLOCK_SIZE,
+ periods_min: RME32_BUFFER_SIZE / RME32_BLOCK_SIZE,
+ periods_max: RME32_BUFFER_SIZE / RME32_BLOCK_SIZE,
+ fifo_size: 0,
+};
+
static void snd_rme32_reset_dac(rme32_t *rme32)
{
writel(rme32->wcreg | RME32_WCR_PD,
@@ -359,15 +407,20 @@
static int snd_rme32_capture_getrate(rme32_t * rme32, int *is_adat)
{
int n;
- *is_adat = 0;
+ *is_adat = 0;
+ if (rme32->rcreg & RME32_RCR_LOCK) {
+ /* ADAT rate */
+ *is_adat = 1;
+ }
if (rme32->rcreg & RME32_RCR_ERF) {
return -1;
}
+ /* S/PDIF rate */
n = ((rme32->rcreg >> RME32_RCR_BITPOS_F0) & 1) +
- (((rme32->rcreg >> RME32_RCR_BITPOS_F1) & 1) << 1) +
- (((rme32->rcreg >> RME32_RCR_BITPOS_F2) & 1) << 2);
+ (((rme32->rcreg >> RME32_RCR_BITPOS_F1) & 1) << 1) +
+ (((rme32->rcreg >> RME32_RCR_BITPOS_F2) & 1) << 2);
if (RME32_PRO_WITH_8414(rme32))
switch (n) { /* supporting the CS8414 */
@@ -388,7 +441,8 @@
default:
return -1;
break;
- } else
+ }
+ else
switch (n) { /* supporting the CS8412 */
case 0:
return -1;
@@ -816,6 +870,62 @@
return 0;
}
+static int
+snd_rme32_playback_adat_open(snd_pcm_substream_t *substream)
+{
+ unsigned long flags;
+ rme32_t *rme32 = _snd_pcm_substream_chip(substream);
+ snd_pcm_runtime_t *runtime = substream->runtime;
+
+ snd_pcm_set_sync(substream);
+
+ spin_lock_irqsave(&rme32->lock, flags);
+ rme32->wcreg |= RME32_WCR_ADAT;
+ writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER);
+ rme32->playback_substream = substream;
+ rme32->playback_last_appl_ptr = 0;
+ rme32->playback_ptr = 0;
+ spin_unlock_irqrestore(&rme32->lock, flags);
+
+ runtime->hw = snd_rme32_playback_adat_info;
+ snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
+ RME32_BUFFER_SIZE, RME32_BUFFER_SIZE);
+ snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
+ &hw_constraints_period_bytes);
+ return 0;
+}
+
+static int
+snd_rme32_capture_adat_open(snd_pcm_substream_t *substream)
+{
+ unsigned long flags;
+ int isadat;
+ rme32_t *rme32 = _snd_pcm_substream_chip(substream);
+ snd_pcm_runtime_t *runtime = substream->runtime;
+
+ rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER);
+ if (snd_rme32_capture_getrate(rme32, &isadat) < 0) {
+ /* no input */
+ return -EIO;
+ }
+ if (!isadat) {
+ /* S/PDIF input */
+ return -EBUSY;
+ }
+ snd_pcm_set_sync(substream);
+
+ spin_lock_irqsave(&rme32->lock, flags);
+ rme32->capture_substream = substream;
+ rme32->capture_ptr = 0;
+ spin_unlock_irqrestore(&rme32->lock, flags);
+
+ runtime->hw = snd_rme32_capture_adat_info;
+ snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
+ RME32_BUFFER_SIZE, RME32_BUFFER_SIZE);
+ snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
+ &hw_constraints_period_bytes);
+ return 0;
+}
static int snd_rme32_playback_close(snd_pcm_substream_t * substream)
{
@@ -1004,7 +1114,31 @@
snd_rme32_capture_pointer(snd_pcm_substream_t * substream)
{
rme32_t *rme32 = _snd_pcm_substream_chip(substream);
- return snd_rme32_capture_ptr(rme32);
+ snd_pcm_runtime_t *runtime = substream->runtime;
+ snd_pcm_uframes_t frameptr;
+ size_t ptr;
+
+ frameptr = snd_rme32_capture_ptr(rme32);
+ if (runtime->access == SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) {
+ ptr = frameptr << rme32->capture_frlog;
+ if (ptr > rme32->capture_ptr) {
+ memcpy_fromio(runtime->dma_area + rme32->capture_ptr,
+ rme32->iobase + RME32_IO_DATA_BUFFER +
+ rme32->capture_ptr,
+ ptr - rme32->capture_ptr);
+ rme32->capture_ptr += ptr - rme32->capture_ptr;
+ } else if (ptr < rme32->capture_ptr) {
+ memcpy_fromio(runtime->dma_area + rme32->capture_ptr,
+ rme32->iobase + RME32_IO_DATA_BUFFER +
+ rme32->capture_ptr,
+ RME32_BUFFER_SIZE - rme32->capture_ptr);
+ memcpy_fromio(runtime->dma_area,
+ rme32->iobase + RME32_IO_DATA_BUFFER,
+ ptr);
+ rme32->capture_ptr = ptr;
+ }
+ }
+ return frameptr;
}
static snd_pcm_ops_t snd_rme32_playback_spdif_ops = {
@@ -1032,6 +1166,31 @@
copy: snd_rme32_capture_copy,
};
+static snd_pcm_ops_t snd_rme32_playback_adat_ops = {
+ open: snd_rme32_playback_adat_open,
+ close: snd_rme32_playback_close,
+ ioctl: snd_pcm_lib_ioctl,
+ hw_params: snd_rme32_playback_hw_params,
+ hw_free: snd_rme32_playback_hw_free,
+ prepare: snd_rme32_playback_prepare,
+ trigger: snd_rme32_playback_trigger,
+ pointer: snd_rme32_playback_pointer,
+ copy: snd_rme32_playback_copy,
+ silence: snd_rme32_playback_silence,
+};
+
+static snd_pcm_ops_t snd_rme32_capture_adat_ops = {
+ open: snd_rme32_capture_adat_open,
+ close: snd_rme32_capture_close,
+ ioctl: snd_pcm_lib_ioctl,
+ hw_params: snd_rme32_capture_hw_params,
+ hw_free: snd_rme32_capture_hw_free,
+ prepare: snd_rme32_capture_prepare,
+ trigger: snd_rme32_capture_trigger,
+ pointer: snd_rme32_capture_pointer,
+ copy: snd_rme32_capture_copy,
+};
+
static void snd_rme32_free(void *private_data)
{
rme32_t *rme32 = (rme32_t *) private_data;
@@ -1063,6 +1222,14 @@
snd_pcm_lib_preallocate_free_for_all(pcm);
}
+static void
+snd_rme32_free_adat_pcm(snd_pcm_t *pcm)
+{
+ rme32_t *rme32 = (rme32_t *) pcm->private_data;
+ rme32->adat_pcm = NULL;
+ snd_pcm_lib_preallocate_free_for_all(pcm);
+}
+
static int __devinit snd_rme32_create(rme32_t * rme32)
{
struct pci_dev *pci = rme32->pci;
@@ -1117,10 +1284,33 @@
GFP_KERNEL);
/* set up ALSA pcm device for ADAT */
- if (pci->device == PCI_DEVICE_ID_DIGI32) {
- /* ADAT is not available on the base model */
+ if ((pci->device == PCI_DEVICE_ID_DIGI32) ||
+ (pci->device == PCI_DEVICE_ID_DIGI32_PRO)) {
+ /* ADAT is not available on DIGI32 and DIGI32 Pro */
rme32->adat_pcm = NULL;
}
+ else {
+ if ((err = snd_pcm_new(rme32->card, "Digi32 ADAT", 1,
+ 1, 1, &rme32->adat_pcm)) < 0)
+ {
+ return err;
+ }
+ rme32->adat_pcm->private_data = rme32;
+ rme32->adat_pcm->private_free = snd_rme32_free_adat_pcm;
+ strcpy(rme32->adat_pcm->name, "Digi32 ADAT");
+ snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK,
+ &snd_rme32_playback_adat_ops);
+ snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE,
+ &snd_rme32_capture_adat_ops);
+
+ rme32->adat_pcm->info_flags = 0;
+
+ snd_pcm_lib_preallocate_pages_for_all(rme32->adat_pcm,
+ RME32_BUFFER_SIZE,
+ RME32_BUFFER_SIZE,
+ GFP_KERNEL);
+ }
+
rme32->playback_periodsize = 0;
rme32->capture_periodsize = 0;
@@ -1137,8 +1327,8 @@
/* set default values in registers */
rme32->wcreg = RME32_WCR_SEL | /* normal playback */
- RME32_WCR_INP_0 | /* input select */
- RME32_WCR_MUTE; /* setting muting on */
+ RME32_WCR_INP_0 | /* input select */
+ RME32_WCR_MUTE; /* muting on */
writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER);
diff -Nru a/sound/pci/rme96.c b/sound/pci/rme96.c
--- a/sound/pci/rme96.c Sun Sep 29 20:20:12 2002
+++ b/sound/pci/rme96.c Sun Sep 29 20:20:12 2002
@@ -33,6 +33,7 @@
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include <sound/asoundef.h>
#define SNDRV_GET_ID
#include <sound/initval.h>
diff -Nru a/sound/pci/via8233.c b/sound/pci/via8233.c
--- a/sound/pci/via8233.c Sun Sep 29 20:20:12 2002
+++ b/sound/pci/via8233.c Sun Sep 29 20:20:12 2002
@@ -366,9 +366,9 @@
switch (runtime->channels) {
case 1: slots = (1<<0); break;
case 2: slots = (1<<0) | (2<<4); break;
- case 4: slots = (1<<0) | (2<<4) | (3<<8) | (4<<12);
+ case 4: slots = (1<<0) | (2<<4) | (3<<8) | (4<<12); break;
case 6: slots = (1<<0) | (2<<4) | (5<<8) | (6<<12) | (3<<16) | (4<<20); break;
- default: slots = 0;
+ default: slots = 0; break;
}
/* STOP index is never reached */
outl(0xff000000 | slots, chip->port + VIA_REG_MULTPLAY_STOP_IDX);
===================================================================
This BitKeeper patch contains the following changesets:
1.605.2.13
## Wrapped with gzip_uu ##
begin 664 bkpatch2308
M'XL(`%U$EST``^Q=>W?;-K+_6_H4:'NN5W(L&P\^K<1G%5OI:FO'.;:5[+E-
MCPY%4HF.)=$KRDZRJ^QGOP.`+_$%R4F:GMYU6U$B!S\,!H/!##!@?T+#T%\>
M-^[\I?^Q^1/Z6Q"NCAOA?>@?NO^"WU=!`+^/W@=S_TC0'(UOCV;3Q?W'3AC<
M+[SL]R;0OW)6[GOTX"_#XP8Y9,F=U:<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$='[7^DA;HGPS,!C,(4ZH<<D#9HK4!V(8-N@<6(^Z<.>X.MS!
M#0&):[F].F8FI^SG2IU27,,\"^463#[F1PO#39ZPX?E`[_5_'YSW]4%/[PU>
M#3`#Q&JU1U/,)M#Z<'0E14H=K;HM#_1!GQD?#<LVQK;)G#GCP&1N#BZ'KH-J
M'W9/98JR%P=(I(XF3TG/S4_5:)9SIS7V"UK$``LV^$N-U<5Y$7-;P/]^BI*2
M%.X9?A%R1/.MNLK72F6ODJ9]DC>H4V/Y<1D@,B.A8R0$!*N"'H-^`QD,<P/5
MK<1ST>PNJL`PL-,51?7L^F;41^7LS=F[EV?GKVMD[*KLE\SF.[9P?C:\N1WU
MLPVDIR'"GT<OU'SUT)]#)A6M4,`7Q@RTNU#",[WC_FM%K^8MRU]=#'6^N2[1
M"H3&D1:,(XT;8&)3PN!RJ*-1$22?KV,\TS8GP7(F!GM[>],_KB#4P])''UD8
B$`"R]R\VI$VDR;TY^>`M'TZ,M@;L:<I[_P-\2%<MB*X`````
`
end
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/