Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168363219
D44570.id136380.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D44570.id136380.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
@@ -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
Details
Attached
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)
Attached To
Mode
D44570: sound: Implement SNDCTL_SETNAME
Attached
Detach File
Event Timeline
Log In to Comment