mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
sound: Support oss_audioinfo->cmd
Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D45603
This commit is contained in:
parent
af1b0aa5b9
commit
8e36d21259
|
@ -2047,6 +2047,7 @@ dsp_oss_audioinfo_unavail(oss_audioinfo *ai, int unit)
|
|||
ai->dev = unit;
|
||||
snprintf(ai->name, sizeof(ai->name), "pcm%d (unavailable)", unit);
|
||||
ai->pid = -1;
|
||||
strlcpy(ai->cmd, CHN_COMM_UNUSED, sizeof(ai->cmd));
|
||||
ai->card_number = unit;
|
||||
ai->port_number = unit;
|
||||
ai->mixer_dev = -1;
|
||||
|
@ -2132,6 +2133,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *ai, bool ex)
|
|||
ai->dev = unit;
|
||||
strlcpy(ai->name, device_get_desc(d->dev), sizeof(ai->name));
|
||||
ai->pid = -1;
|
||||
strlcpy(ai->cmd, CHN_COMM_UNKNOWN, sizeof(ai->cmd));
|
||||
ai->card_number = -1;
|
||||
ai->port_number = -1;
|
||||
ai->mixer_dev = (d->mixer_dev != NULL) ? unit : -1;
|
||||
|
@ -2317,14 +2319,8 @@ dsp_oss_engineinfo(struct cdev *i_dev, oss_audioinfo *ai)
|
|||
else
|
||||
ai->busy = (ch->direction == PCMDIR_PLAY) ? OPEN_WRITE : OPEN_READ;
|
||||
|
||||
/**
|
||||
* @note
|
||||
* @c cmd - OSSv4 docs: "Only supported under Linux at
|
||||
* this moment." Cop-out, I know, but I'll save
|
||||
* running around in the process table for later.
|
||||
* Is there a risk of leaking information?
|
||||
*/
|
||||
ai->pid = ch->pid;
|
||||
strlcpy(ai->cmd, ch->comm, sizeof(ai->cmd));
|
||||
|
||||
/*
|
||||
* These flags stolen from SNDCTL_DSP_GETCAPS handler.
|
||||
|
|
Loading…
Reference in a new issue