Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153912478
D38076.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38076.diff
View Options
diff --git a/lib/libmixer/mixer.c b/lib/libmixer/mixer.c
--- a/lib/libmixer/mixer.c
+++ b/lib/libmixer/mixer.c
@@ -37,17 +37,17 @@
#define BASEPATH "/dev/mixer"
-static int _mixer_readvol(struct mixer *, struct mix_dev *);
+static int _mixer_readvol(struct mix_dev *);
/*
* Fetch volume from the device.
*/
static int
-_mixer_readvol(struct mixer *m, struct mix_dev *dev)
+_mixer_readvol(struct mix_dev *dev)
{
int v;
- if (ioctl(m->fd, MIXER_READ(dev->devno), &v) < 0)
+ if (ioctl(dev->parent_mixer->fd, MIXER_READ(dev->devno), &v) < 0)
return (-1);
dev->vol.left = MIX_VOLNORM(v & 0x00ff);
dev->vol.right = MIX_VOLNORM((v >> 8) & 0x00ff);
@@ -122,7 +122,7 @@
dp->parent_mixer = m;
dp->devno = i;
dp->nctl = 0;
- if (_mixer_readvol(m, dp) < 0)
+ if (_mixer_readvol(dp) < 0)
goto fail;
(void)strlcpy(dp->name, names[i], sizeof(dp->name));
TAILQ_INIT(&dp->ctls);
@@ -336,7 +336,7 @@
v = MIX_VOLDENORM(vol.left) | MIX_VOLDENORM(vol.right) << 8;
if (ioctl(m->fd, MIXER_WRITE(m->dev->devno), &v) < 0)
return (-1);
- if (_mixer_readvol(m, m->dev) < 0)
+ if (_mixer_readvol(m->dev) < 0)
return (-1);
return (0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 25, 6:06 PM (14 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32084455
Default Alt Text
D38076.diff (1 KB)
Attached To
Mode
D38076: mixer(3): remove redundant argument in _mixer_readvol()
Attached
Detach File
Event Timeline
Log In to Comment