Page MenuHomeFreeBSD

D46836.id144166.diff
No OneTemporary

D46836.id144166.diff

diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -1184,7 +1184,7 @@
struct pcm_channel *c;
struct feeder_class *fc;
struct snd_dbuf *b, *bs;
- char *dirs, buf[CHN_NAMELEN];
+ char buf[CHN_NAMELEN];
int i, direction, type;
PCM_BUSYASSERT(d);
@@ -1192,22 +1192,18 @@
switch (dir) {
case PCMDIR_PLAY:
- dirs = "play";
direction = PCMDIR_PLAY;
type = SND_DEV_DSPHW_PLAY;
break;
case PCMDIR_PLAY_VIRTUAL:
- dirs = "virtual_play";
direction = PCMDIR_PLAY;
type = SND_DEV_DSPHW_VPLAY;
break;
case PCMDIR_REC:
- dirs = "record";
direction = PCMDIR_REC;
type = SND_DEV_DSPHW_REC;
break;
case PCMDIR_REC_VIRTUAL:
- dirs = "virtual_record";
direction = PCMDIR_REC;
type = SND_DEV_DSPHW_VREC;
break;
@@ -1241,9 +1237,7 @@
c->dev = d->dev;
c->trigger = PCMTRIG_STOP;
- snprintf(c->name, sizeof(c->name), "%s:%s:%s",
- device_get_nameunit(c->dev), dirs,
- dsp_unit2name(buf, sizeof(buf), c));
+ strlcpy(c->name, dsp_unit2name(buf, sizeof(buf), c), sizeof(c->name));
c->matrix = *feeder_matrix_id_map(SND_CHN_MATRIX_1_0);
c->matrix.id = SND_CHN_MATRIX_PCMCHANNEL;
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
@@ -170,17 +170,17 @@
char *sep;
char *alias;
} dsp_cdevs[] = {
- { 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 },
+ { SND_DEV_DSP, "dsp", ".", NULL },
+ { SND_DEV_DSPHW_PLAY, "dsp", ".play.", NULL },
+ { SND_DEV_DSPHW_VPLAY, "dsp", ".virtual_play.", NULL },
+ { SND_DEV_DSPHW_REC, "dsp", ".record.", NULL },
+ { SND_DEV_DSPHW_VREC, "dsp", ".virtual_record.", NULL },
/* Low priority, OSSv4 aliases. */
- { 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" },
+ { 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

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 24, 2:00 PM (17 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27897531
Default Alt Text
D46836.id144166.diff (2 KB)

Event Timeline