Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107021220
D45013.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D45013.diff
View Options
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -203,13 +203,6 @@
CHN_UNLOCK(priv->wrch);
}
-/* duplex / simplex cdev type */
-enum {
- DSP_CDEV_TYPE_RDONLY, /* simplex read-only (record) */
- DSP_CDEV_TYPE_WRONLY, /* simplex write-only (play) */
- DSP_CDEV_TYPE_RDWR /* duplex read, write, or both */
-};
-
#define DSP_F_VALID(x) ((x) & (FREAD | FWRITE))
#define DSP_F_DUPLEX(x) (((x) & (FREAD | FWRITE)) == (FREAD | FWRITE))
#define DSP_F_SIMPLEX(x) (!DSP_F_DUPLEX(x))
@@ -221,48 +214,18 @@
char *name;
char *sep;
char *alias;
- int use_sep;
- int hw;
- int max;
- int volctl;
- uint32_t fmt, spd;
- int query;
} dsp_cdevs[] = {
- { SND_DEV_DSP, "dsp", ".", NULL, 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_AUDIO, "audio", ".", NULL, 0, 0, 0, 0,
- SND_FORMAT(AFMT_MU_LAW, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP16, "dspW", ".", NULL, 0, 0, 0, 0,
- SND_FORMAT(AFMT_S16_LE, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSPHW_PLAY, "dsp", ".p", NULL, 1, 1, SND_MAXHWCHAN, 1,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 48000, DSP_CDEV_TYPE_WRONLY },
- { SND_DEV_DSPHW_VPLAY, "dsp", ".vp", NULL, 1, 1, SND_MAXVCHANS, 1,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 48000, DSP_CDEV_TYPE_WRONLY },
- { SND_DEV_DSPHW_REC, "dsp", ".r", NULL, 1, 1, SND_MAXHWCHAN, 1,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 48000, DSP_CDEV_TYPE_RDONLY },
- { SND_DEV_DSPHW_VREC, "dsp", ".vr", NULL, 1, 1, SND_MAXVCHANS, 1,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 48000, DSP_CDEV_TYPE_RDONLY },
- { SND_DEV_DSPHW_CD, "dspcd", ".", NULL, 0, 0, 0, 0,
- SND_FORMAT(AFMT_S16_LE, 2, 0), 44100, DSP_CDEV_TYPE_RDWR },
+ { SND_DEV_DSP, "dsp", ".", NULL },
+ { SND_DEV_DSPHW_PLAY, "dsp", ".p", NULL },
+ { SND_DEV_DSPHW_VPLAY, "dsp", ".vp", NULL },
+ { SND_DEV_DSPHW_REC, "dsp", ".r", NULL },
+ { SND_DEV_DSPHW_VREC, "dsp", ".vr", NULL },
/* Low priority, OSSv4 aliases. */
- { SND_DEV_DSP, "dsp_ac3", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP, "dsp_mmap", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP, "dsp_multich", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP, "dsp_spdifout", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
- { SND_DEV_DSP, "dsp_spdifin", ".", "dsp", 0, 0, 0, 0,
- SND_FORMAT(AFMT_U8, 1, 0), DSP_DEFAULT_SPEED,
- DSP_CDEV_TYPE_RDWR },
+ { SND_DEV_DSP, "dsp_ac3", ".", "dsp" },
+ { SND_DEV_DSP, "dsp_mmap", ".", "dsp" },
+ { SND_DEV_DSP, "dsp_multich", ".", "dsp" },
+ { SND_DEV_DSP, "dsp_spdifout", ".", "dsp" },
+ { SND_DEV_DSP, "dsp_spdifin", ".", "dsp" },
};
static void
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -228,45 +228,17 @@
#define AFMT_NE (AFMT_SIGNED_NE | AFMT_U8_NE | AFMT_U16_NE | \
AFMT_U24_NE | AFMT_U32_NE)
-/*
- * Minor numbers for the sound driver.
- *
- * Unfortunately Creative called the codec chip of SB as a DSP. For this
- * reason the /dev/dsp is reserved for digitized audio use. There is a
- * device for true DSP processors but it will be called something else.
- * In v3.0 it's /dev/sndproc but this could be a temporary solution.
- */
-
-#define SND_DEV_CTL 0 /* Control port /dev/mixer */
-#define SND_DEV_SEQ 1 /* Sequencer /dev/sequencer */
-#define SND_DEV_MIDIN 2 /* Raw midi access */
-#define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
-#define SND_DEV_AUDIO 4 /* Sparc compatible /dev/audio */
-#define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
-#define SND_DEV_STATUS 6 /* /dev/sndstat */
- /* #7 not in use now. */
-#define SND_DEV_SEQ2 8 /* /dev/sequencer, level 2 interface */
-#define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */
-#define SND_DEV_PSS SND_DEV_SNDPROC /* ? */
-#define SND_DEV_NORESET 10
-
-#define SND_DEV_DSPHW_PLAY 11 /* specific playback channel */
-#define SND_DEV_DSPHW_VPLAY 12 /* specific virtual playback channel */
-#define SND_DEV_DSPHW_REC 13 /* specific record channel */
-#define SND_DEV_DSPHW_VREC 14 /* specific virtual record channel */
-
-#define SND_DEV_DSPHW_CD 15 /* s16le/stereo 44100Hz CD */
-
-/*
- * OSSv4 compatible device. For now, it serve no purpose and
- * the cloning itself will forward the request to ordinary /dev/dsp
- * instead.
- */
-#define SND_DEV_DSP_MMAP 16 /* /dev/dsp_mmap */
-#define SND_DEV_DSP_AC3 17 /* /dev/dsp_ac3 */
-#define SND_DEV_DSP_MULTICH 18 /* /dev/dsp_multich */
-#define SND_DEV_DSP_SPDIFOUT 19 /* /dev/dsp_spdifout */
-#define SND_DEV_DSP_SPDIFIN 20 /* /dev/dsp_spdifin */
+enum {
+ SND_DEV_CTL = 0, /* Control port /dev/mixer */
+ SND_DEV_SEQ, /* Sequencer /dev/sequencer */
+ SND_DEV_MIDIN, /* Raw midi access */
+ SND_DEV_DSP, /* Digitized voice /dev/dsp */
+ SND_DEV_STATUS, /* /dev/sndstat */
+ SND_DEV_DSPHW_PLAY, /* specific playback channel */
+ SND_DEV_DSPHW_VPLAY, /* specific virtual playback channel */
+ SND_DEV_DSPHW_REC, /* specific record channel */
+ SND_DEV_DSPHW_VREC, /* specific virtual record channel */
+};
#define DSP_DEFAULT_SPEED 8000
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 2:22 AM (10 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15738513
Default Alt Text
D45013.diff (5 KB)
Attached To
Mode
D45013: sound: Remove unused dsp_cdevs[] fields and devices
Attached
Detach File
Event Timeline
Log In to Comment