#StackBounty: #audio #alsa #recording Using and configuring ALSA plugins dmix and dsnoop for stereo play and capture

Bounty: 50

I installed a new PCI based soundcard in my PC. It has 8 S/PDIF based I/O pairs with each line numbered 1 to 8 for input as well as output. And I’m trying to use lines 3-8 for input (mics) and 3-8 for output (play) in stereo with :

  • line 3 + line 4 = channel 1 (both input and output),
  • line 5 + line 6 = channel 2 (both input and output),
  • line 7 + line 8 = channel 3 (both input and output).

So, I created the following .asoundrc:

pcm.!default {
    type plug
    slave {
       pcm "hw:1,0"
    }
}

ctl.!default {
    type hw
    card 1
}


pcm.play_out_44 {
    type dmix
    ipc_key 1201
    ipc_key_add_uid true
    slave {
        pcm "hw:1,0"
        channels 2
        rate 44100
        format S32_LE
        buffer_size 4096
        period_size 1024
    }
}

pcm.rec_in_44 {
    type dsnoop
    ipc_key 1210
    slave {
        pcm "hw:1,0"
        channels 2
        rate 44100
        buffer_size 4096
        period_size 1024
    }
}


pcm.outch1 {
    type plug
    slave {
        pcm "play_out_44"
        bindings { 
            2 2
            3 3
        }
        hint.description "PCI Card Stereo output/playback channel 1 (from output ports 3 & 4)"
    }
}

pcm.inch1 {
    type plug
    slave {
        pcm "rec_in_44"
        bindings { 
            2 2
            3 3
        }
        hint.description "PCI Card Stereo input/capture channel 1 (from input ports 3 & 4)"
    }
}

pcm.outch2 {
    type plug
    slave {
        pcm "play_out_44"
        bindings { 
            4 4
            5 5
        }
        hint.description "PCI Card Stereo output/playback channel 2 (from output ports 5 & 6)"
    }
}

pcm.inch2 {
    type plug
    slave {
        pcm "rec_in_44"
        bindings { 
            4 4
            5 5
        }
        hint.description "PCI Card Stereo input/capture channel 2 (from input ports 5 & 6)"
    }
}

pcm.outch3 {
    type plug
    slave {
        pcm "play_out_44"
        bindings { 
            6 6
            7 7
        }
        hint.description "PCI Card Stereo output/playback channel 3 (from output ports 7 & 8)"
    }
}

pcm.inch3 {
    type plug
    slave {
        pcm "rec_in_44"
        bindings { 
            6 6
            7 7
        }
        hint.description "PCI Card Stereo input/capture channel 3 (from input ports 7 & 8)"
    }
}

As mentioned here, I created a new dmix type to suit my configuration. But when I try to open Audacity to try and play and capture, none of inch1, inch2, inch3, outch1, outch2, outch3 are available in the recording device or playback device list!

How do I modify or create a .asoundrc for stereo play and stereo capture on my device?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.