Alsa soundcard configuration

About Alsa card name

If you have selected Alsa Soundcard, you must output configuration.
For mixing, you need 2x2 channels (ie. 2 stereo outputs).
For achieving this, you can have one soundcard with 4+ channels or two soundcard with 2+ channels.


A typical Alsa soundcard name is hw:0,0 or hw:Intel.
To get soundcard list, you need to go to shell and enter next command:

$ cat /proc/asound/pcm

Answer will be:

00-00: AD198x Analog : AD198x Analog : playback 1 : capture 3
00-01: AD198x Digital : AD198x Digital : playback 1 : capture 1
01-00: ICE1724 : ICE1724 : playback 1 : capture 1
01-01: ICE1724 IEC958 : ICE1724 IEC958 : playback 1
01-02: ICE1724 Surrounds : ICE1724 Surround PCM : playback 3
02-00: USB Audio : USB Audio : capture 1

We're cutting the first line of answer to show what it is. Each field if cutted with : (except for 00-00 for which - is a separator)

  • 00: Mean that the line show information about soundcard #0
  • -: Separator
  • 00: Mean that the line show information about subdevice #0 of soundcard #0. Soundcard can have more subdevice, typically for one for analog output and one for SPDIF (digital fiber/coax) output.
  • AD198x Analog: This is the name of sound chip that manage subdevice. It depends of card and driver.
  • playback 1: say that there is one playback device. When there is no playback value, it say that device can only capture sound.
  • capture 3: say that there is one two capture device. If there is no capture value, then it say that device is only a playback device.


    Now, for designing an alsa soundcard, we need to use the prefix hw:. There is other prefix, but this is for experimented user and may not work with OpendJMix.
    After prefix, we need put soundcard number, for example here: 0
    Then, we put a separator ,.
    Finaly,we put the subdevice number. Here 0.
    So for our example, Alsa sound card name of AD198x Analog (which is an embedded motherboard Intel HDA device) is hw:0,0.


    For device analog ICE1724, the device will be hw:1,0.

    Setup output with one soundcard

    For setup a one soundcard output, you need to tell OpenDJMix to use same soundcard for both main and phone output.
    Our ICE1724 is a M-Audio Revolution 7.1 soundcard which have 8 analog outputs.
    So we tell OpenDJMix to use one soundcard by setting both key entries sound/alsa/headsoundcard and sound/alsa/roomsoundcard to same values.
    For our example:

    sound/alsa/headsoundcard=hw:1,0
    sound/alsa/roomsoundcard=hw:1,0

    Be careful with caps or space because values must be strictly the same.

    Now we must tell OpenDJMix what output channels to use for main and phone.
    There is for key entries for that:

    • sound/alsa/headChannelL: tell what output channel to use for left channel of phone output.
    • sound/alsa/headChannelR: tell what output channel to use for right channel of phone output.
    • sound/alsa/roomChannelL: tell what output channel to use for left channel of main output.
    • sound/alsa/roomChannelR: tell what output channel to use for right channel of main output.



    For example, we want to use first stereo jack output of soundcard (green colored jack - channel 1/2) for main output and second stereo jack output of soundcard (black colored jack - channel 2/3) for headphone output, we need to have entries to configuration file:

    sound/alsa/roomChannelL=0
    sound/alsa/roomChannelR=1
    sound/alsa/headChannelL=4
    sound/alsa/headChannelR=5