mirror of
https://git.freebsd.org/ports.git
synced 2025-05-20 02:53:10 -04:00
audio/alsa-plugins: regen via "make makepatch"
This commit is contained in:
parent
35504f496c
commit
a3f26bc3b9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=518906
4 changed files with 71 additions and 66 deletions
|
@ -1,6 +1,6 @@
|
||||||
--- oss/ctl_oss.c.orig 2009-08-31 21:09:41.000000000 +0800
|
--- oss/ctl_oss.c.orig 2016-03-31 13:11:29 UTC
|
||||||
+++ oss/ctl_oss.c 2009-09-15 01:07:51.000000000 +0800
|
+++ oss/ctl_oss.c
|
||||||
@@ -362,7 +366,9 @@
|
@@ -362,7 +362,9 @@ SND_CTL_PLUGIN_DEFINE_FUNC(oss)
|
||||||
{
|
{
|
||||||
snd_config_iterator_t it, next;
|
snd_config_iterator_t it, next;
|
||||||
const char *device = "/dev/mixer";
|
const char *device = "/dev/mixer";
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
int i, err, val;
|
int i, err, val;
|
||||||
snd_ctl_oss_t *oss;
|
snd_ctl_oss_t *oss;
|
||||||
|
|
||||||
@@ -399,19 +405,29 @@
|
@@ -399,19 +401,29 @@ SND_CTL_PLUGIN_DEFINE_FUNC(oss)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,14 +40,12 @@
|
||||||
oss->ext.poll_fd = -1;
|
oss->ext.poll_fd = -1;
|
||||||
oss->ext.callback = &oss_ext_callback;
|
oss->ext.callback = &oss_ext_callback;
|
||||||
oss->ext.private_data = oss;
|
oss->ext.private_data = oss;
|
||||||
--- oss/pcm_oss.c.orig 2009-08-31 21:09:41.000000000 +0800
|
--- oss/pcm_oss.c.orig 2016-03-31 13:11:29 UTC
|
||||||
+++ oss/pcm_oss.c 2009-09-28 14:54:12.000000000 +0800
|
+++ oss/pcm_oss.c
|
||||||
@@ -22,17 +22,41 @@
|
@@ -24,15 +24,39 @@
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <alsa/asoundlib.h>
|
|
||||||
#include <alsa/pcm_external.h>
|
#include <alsa/pcm_external.h>
|
||||||
#include <linux/soundcard.h>
|
#include <linux/soundcard.h>
|
||||||
+
|
|
||||||
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
||||||
+
|
+
|
||||||
+#ifdef __FreeBSD__
|
+#ifdef __FreeBSD__
|
||||||
|
@ -65,7 +63,7 @@
|
||||||
+#define FREEBSD_OSS_BLKCNT_MAX (FREEBSD_OSS_BUFSZ_MAX / FREEBSD_OSS_BUFSZ_MIN)
|
+#define FREEBSD_OSS_BLKCNT_MAX (FREEBSD_OSS_BUFSZ_MAX / FREEBSD_OSS_BUFSZ_MIN)
|
||||||
+#define FREEBSD_OSS_BLKSZ_MAX (FREEBSD_OSS_BUFSZ_MAX / FREEBSD_OSS_BLKCNT_MIN)
|
+#define FREEBSD_OSS_BLKSZ_MAX (FREEBSD_OSS_BUFSZ_MAX / FREEBSD_OSS_BLKCNT_MIN)
|
||||||
+#endif
|
+#endif
|
||||||
|
+
|
||||||
typedef struct snd_pcm_oss {
|
typedef struct snd_pcm_oss {
|
||||||
snd_pcm_ioplug_t io;
|
snd_pcm_ioplug_t io;
|
||||||
char *device;
|
char *device;
|
||||||
|
@ -84,7 +82,7 @@
|
||||||
unsigned int frame_bytes;
|
unsigned int frame_bytes;
|
||||||
} snd_pcm_oss_t;
|
} snd_pcm_oss_t;
|
||||||
|
|
||||||
@@ -49,8 +89,13 @@
|
@@ -49,8 +73,13 @@ static snd_pcm_sframes_t oss_write(snd_pcm_ioplug_t *i
|
||||||
buf = (char *)areas->addr + (areas->first + areas->step * offset) / 8;
|
buf = (char *)areas->addr + (areas->first + areas->step * offset) / 8;
|
||||||
size *= oss->frame_bytes;
|
size *= oss->frame_bytes;
|
||||||
result = write(oss->fd, buf, size);
|
result = write(oss->fd, buf, size);
|
||||||
|
@ -98,7 +96,7 @@
|
||||||
return result / oss->frame_bytes;
|
return result / oss->frame_bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,13 +112,79 @@
|
@@ -67,14 +96,80 @@ static snd_pcm_sframes_t oss_read(snd_pcm_ioplug_t *io
|
||||||
buf = (char *)areas->addr + (areas->first + areas->step * offset) / 8;
|
buf = (char *)areas->addr + (areas->first + areas->step * offset) / 8;
|
||||||
size *= oss->frame_bytes;
|
size *= oss->frame_bytes;
|
||||||
result = read(oss->fd, buf, size);
|
result = read(oss->fd, buf, size);
|
||||||
|
@ -115,7 +113,7 @@
|
||||||
static snd_pcm_sframes_t oss_pointer(snd_pcm_ioplug_t *io)
|
static snd_pcm_sframes_t oss_pointer(snd_pcm_ioplug_t *io)
|
||||||
{
|
{
|
||||||
+#ifdef __FreeBSD__
|
+#ifdef __FreeBSD__
|
||||||
+ snd_pcm_oss_t *oss = io->private_data;
|
snd_pcm_oss_t *oss = io->private_data;
|
||||||
+#ifdef FREEBSD_OSS_USE_IO_PTR
|
+#ifdef FREEBSD_OSS_USE_IO_PTR
|
||||||
+ struct count_info ci;
|
+ struct count_info ci;
|
||||||
+#endif
|
+#endif
|
||||||
|
@ -175,10 +173,11 @@
|
||||||
+
|
+
|
||||||
+ return snd_pcm_bytes_to_frames(io->pcm, oss->ptr);
|
+ return snd_pcm_bytes_to_frames(io->pcm, oss->ptr);
|
||||||
+#else
|
+#else
|
||||||
snd_pcm_oss_t *oss = io->private_data;
|
+ snd_pcm_oss_t *oss = io->private_data;
|
||||||
struct count_info info;
|
struct count_info info;
|
||||||
int ptr;
|
int ptr;
|
||||||
@@ -85,20 +196,59 @@
|
|
||||||
|
@@ -85,20 +180,59 @@ static snd_pcm_sframes_t oss_pointer(snd_pcm_ioplug_t
|
||||||
}
|
}
|
||||||
ptr = snd_pcm_bytes_to_frames(io->pcm, info.ptr);
|
ptr = snd_pcm_bytes_to_frames(io->pcm, info.ptr);
|
||||||
return ptr;
|
return ptr;
|
||||||
|
@ -238,7 +237,7 @@
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,6 +257,10 @@
|
@@ -107,6 +241,10 @@ static int oss_stop(snd_pcm_ioplug_t *io)
|
||||||
snd_pcm_oss_t *oss = io->private_data;
|
snd_pcm_oss_t *oss = io->private_data;
|
||||||
int tmp = 0;
|
int tmp = 0;
|
||||||
|
|
||||||
|
@ -249,7 +248,7 @@
|
||||||
ioctl(oss->fd, SNDCTL_DSP_SETTRIGGER, &tmp);
|
ioctl(oss->fd, SNDCTL_DSP_SETTRIGGER, &tmp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -115,16 +269,25 @@
|
@@ -115,16 +253,25 @@ static int oss_drain(snd_pcm_ioplug_t *io)
|
||||||
{
|
{
|
||||||
snd_pcm_oss_t *oss = io->private_data;
|
snd_pcm_oss_t *oss = io->private_data;
|
||||||
|
|
||||||
|
@ -275,12 +274,12 @@
|
||||||
ioctl(oss->fd, SNDCTL_DSP_RESET);
|
ioctl(oss->fd, SNDCTL_DSP_RESET);
|
||||||
|
|
||||||
tmp = io->channels;
|
tmp = io->channels;
|
||||||
@@ -145,16 +308,75 @@
|
@@ -145,16 +292,75 @@ static int oss_prepare(snd_pcm_ioplug_t *io)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
+#endif
|
+#endif
|
||||||
+
|
|
||||||
+#ifdef __FreeBSD__
|
+#ifdef __FreeBSD__
|
||||||
+static const struct {
|
+static const struct {
|
||||||
+ int oss_format;
|
+ int oss_format;
|
||||||
|
@ -317,7 +316,7 @@
|
||||||
+ { AFMT_U32_BE, SND_PCM_FORMAT_U24_BE },
|
+ { AFMT_U32_BE, SND_PCM_FORMAT_U24_BE },
|
||||||
+};
|
+};
|
||||||
+#endif
|
+#endif
|
||||||
|
+
|
||||||
static int oss_hw_params(snd_pcm_ioplug_t *io,
|
static int oss_hw_params(snd_pcm_ioplug_t *io,
|
||||||
snd_pcm_hw_params_t *params ATTRIBUTE_UNUSED)
|
snd_pcm_hw_params_t *params ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
|
@ -351,7 +350,7 @@
|
||||||
switch (io->format) {
|
switch (io->format) {
|
||||||
case SND_PCM_FORMAT_U8:
|
case SND_PCM_FORMAT_U8:
|
||||||
oss->format = AFMT_U8;
|
oss->format = AFMT_U8;
|
||||||
@@ -166,9 +388,87 @@
|
@@ -166,9 +372,87 @@ static int oss_hw_params(snd_pcm_ioplug_t *io,
|
||||||
oss->format = AFMT_S16_BE;
|
oss->format = AFMT_S16_BE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -439,7 +438,7 @@
|
||||||
period_bytes = io->period_size * oss->frame_bytes;
|
period_bytes = io->period_size * oss->frame_bytes;
|
||||||
oss->period_shift = 0;
|
oss->period_shift = 0;
|
||||||
for (i = 31; i >= 4; i--) {
|
for (i = 31; i >= 4; i--) {
|
||||||
@@ -209,6 +509,7 @@
|
@@ -209,6 +493,7 @@ static int oss_hw_params(snd_pcm_ioplug_t *io,
|
||||||
goto _retry;
|
goto _retry;
|
||||||
}
|
}
|
||||||
oss->fragment_set = 1;
|
oss->fragment_set = 1;
|
||||||
|
@ -447,7 +446,7 @@
|
||||||
|
|
||||||
if ((flags = fcntl(oss->fd, F_GETFL)) < 0) {
|
if ((flags = fcntl(oss->fd, F_GETFL)) < 0) {
|
||||||
err = -errno;
|
err = -errno;
|
||||||
@@ -229,10 +530,146 @@
|
@@ -229,16 +514,152 @@ static int oss_hw_params(snd_pcm_ioplug_t *io,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,18 +455,18 @@
|
||||||
static int oss_hw_constraint(snd_pcm_oss_t *oss)
|
static int oss_hw_constraint(snd_pcm_oss_t *oss)
|
||||||
{
|
{
|
||||||
+#ifdef __FreeBSD__
|
+#ifdef __FreeBSD__
|
||||||
+ snd_pcm_ioplug_t *io = &oss->io;
|
snd_pcm_ioplug_t *io = &oss->io;
|
||||||
+ static const snd_pcm_access_t access_list[] = {
|
static const snd_pcm_access_t access_list[] = {
|
||||||
+ SND_PCM_ACCESS_RW_INTERLEAVED,
|
SND_PCM_ACCESS_RW_INTERLEAVED,
|
||||||
+ SND_PCM_ACCESS_MMAP_INTERLEAVED
|
SND_PCM_ACCESS_MMAP_INTERLEAVED
|
||||||
+ };
|
};
|
||||||
+#ifdef FREEBSD_OSS_BLKCNT_P2
|
+#ifdef FREEBSD_OSS_BLKCNT_P2
|
||||||
+ unsigned int period_list[30];
|
+ unsigned int period_list[30];
|
||||||
+#endif
|
+#endif
|
||||||
+#ifdef FREEBSD_OSS_BUFSZ_P2
|
+#ifdef FREEBSD_OSS_BUFSZ_P2
|
||||||
+ unsigned int bufsz_list[30];
|
+ unsigned int bufsz_list[30];
|
||||||
+#endif
|
+#endif
|
||||||
+ unsigned int nformats;
|
unsigned int nformats;
|
||||||
+ unsigned int format[ARRAY_SIZE(oss_formats_tab)];
|
+ unsigned int format[ARRAY_SIZE(oss_formats_tab)];
|
||||||
+#if 0
|
+#if 0
|
||||||
+ unsigned int nchannels;
|
+ unsigned int nchannels;
|
||||||
|
@ -593,10 +592,16 @@
|
||||||
+
|
+
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+#else
|
+#else
|
||||||
snd_pcm_ioplug_t *io = &oss->io;
|
+ snd_pcm_ioplug_t *io = &oss->io;
|
||||||
static const snd_pcm_access_t access_list[] = {
|
+ static const snd_pcm_access_t access_list[] = {
|
||||||
SND_PCM_ACCESS_RW_INTERLEAVED,
|
+ SND_PCM_ACCESS_RW_INTERLEAVED,
|
||||||
@@ -317,6 +736,7 @@
|
+ SND_PCM_ACCESS_MMAP_INTERLEAVED
|
||||||
|
+ };
|
||||||
|
+ unsigned int nformats;
|
||||||
|
unsigned int format[5];
|
||||||
|
unsigned int nchannels;
|
||||||
|
unsigned int channel[6];
|
||||||
|
@@ -317,6 +738,7 @@ static int oss_hw_constraint(snd_pcm_oss_t *oss)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -604,7 +609,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -324,6 +744,10 @@
|
@@ -324,6 +746,10 @@ static int oss_close(snd_pcm_ioplug_t *io)
|
||||||
{
|
{
|
||||||
snd_pcm_oss_t *oss = io->private_data;
|
snd_pcm_oss_t *oss = io->private_data;
|
||||||
|
|
||||||
|
@ -615,7 +620,7 @@
|
||||||
close(oss->fd);
|
close(oss->fd);
|
||||||
free(oss->device);
|
free(oss->device);
|
||||||
free(oss);
|
free(oss);
|
||||||
@@ -337,7 +761,9 @@
|
@@ -337,7 +763,9 @@ static const snd_pcm_ioplug_callback_t oss_playback_ca
|
||||||
.pointer = oss_pointer,
|
.pointer = oss_pointer,
|
||||||
.close = oss_close,
|
.close = oss_close,
|
||||||
.hw_params = oss_hw_params,
|
.hw_params = oss_hw_params,
|
||||||
|
@ -625,7 +630,7 @@
|
||||||
.drain = oss_drain,
|
.drain = oss_drain,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -348,7 +774,9 @@
|
@@ -348,7 +776,9 @@ static const snd_pcm_ioplug_callback_t oss_capture_cal
|
||||||
.pointer = oss_pointer,
|
.pointer = oss_pointer,
|
||||||
.close = oss_close,
|
.close = oss_close,
|
||||||
.hw_params = oss_hw_params,
|
.hw_params = oss_hw_params,
|
||||||
|
@ -635,7 +640,7 @@
|
||||||
.drain = oss_drain,
|
.drain = oss_drain,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -360,6 +788,10 @@
|
@@ -360,6 +790,10 @@ SND_PCM_PLUGIN_DEFINE_FUNC(oss)
|
||||||
int err;
|
int err;
|
||||||
snd_pcm_oss_t *oss;
|
snd_pcm_oss_t *oss;
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@@ -38,6 +39,8 @@
|
@@ -37,6 +38,8 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
||||||
+#define AF_FILE AF_UNIX
|
|
||||||
+
|
+
|
||||||
|
+#define AF_FILE AF_UNIX
|
||||||
|
|
||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- configure.orig 2016-03-31 13:14:07 UTC
|
--- configure.orig 2016-03-31 13:14:07 UTC
|
||||||
+++ configure
|
+++ configure
|
||||||
@@ -12402,14 +12402,6 @@ else
|
@@ -12402,21 +12402,22 @@ else
|
||||||
$as_echo "yes" >&6; }
|
$as_echo "yes" >&6; }
|
||||||
HAVE_SPEEXDSP="yes"
|
HAVE_SPEEXDSP="yes"
|
||||||
fi
|
fi
|
||||||
|
@ -11,23 +11,23 @@
|
||||||
- HAVE_SPEEXDSP_TRUE='#'
|
- HAVE_SPEEXDSP_TRUE='#'
|
||||||
- HAVE_SPEEXDSP_FALSE=
|
- HAVE_SPEEXDSP_FALSE=
|
||||||
-fi
|
-fi
|
||||||
|
|
||||||
|
|
||||||
-
|
-
|
||||||
|
|
||||||
|
|
||||||
# Check whether --with-speex was given.
|
# Check whether --with-speex was given.
|
||||||
@@ -12420,6 +12412,15 @@ else
|
if test "${with_speex+set}" = set; then :
|
||||||
fi
|
withval=$with_speex; PPH=$withval
|
||||||
|
else
|
||||||
|
PPH="lib"
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+
|
||||||
+ if test "$HAVE_SPEEXDSP" = "yes" -a "$PPH" != "no"; then
|
+ if test "$HAVE_SPEEXDSP" = "yes" -a "$PPH" != "no"; then
|
||||||
+ HAVE_SPEEXDSP_TRUE=
|
+ HAVE_SPEEXDSP_TRUE=
|
||||||
+ HAVE_SPEEXDSP_FALSE='#'
|
+ HAVE_SPEEXDSP_FALSE='#'
|
||||||
+else
|
+else
|
||||||
+ HAVE_SPEEXDSP_TRUE='#'
|
+ HAVE_SPEEXDSP_TRUE='#'
|
||||||
+ HAVE_SPEEXDSP_FALSE=
|
+ HAVE_SPEEXDSP_FALSE=
|
||||||
+fi
|
fi
|
||||||
+
|
|
||||||
+
|
|
||||||
USE_LIBSPEEX=""
|
|
||||||
if test "$PPH" = "lib"; then
|
|
||||||
if test "$HAVE_SPEEXDSP" = "yes"; then
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
--- oss/pcm_oss.c.orig 2019-07-04 14:37:07 UTC
|
--- oss/pcm_oss.c.orig 2016-03-31 13:11:29 UTC
|
||||||
+++ oss/pcm_oss.c
|
+++ oss/pcm_oss.c
|
||||||
@@ -22,7 +22,11 @@
|
@@ -22,7 +22,11 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
||||||
|
|
||||||
@@ -74,11 +78,19 @@ static snd_pcm_sframes_t oss_write(snd_p
|
@@ -74,11 +78,19 @@ static snd_pcm_sframes_t oss_write(snd_pcm_ioplug_t *i
|
||||||
size *= oss->frame_bytes;
|
size *= oss->frame_bytes;
|
||||||
result = write(oss->fd, buf, size);
|
result = write(oss->fd, buf, size);
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
#endif
|
#endif
|
||||||
return result / oss->frame_bytes;
|
return result / oss->frame_bytes;
|
||||||
}
|
}
|
||||||
@@ -97,11 +109,19 @@ static snd_pcm_sframes_t oss_read(snd_pc
|
@@ -97,11 +109,19 @@ static snd_pcm_sframes_t oss_read(snd_pcm_ioplug_t *io
|
||||||
size *= oss->frame_bytes;
|
size *= oss->frame_bytes;
|
||||||
result = read(oss->fd, buf, size);
|
result = read(oss->fd, buf, size);
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
#endif
|
#endif
|
||||||
return result / oss->frame_bytes;
|
return result / oss->frame_bytes;
|
||||||
}
|
}
|
||||||
@@ -258,10 +278,29 @@ static int oss_drain(snd_pcm_ioplug_t *i
|
@@ -258,10 +278,29 @@ static int oss_drain(snd_pcm_ioplug_t *io)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (io->stream == SND_PCM_STREAM_PLAYBACK)
|
if (io->stream == SND_PCM_STREAM_PLAYBACK)
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
#ifndef __FreeBSD__
|
#ifndef __FreeBSD__
|
||||||
static int oss_prepare(snd_pcm_ioplug_t *io)
|
static int oss_prepare(snd_pcm_ioplug_t *io)
|
||||||
{
|
{
|
||||||
@@ -272,7 +311,7 @@ static int oss_prepare(snd_pcm_ioplug_t
|
@@ -272,7 +311,7 @@ static int oss_prepare(snd_pcm_ioplug_t *io)
|
||||||
fprintf(stderr, "%s()\n", __func__);
|
fprintf(stderr, "%s()\n", __func__);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
tmp = io->channels;
|
tmp = io->channels;
|
||||||
if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) {
|
if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) {
|
||||||
@@ -380,20 +419,26 @@ static int oss_hw_params(snd_pcm_ioplug_
|
@@ -380,20 +419,26 @@ static int oss_hw_params(snd_pcm_ioplug_t *io,
|
||||||
|
|
||||||
ioctl(oss->fd, SNDCTL_DSP_RESET);
|
ioctl(oss->fd, SNDCTL_DSP_RESET);
|
||||||
|
|
||||||
|
@ -116,14 +116,14 @@
|
||||||
+ /* round up to nearest power of two */
|
+ /* round up to nearest power of two */
|
||||||
+ while (tmp & (tmp - 1))
|
+ while (tmp & (tmp - 1))
|
||||||
+ tmp += tmp & ~(tmp - 1);
|
+ tmp += tmp & ~(tmp - 1);
|
||||||
+
|
|
||||||
|
- blkcnt = 2;
|
||||||
+ /* get logarithmic value */
|
+ /* get logarithmic value */
|
||||||
+ for (blksz_shift = 0; blksz_shift < 24; blksz_shift++) {
|
+ for (blksz_shift = 0; blksz_shift < 24; blksz_shift++) {
|
||||||
+ if (tmp == (1 << blksz_shift))
|
+ if (tmp == (1 << blksz_shift))
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
- blkcnt = 2;
|
|
||||||
tmp = io->buffer_size * oss->frame_bytes;
|
tmp = io->buffer_size * oss->frame_bytes;
|
||||||
|
|
||||||
- while (blkcnt < 4096 && (blksz_aligned() * blkcnt) < tmp &&
|
- while (blkcnt < 4096 && (blksz_aligned() * blkcnt) < tmp &&
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
|
|
||||||
tmp = blksz_shift | (blkcnt << 16);
|
tmp = blksz_shift | (blkcnt << 16);
|
||||||
if (ioctl(oss->fd, SNDCTL_DSP_SETFRAGMENT, &tmp) < 0) {
|
if (ioctl(oss->fd, SNDCTL_DSP_SETFRAGMENT, &tmp) < 0) {
|
||||||
@@ -767,6 +812,7 @@ static const snd_pcm_ioplug_callback_t o
|
@@ -767,6 +812,7 @@ static const snd_pcm_ioplug_callback_t oss_playback_ca
|
||||||
.prepare = oss_prepare,
|
.prepare = oss_prepare,
|
||||||
#endif
|
#endif
|
||||||
.drain = oss_drain,
|
.drain = oss_drain,
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
static const snd_pcm_ioplug_callback_t oss_capture_callback = {
|
static const snd_pcm_ioplug_callback_t oss_capture_callback = {
|
||||||
@@ -780,6 +826,7 @@ static const snd_pcm_ioplug_callback_t o
|
@@ -780,6 +826,7 @@ static const snd_pcm_ioplug_callback_t oss_capture_cal
|
||||||
.prepare = oss_prepare,
|
.prepare = oss_prepare,
|
||||||
#endif
|
#endif
|
||||||
.drain = oss_drain,
|
.drain = oss_drain,
|
||||||
|
|
Loading…
Add table
Reference in a new issue