svn commit: r359440 - head/sys/dev/sound/pcm
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Mar 30 16:15:57 UTC 2020
Author: hselasky
Date: Mon Mar 30 15:36:38 2020
New Revision: 359440
URL: https://svnweb.freebsd.org/changeset/base/359440
Log:
Implement new mixer API to return the device pointer based on the mixer pointer.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/dev/sound/pcm/mixer.c
head/sys/dev/sound/pcm/mixer.h
Modified: head/sys/dev/sound/pcm/mixer.c
==============================================================================
--- head/sys/dev/sound/pcm/mixer.c Mon Mar 30 15:29:39 2020 (r359439)
+++ head/sys/dev/sound/pcm/mixer.c Mon Mar 30 15:36:38 2020 (r359440)
@@ -1032,6 +1032,14 @@ mix_get_type(struct snd_mixer *m)
return (m->type);
}
+device_t
+mix_get_dev(struct snd_mixer *m)
+{
+ KASSERT(m != NULL, ("NULL snd_mixer"));
+
+ return (m->dev);
+}
+
/* ----------------------------------------------------------------------- */
static int
Modified: head/sys/dev/sound/pcm/mixer.h
==============================================================================
--- head/sys/dev/sound/pcm/mixer.h Mon Mar 30 15:29:39 2020 (r359439)
+++ head/sys/dev/sound/pcm/mixer.h Mon Mar 30 15:36:38 2020 (r359440)
@@ -56,6 +56,7 @@ int mix_get(struct snd_mixer *m, u_int dev);
int mix_setrecsrc(struct snd_mixer *m, u_int32_t src);
u_int32_t mix_getrecsrc(struct snd_mixer *m);
int mix_get_type(struct snd_mixer *m);
+device_t mix_get_dev(struct snd_mixer *m);
void mix_setdevs(struct snd_mixer *m, u_int32_t v);
void mix_setrecdevs(struct snd_mixer *m, u_int32_t v);
More information about the svn-src-head
mailing list