From: "Alexander E. Patrakov" <patrakov@gmail.com>
To: sylvain.bertrand@gmail.com, Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: USB-Audio.conf routing and dmix
Date: Fri, 15 May 2015 10:53:51 +0500 [thread overview]
Message-ID: <555589EF.60602@gmail.com> (raw)
In-Reply-To: <20150515020715.GA418@freedom>
15.05.2015 07:07, sylvain.bertrand@gmail.com wrote:
> On Wed, May 13, 2015 at 11:32:15AM +0000, sylvain.bertrand@gmail.com wrote:
>> On Wed, May 13, 2015 at 11:24:32AM +0200, Clemens Ladisch wrote:
>>>>> I linked the surround51 and surround71 pcms with the 'disable-able' dmix
>>>>> section from the default pcm.
>>>
>>> These devices are not supposed to use plug or dmix.
>>
>> Ok. Then, there is no pcm to output 5.1 sound with dmix.
>>
>> Does it mean that the application is in charge to build a alsa-lib pipeline
>> with dmix pcm and surround51 pcm, in order to let other applications output 5.1
>> sound at the same time?
>
> Then what is the "Right"(tm) way to do that?
>
[this is my personal opinion, in no way official]
The right way seems to be to use PulseAudio. Pure ALSA, in its default
configuration, just does not support mixing 5.1 audio, on any card. This
default cannot really be changed, because there are many people who use
5.1 cards for output to stereo headphones only, i.e. who need automatic
downmixing if an app (such as VLC) starts a 5.1 stream. The default
plug/dmix setup provides such downmixing.
Those who actually have a 5.1 system and need to opt out of this
downmixing must actively do it (both with ALSA and with PulseAudio). For
PulseAudio, it is as simple as starting pavucontrol and selecting a 5.1
output profile for the relevant card. For ALSA, a config has to be
created from scratch. On some cards, the config suggested by mpv
developers works:
https://github.com/mpv-player/mpv/wiki/ALSA:-Surround-Sound-and-Upmixing
As an application developer, just tell your users "your default device
needs to support 5.1, see you there", as mpv developers did. This will
be the case either with PulseAudio or with a hacked .asoundrc.
OTOH, I will be happy to review a patch that makes the dmix channel
count configurable on a per-card basis in .asoundrs in a way similar to
the rate. But that's hard - you will have to change all card configs,
and implement some conditional blocks because some cards expose
themselves as several stereo devices, so you want a multi plugin on
several instances of dmix then.
--
Alexander E. Patrakov
next prev parent reply other threads:[~2015-05-15 5:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-09 0:20 USB-Audio.conf routing and dmix sylvain.bertrand
2015-05-11 19:57 ` sylvain.bertrand
2015-05-13 9:24 ` Clemens Ladisch
2015-05-13 11:32 ` sylvain.bertrand
2015-05-15 2:07 ` sylvain.bertrand
2015-05-15 5:53 ` Alexander E. Patrakov [this message]
2015-05-15 5:58 ` Alexander E. Patrakov
2015-05-15 8:13 ` Raymond Yau
2015-05-15 13:16 ` sylvain.bertrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555589EF.60602@gmail.com \
--to=patrakov@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=sylvain.bertrand@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox