Page MenuHomeFreeBSD

D44570.id136380.diff
No OneTemporary

D44570.id136380.diff

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
@@ -110,7 +110,6 @@
static int dsp_oss_setlabel(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_label_t *label);
static int dsp_oss_getsong(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_longname_t *song);
static int dsp_oss_setsong(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_longname_t *song);
-static int dsp_oss_setname(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_longname_t *name);
#endif
static struct snddev_info *
@@ -2122,6 +2121,12 @@
case SNDCTL_DSP_BIND_CHANNEL: /* XXX what?!? */
ret = EINVAL;
break;
+ case SNDCTL_SETNAME:
+ PCM_ACQUIRE_QUICK(d);
+ device_set_desc_copy(d->dev, *(oss_longname_t *)arg);
+ PCM_RELEASE_QUICK(d);
+ ret = 0;
+ break;
#ifdef OSSV4_EXPERIMENT
/*
* XXX The following ioctls are not yet supported and just return
@@ -2164,9 +2169,6 @@
case SNDCTL_SETSONG:
ret = dsp_oss_setsong(wrch, rdch, (oss_longname_t *)arg);
break;
- case SNDCTL_SETNAME:
- ret = dsp_oss_setname(wrch, rdch, (oss_longname_t *)arg);
- break;
#if 0
/**
* @note The S/PDIF interface ioctls, @c SNDCTL_DSP_READCTL and
@@ -3380,33 +3382,4 @@
{
return (EINVAL);
}
-
-/**
- * @brief Rename a device
- *
- * This is a handler for the @c SNDCTL_SETNAME ioctl.
- *
- * See @c http://manuals.opensound.com/developer/SNDCTL_SETNAME.html for
- * more details.
- *
- * From Hannu@4Front: "This call is used to change the device name
- * reported in /dev/sndstat and ossinfo. So instead of using some generic
- * 'OSS loopback audio (MIDI) driver' the device may be given a meaningfull
- * name depending on the current context (for example 'OSS virtual wave table
- * synth' or 'VoIP link to London')."
- *
- * @note As the ioctl definition is still under construction, FreeBSD
- * does not currently support SNDCTL_SETNAME.
- *
- * @param wrch playback channel (optional; may be NULL)
- * @param rdch recording channel (optional; may be NULL)
- * @param name new device name gets copied from here
- *
- * @retval EINVAL Operation not yet supported.
- */
-static int
-dsp_oss_setname(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_longname_t *name)
-{
- return (EINVAL);
-}
#endif /* !OSSV4_EXPERIMENT */

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 28, 7:09 PM (9 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37478507
Default Alt Text
D44570.id136380.diff (2 KB)

Event Timeline