Skip to contentSkip to conversation

: Why not make @args.CHANNELS in pcm/dmix.conf ???

ALSA - lib 0001853 [email protected] 1 participant 1 message Feb 18, 2006

lore
Share & tools
lore
#0 lore raw

The following issue has been SUBMITTED.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1853>
======================================================================
Reported By: slammer
Assigned To:
======================================================================

Project:                    ALSA - lib
Issue ID:                   1853
Category:                   0_general
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             02-18-2006 18:06 CET
Last Modified:              02-18-2006 18:06 CET

======================================================================
Summary: Why not make @args.CHANNELS in pcm/dmix.conf ???
Description:
Why not make @args.CHANNELS in pcm/dmix.conf ???
This can be very helpfull in making dmix pcm more generic and reusable.

According to PCM plugins reference "dmix plugin itself supports only a single configuration. That is, it supports only the fixed rate (default 48000), format (S16), channels (2), and period_time (125000)." This trully is a limitation but this doesn't mean that the values cannot be different than default.
So people start to implement their own dmixed pcm's, introducing the desired changes. For example in order to create a dmixed output for 5.1 soundcard they create their own dmixed pcm with slave channels set to 6. They also tend to set many different values which most often are HW specific and post their configs to other users as a solution, which very often is not apropraite for other systems. The values can be of course fetched using concat and card_driver functions, as it is done in the alsa provided dmix plugin but this is harder to figure out for them, hence rarely used (I have never seen such a solution online).
few examples:
http://alsa.opensrc.org/index.php?page=DmixPlugin
http://gentoo-wiki.com/HOWTO_Surround_Sound

They could, however, use the provided dmix pcm which would not be very complicated if it would allow them to change the desired values. It currently allows to change every parameter listed in the dmix as fixed by means of providing arguments... every, but the channels count.

I've noticed also that alsa started to use dmixed pcm as the default one for many cards, but only for stereo output. surroundX are still hw. No idea why (maybe multichannel dmix performance?) but anyway, if one day you decided to use dmix for them, you will need the CHANNELS argument apparently. Switchng to dmix would be then as simple as changing the slave.pcm from the hw type clause, to type plug pcm with another slave.pcm "dmix:X:Y:Z" with the channels count as an argument and adding plug it.

I included a working example of asound.conf which uses only one dmix pcm - "dmixed" as the slave pcm for many different channel count pcms.
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
02-18-06 18:06 slammer New Issue
02-18-06 18:06 slammer File Added: asound.conf
======================================================================

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642