Skip to contentSkip to conversation

dmix vs alsaplayer [was jackd, zynaddsubfx and iiwusynth]

DISCUSSION Patrick Shirkey 3 participants 3 messages Mar 3, 2003 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 2 lines · Levi Burton

Has anyone tried the dmix plugin thats part of alsa rc8? This looks interesting, but im scared if I install rc8, I will be bitten by that alsa-lib bug again.

I was fscking around with it on Saturday. So far I have managed to use multiple instances of aplay but other apps like alsaplayer bork at it. I have yet to figure out why but I think I should probably submit a bug report somewhere.

I had to remove /dev/dsp otherwise alsaplayer will use the oss drivers.

Both of these commands give the same error.

$ alsaplayer -o alsa -d "plug:'dmix:RATE=44100'" track_8.wav
$ alsaplayer -o alsa -d plug:\'dmix:SLAVE=\"hw:2,1\",RATE=44100\' track_8.wav

--------
error on set_period_size (512)
Unavailable hw params:

ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: (2 3)
BUFFER_TIME: (371519 371520)
BUFFER_SIZE: 16384
BUFFER_BYTES: 65536
TICK_TIME: ALL
error on set_period_size (1024)
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: (2 3)
BUFFER_TIME: (371519 371520)
BUFFER_SIZE: 16384
BUFFER_BYTES: 65536
TICK_TIME: ALL

failed to configure output device...trying OSS
error opening /dev/dsp

I could not find a suitable output module on your system. Make sure they're in "/usr/local/lib/alsaplayer/output/". Use the -o parameter to select one.

failed to load output plugin (alsa). exitting...
--------

Signature · 16 lines
Patrick Shirkey - Boost Hardware Ltd.
Http://www.boosthardware.com
Http://www.djcj.org - The Linux Audio Users guide
========================================

Being on stage with the band in front of crowds shouting, "Get off! No! We want normal music!", I think that was more like acting than anything I've ever done.

Goldie, 8 Nov, 2002
The Scotsman



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#3 lore raw
Quoted 5 lines · Patrick Shirkey
Quoted 1 line

Has anyone tried the dmix plugin thats part of alsa rc8? This looks

I was fscking around with it on Saturday. So far I have managed to use multiple instances of aplay but other apps like alsaplayer bork at it. I have yet to figure out why but I think I should probably submit a bug report somewhere.

I've tried it with ecasound and seems to work just fine. One catch is that dmix only supports a certain set of audio format parameters at a time. You can change these via asoundrc (or dmix:x,y), but not at run time. Anyway, with default dmix installation (on top of snd-intel8x0 hw):

ecasound -i foo.wav -o alsa,dmix -b:4096 &
ecasound -i bar.wav -o alsa,dmix -b:4096

... plays the two files at the same time. -b:4096 is needed because of the abovementioned reasons.

Quoted 2 lines
$ alsaplayer -o alsa -d plug:\'dmix:SLAVE=\"hw:2,1\",RATE=44100\' 
track_8.wav

[...]

Quoted 2 lines

PERIOD_SIZE: 5513
PERIOD_BYTES: 22052

[...]

Quoted 2 lines

error on set_period_size (1024)
Unavailable hw params:

Try matching the alsaplayer period_size to the one used by dmix with the "-f 22052" alsaplayer option.

PS Opening dmix in non-interleaved mode produces totally garbled output:
"ecasound -i foo.wav -f:16,2,44100,n -o alsa,dmix -b:4096"

--
http://www.eca.cx
Audio software for Linux!

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#4 lore raw
Quoted 2 lines · Kai Vehmanen

Try matching the alsaplayer period_size to the one used by dmix with the "-f 22052" alsaplayer option.

alsaplayer doesn't accept resolution other than multiple of 32 bytes

Quoted 3 lines

PS Opening dmix in non-interleaved mode produces totally garbled output:

   "ecasound -i foo.wav -f:16,2,44100,n -o alsa,dmix -b:4096"

Works here - using standard stereo device.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf