summaryrefslogtreecommitdiff
path: root/kernel/drv/osscore
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drv/osscore')
-rw-r--r--kernel/drv/osscore/.config2
-rw-r--r--kernel/drv/osscore/.devices1
-rw-r--r--kernel/drv/osscore/.name1
-rw-r--r--kernel/drv/osscore/.params133
-rw-r--r--kernel/drv/osscore/osscore.c39
-rw-r--r--kernel/drv/osscore/osscore.man86
6 files changed, 262 insertions, 0 deletions
diff --git a/kernel/drv/osscore/.config b/kernel/drv/osscore/.config
new file mode 100644
index 0000000..95833c8
--- /dev/null
+++ b/kernel/drv/osscore/.config
@@ -0,0 +1,2 @@
+bus=VIRTUAL
+targetos=SunOS
diff --git a/kernel/drv/osscore/.devices b/kernel/drv/osscore/.devices
new file mode 100644
index 0000000..c435d26
--- /dev/null
+++ b/kernel/drv/osscore/.devices
@@ -0,0 +1 @@
+osscore OSSCORE OSS Core services
diff --git a/kernel/drv/osscore/.name b/kernel/drv/osscore/.name
new file mode 100644
index 0000000..8d69ed6
--- /dev/null
+++ b/kernel/drv/osscore/.name
@@ -0,0 +1 @@
+OSS Core services
diff --git a/kernel/drv/osscore/.params b/kernel/drv/osscore/.params
new file mode 100644
index 0000000..62e4af5
--- /dev/null
+++ b/kernel/drv/osscore/.params
@@ -0,0 +1,133 @@
+int detect_trace=0;
+/*
+ * Detect Trace will trace the audio device detection and operation. However
+ * this feature should only be enabled when requested by the technical support
+ * personnell.
+ */
+int max_intrate=100;
+/*
+ * Max intrate sets up the maximum number of interrupts/second. This
+ * in turn sets up the minimum buffer fragment size. The default value is 100
+ * It equals to about 50 fps frame rate which should be good for most
+ * applications (including games). However some special applications
+ * may require lower latencies. In such cases a higher value such as 500 or 1000
+ * may be needed. The minimum latency will be roughly 2/max_intrate
+ * seconds. However the exactl latency depends on what the application has
+ * requested using ioctl(SNDCTL_DSP_SETFRAGMENT). A value of zero means
+ * OSS doesn't try to limit interrupt rate.
+ *
+ * Lower latencies require higher interrupt rates which in turn causes higher
+ * system overhead. In addition using max_intrate values higher than system's
+ * internal clock rate (HZ) may not make any actual improvement.
+ *
+ * Some devices use fixed fragment size and this parameter will not have any
+ * effect with them. For example the Digi32 and Digi96 devices work in this way.
+ */
+int src_quality=3;
+/*
+ * The src_quality setting defines the precision of the software based sample
+ * rate conversion algorithm used by OSS. This setting doesn't affect possible
+ * hardware level conversions done by the devices themselves. Using higher
+ * quality setting gives better quality while lower settings consume less
+ * CPU time.
+ *
+ * Possible values are:
+ * 0 - D lowest quality (normally equals to 1=low quality)
+ * 1 - L low quality (spline interpolation)
+ * 2 - M medium quality (lagrange interpolation)
+ * 3 - H high quality (DEFAULT)
+ * 4 - HX high quality (high quality with extra precision)
+ * 5 - P production quality
+ * 6 - PX production quality (prod quality with extra precision)
+ */
+int ac97_amplifier=-1;
+/*
+ * When set to 1 this option enables the speaker power amplifier feature of
+ * AC97 codec (if available). Some boards have this inverted, so if necessary
+ * this feature can be disabled by setting this option to 0.
+ * Affects all AC97 based audio devices in the system.
+ * Default: -1=autodetect correct setting.
+ */
+int ac97_recselect=0;
+/*
+ * When set to 1 this option enables independent recording source
+ * selection for the left and the right channel on AC97 devices. In this way
+ * it's possible to record audio streams so that (for example) the left
+ * channel signal comes from the microphone and the right channel signal from
+ * line-in. However when this option is enabled it's only possible to
+ * select the recording source by using a fully OSS 4.0 compatible mixer
+ * program such as ossxmix.
+ */
+int cooked_enable=1;
+/*
+ * By default OSS will let applications to use sampling rates and formats
+ * that are not supported by the hardware. Instead OSS performs the necessary
+ * format conversions in software. Applications that don't tolerate this kind
+ * of conversions usually disable them by using features of the OSS API
+ * (SNDCTL_DSP_COOKEDMODE). If this option is set to 0 then the format
+ * conversions will be disabled for all applications and devices unless the
+ * application explicitly enables them. This option should not be changed
+ * without wery strong reason.
+ */
+int dma_buffsize=0;
+/*
+ * By default OSS will allocate audio DMA buffers with some system dependent
+ * default size (usually 64k but sometimes smaller). It is possible to change
+ * this default allocation by setting this option. Value of 0 means that the
+ * default size will be used. Value between 16 and 128 (kilobytes) can be used
+ * if the default size is not suitable for some reason. This option must not be
+ * changed unless it's absolutely necessary.
+ */
+int flat_device_model=0;
+/*
+ * OSS version 4.0 and later use two level device model where multiple audio
+ * engines supported by the device (hardware mixing or vmix) are hidden behind
+ * the same device file. When this device file is opened OSS will connect the
+ * application to the first available subdevice. In this way multiple
+ * applications can use the same device file at the same time.
+ *
+ * If this option is set to 0 OSS will use the earlier (OSS 3.x) device scheme
+ * where all devices are directly visible to the applications. This may be
+ * necessary with some custom applications that depend on the old
+ * behaviour.
+ */
+int vmix_disabled=0;
+/*
+ * The virtual mixer subsystem can be disabled by setting this configuration
+ * option to 1. By default the value is 0 which enables virtual mixer.
+ */
+int vmix_loopdevs=0;
+/*
+ * Optionally the virtual mixer subsystem can create special loopback audio
+ * devices that can be used to record the output mix sent to the device.
+ * This option tells how many loopback devices will be created (0, 1 or 2).
+ * If there are multiple audio devices in the system the all of them will have
+ * the same number of loopback devices. This setting should be left to 0 unless
+ * there are specific reasons to enable the loopback devices.
+ */
+int vmix_no_autoattach=0;
+/*
+ * By default (0) the low level drivers for most sound cards will automatically
+ * attach virtual mixer (vmix) to the primary audio devices of the cards.
+ * In some situations it may be necessary to attach virtual mixer using
+ * nonstandard parameters. If vmix_no_autoattach is set to 1 then user
+ * can use vmixctl attach command to attach virtual mixer manually to
+ * the device(s).
+ */
+int excl_policy=0;
+/*
+ * By default the O_EXCL open() flag can be used to bypass the virtual mixer.
+ * Setting excl_policy to 1 or 2 makes OSS ignore O_EXCL. A setting of 1
+ * ignores O_EXCL from all but root processes, while a setting of 2 always
+ * ignores O_EXCL.
+ */
+int mixer_muted=0;
+/*
+ * By default mixer volume controls will be set to audible levels
+ * when OSS drivers are loaded. However in some systems it may
+ * be necessary to default to lower levels to avoid feedback or
+ * noise. Set mixer_muted to 1 to use low default levels and to
+ * 0 to select audible levels.
+ *
+ * Note that just few OSS drivers support this option.
+ */
diff --git a/kernel/drv/osscore/osscore.c b/kernel/drv/osscore/osscore.c
new file mode 100644
index 0000000..30ee133
--- /dev/null
+++ b/kernel/drv/osscore/osscore.c
@@ -0,0 +1,39 @@
+/*
+ * Purpose: OSS core pseudo driver (for Solaris)
+ *
+ * The osscore driver is used under Solaris to load the configuration settings
+ * (osscore.conf) and to install the /dev/sndstat device.
+ */
+/*
+ *
+ * This file is part of Open Sound System.
+ *
+ * Copyright (C) 4Front Technologies 1996-2008.
+ *
+ * This this source file is released under GPL v2 license (no other versions).
+ * See the COPYING file included in the main directory of this source
+ * distribution for the license terms and conditions.
+ *
+ */
+
+#include "osscore_cfg.h"
+
+int
+osscore_attach (oss_device_t * osdev)
+{
+ oss_register_device (osdev, "OSS common devices");
+ install_sndstat (osdev);
+ install_dev_mixer (osdev);
+ return 1;
+}
+
+int
+osscore_detach (oss_device_t * osdev)
+{
+ if (oss_disable_device (osdev) < 0)
+ return 0;
+
+ oss_unregister_device (osdev);
+
+ return 1;
+}
diff --git a/kernel/drv/osscore/osscore.man b/kernel/drv/osscore/osscore.man
new file mode 100644
index 0000000..5af4ca2
--- /dev/null
+++ b/kernel/drv/osscore/osscore.man
@@ -0,0 +1,86 @@
+NAME
+osscore - Open Sound Sytem core audio framework.
+
+DESCRIPTION
+Open Sound System core audio support psudo driver. This driver implements the core Open Sound System API for audio, midi, mixer and synth functions. This driver also implements the OS driver interface as well as device configuration and setup.
+More information on programming on the OSS API is avaialable at:
+http://manuals.opensound.com/
+
+OPTIONS
+o ac97_recselect When set to 1 this option enables independent
+ recording source selection for the left and the right channel
+ on AC97 devices. In this way it's possible to record audio
+ streams so that (for example) the left channel signal comes
+ from the microphone and
+ the right channel signal from line-in. However when this
+ option is enabled it's only possible to select the recording
+ source by using a fully OSS 4.0 compatible mixer program such
+ as ossxmix.
+ Default: 0 - recording source is common to both channels.
+o ac97_amplifier When set to 1 this option enables the speaker power
+ amplifier feature of AC97 codec (if available).
+ Some boards have this inverted, so this feature can be
+ disabled by setting this option to 0.
+ Affects all AC97 based audio devices in the system.
+ Default: -1=autodetect correct setting.
+o cooked_enable By default OSS will let applications to use sampling
+ rates and formats that are not supported by the hardware.
+ Instead OSS performs the necessary format conversions in
+ software. Applications that don't tolerate this kind of
+ conversions usually disable them by using features of the OSS
+ API (SNDCTL_DSP_COOKEDMODE). If this option is set to 0 then
+ the format conversions will be disabled for all applications
+ and devices unless the application explicitly enables them.
+ Default: 1 - conversions are enabled.
+ This option should not be changed without very strong reasons.
+o detect_trace Internal debugging (do not change). Default: 0
+o dma_buffsize By default OSS will allocate audio DMA buffers with some
+ system dependent default size (usually 64k but sometimes
+ smaller). It is possible to change this default allocation by
+ setting this option. Value of 0 means that the default size
+ will be used. Value between 16 and 128 (kilobytes) can be used
+ if the default size is not suitable for some reason.
+ Default: 0 - system dependent buffsize.
+ This option mustn't be changed unless it's absolutely necessary.
+o max_intrate Set the maximum number of interrupts per second.
+ A value of 0 means the number is unlimited.
+ Default: 100 interrupts per second which equals to about
+ 10 msec minimum latencies.
+o vmix_disabled The virtual mixer subsystem can be disabled by setting
+ this configuration option to 1.
+ Default: 0 - virtual mixer is enabled.
+o vmix_loopdevs Optionally the virtual mixer subsystem can create
+ special loopback audio devices that can be used to record the
+ output mix sent to the device. This option tells how many
+ loopback devices will be created (0, 1 or 2). If there are
+ multiple audio devices in the system the all of them will have
+ the same number of loopback devices.
+ Default: 0 - no loopback devices are created.
+ This setting should be left to 0 unless there are specific
+ reasons to enable the loopback devices.
+o vmix_no_autoattach By default (0) the low level
+ drivers for most sound cards will automatically
+ attach virtual mixer (vmix) to the primary audio devices of the cards.
+ In some situations it may be necessary to attach virtual mixer using
+ nonstandard parameters. If vmix_no_autoattach is set to 1 then user
+ can use vmixctl attach command to attach virtual mixer manually to
+ the device(s).
+ Default: 0 - Automatically attach virtual mixer.
+o excl_policy The O_EXCL open() flag can be used by programs to bypass the
+ virtual mixer. Setting excl_policy to 1 or 2 makes OSS ignore O_EXCL.
+ A setting of 1 ignores O_EXCL from all but root processes,
+ while a setting of 2 always ignores O_EXCL.
+ Default: 0 - Do not ignore O_EXCL.
+o mixer_muted By default OSS will set most volume controls to audible level.
+ If this causes problems then it's possible to ask OSS to set
+ the levels to zero when the drivers are loaded. However the
+ levels saved with the savemixer utility will get loaded few
+ moments later when all OSS drivers have been started. Note that
+ just some of the OSS drivers honor this setting.
+ Values: 0 (default) - Use audible volumes, 1 - Set volumes to low.
+
+FILES
+CONFIGFILEPATH/osscore.conf Device configuration file
+
+AUTHOR
+4Front Technologies