mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer.
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 2 weeks
This commit is contained in:
parent
343c95a24e
commit
f0389e79cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269228
@ -1221,6 +1221,15 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
|
||||
return (ret);
|
||||
}
|
||||
|
||||
static void
|
||||
mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi)
|
||||
{
|
||||
bzero((void *)mi, sizeof(*mi));
|
||||
strlcpy(mi->id, m->name, sizeof(mi->id));
|
||||
strlcpy(mi->name, device_get_desc(m->dev), sizeof(mi->name));
|
||||
mi->modify_counter = m->modify_counter;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX Make sure you can guarantee concurrency safety before calling this
|
||||
* function, be it through Giant, PCM_*, etc !
|
||||
@ -1279,6 +1288,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode,
|
||||
*arg_i = SOUND_VERSION;
|
||||
ret = 0;
|
||||
goto done;
|
||||
case SOUND_MIXER_INFO:
|
||||
mixer_mixerinfo(m, (mixer_info *)arg);
|
||||
ret = 0;
|
||||
goto done;
|
||||
}
|
||||
if ((cmd & ~0xff) == MIXER_WRITE(0)) {
|
||||
if (j == SOUND_MIXER_RECSRC)
|
||||
|
Loading…
Reference in New Issue
Block a user