summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/ao.rst4
-rw-r--r--audio/out/ao_alsa.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/DOCS/man/ao.rst b/DOCS/man/ao.rst
index 186512c7a5..5bd82cd9f4 100644
--- a/DOCS/man/ao.rst
+++ b/DOCS/man/ao.rst
@@ -53,6 +53,10 @@ Available audio output drivers are:
Set the index of the mixer channel (default: 0). Consider the output of
"``amixer scontrols``", then the index is the number that follows the
name of the element.
+ ``non-interleaved``
+ Allow output of non-interleaved formats (if the audio decoder uses
+ this format). Currently disabled by default, because some popular
+ ALSA plugins are utterly broken with non-interleaved formats.
.. note::
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index cd46e52806..10580ffbff 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -63,6 +63,7 @@ struct priv {
char *cfg_mixer_name;
int cfg_mixer_index;
int cfg_resample;
+ int cfg_ni;
};
#define BUFFER_TIME 250000 // 250ms
@@ -352,6 +353,9 @@ static int init(struct ao *ao)
struct priv *p = ao->priv;
+ if (!p->cfg_ni)
+ ao->format = af_fmt_from_planar(ao->format);
+
/* switch for spdif
* sets opening sequence for SPDIF
* sets also the playback and other switches 'on the fly'
@@ -754,6 +758,7 @@ const struct ao_driver audio_out_alsa = {
.cfg_mixer_device = "default",
.cfg_mixer_name = "Master",
.cfg_mixer_index = 0,
+ .cfg_ni = 0,
},
.options = (const struct m_option[]) {
OPT_STRING("device", cfg_device, 0),
@@ -762,6 +767,7 @@ const struct ao_driver audio_out_alsa = {
OPT_STRING("mixer-device", cfg_mixer_device, 0),
OPT_STRING("mixer-name", cfg_mixer_name, 0),
OPT_INTRANGE("mixer-index", cfg_mixer_index, 0, 0, 99),
+ OPT_FLAG("non-interleaved", cfg_ni, 0),
{0}
},
};