summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/out/ao_oss.c')
-rw-r--r--audio/out/ao_oss.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index 1d88291532..f84c7fffd1 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -178,8 +178,7 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
struct priv *p = ao->priv;
switch (cmd) {
case AOCONTROL_GET_VOLUME:
- case AOCONTROL_SET_VOLUME:
- {
+ case AOCONTROL_SET_VOLUME: {
ao_control_vol_t *vol = (ao_control_vol_t *)arg;
int fd, v, devs;
@@ -210,9 +209,13 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
close(fd);
return CONTROL_OK;
}
- }
return CONTROL_ERROR;
}
+#ifdef SNDCTL_DSP_GETPLAYVOL
+ case AOCONTROL_HAS_SOFT_VOLUME:
+ return CONTROL_TRUE;
+#endif
+ }
return CONTROL_UNKNOWN;
}
@@ -223,10 +226,6 @@ static int init(struct ao *ao)
struct priv *p = ao->priv;
int oss_format;
-#ifdef SNDCTL_DSP_GETPLAYVOL
- ao->no_persistent_volume = true;
-#endif
-
const char *mchan = NULL;
if (p->cfg_oss_mixer_channel && p->cfg_oss_mixer_channel[0])
mchan = p->cfg_oss_mixer_channel;