summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_oss.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index 8d7dd63871..5c0b8c97aa 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -186,11 +186,11 @@ static int init(struct ao *ao)
/* Channels count. */
if (af_fmt_is_spdif(format)) {
- /* Probably could be fixed by setting number of channels;
- * needs testing. */
- if (channels.num != 2) {
- MP_ERR(ao, "Format %s not implemented.\n", af_fmt_to_str(format));
- goto err_out;
+ nchannels = reqchannels = channels.num;
+ if (ioctl(p->dsp_fd, SNDCTL_DSP_CHANNELS, &nchannels) == -1) {
+ MP_ERR(ao, "Failed to set audio device to %d channels.\n",
+ reqchannels);
+ goto err_out_ioctl;
}
} else {
struct mp_chmap_sel sel = {0};