#StackBounty: #audio #alsa #recording ALSA mono configuration not working

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 input lines 3, 5, 7 for input (mics) and output lines 3, 5, 7 for output (play) in mono with :

  • line 3 = channel 1 (both input and output),
  • line 5 = channel 2 (both input and output),
  • line 7 = 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_slave.pci-sc {
    pcm "hw:1,0"
    channels 8
    rate 44100
    buffer_size 4096
    period_size 1024
}

pcm.outch1 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 2 ]
        hint.description "PCI Card output/playback channel 1 (from output port 3)"
    }
}

pcm.inch1 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 2 ]
        hint.description "PCI Card input/capture channel 1 (from input port 3)"
    }
}

pcm.outch2 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 4 ]
        hint.description "PCI Card output/playback channel 2 (from output port 5)"
    }
}

pcm.inch2 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 4 ]
        hint.description "PCI Card input/capture channel 2 (from input port 5)"
    }
}

pcm.outch3 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 6 ]
        hint.description "PCI Card output/playback channel 3 (from output port 7)"
    }
}

pcm.inch3 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 6 ]
        hint.description "PCI Card input/capture channel 3 (from input port 7)"
    }
}

But with the above configuration, when I try to open Audacity to try and play and capture, only inch1, inch2, inch3 are available but outch1, outch2, outch3 are not available in the recording device or playback device list!

Also, I tried creating .asoundrc as mentioned here as follows as well:

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

ctl.!default {
    type hw
    card 1
}

pcm_slave.pci-sc {
    pcm "hw:1,0"
    channels 8
    rate 44100
    buffer_size 4096
    period_size 1024
}

pcm.outch1 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 0 ]
        hint.description "PCI Sound Card output/playback channel 1 (from output port 1)"
    }
}

pcm.inch1 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 0 ]
        hint.description "PCI Sound Card input/capture channel 1 (from input port 1)"
    }
}

pcm.outch2 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 1 ]
        hint.description "PCI Sound Card output/playback channel 2 (from output port 2)"
    }
}

pcm.inch2 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 1 ]
        hint.description "PCI Sound Card input/capture channel 2 (from input port 2)"
    }
}

pcm.outch3 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 2 ]
        hint.description "PCI Sound Card output/playback channel 3 (from output port 3)"
    }
}

pcm.inch3 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 2 ]
        hint.description "PCI Sound Card input/capture channel 3 (from input port 3)"
    }
}

pcm.outch4 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 3 ]
        hint.description "PCI Sound Card output/playback channel 4 (from output port 4)"
    }
}

pcm.inch4 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 3 ]
        hint.description "PCI Sound Card input/capture channel 4 (from input port 4)"
    }
}

pcm.outch5 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 4 ]
        hint.description "PCI Sound Card output/playback channel 5 (from output port 5)"
    }
}

pcm.inch5 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 4 ]
        hint.description "PCI Sound Card input/capture channel 5 (from input port 5)"
    }
}

pcm.outch6 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 5 ]
        hint.description "PCI Sound Card output/playback channel 6 (from output port 6)"
    }
}

pcm.inch6 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 5 ]
        hint.description "PCI Sound Card input/capture channel 6 (from input port 6)"
    }
}

pcm.outch7 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 6 ]
        hint.description "PCI Sound Card output/playback channel 7 (from output port 7)"
    }
}

pcm.inch7 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 6 ]
        hint.description "PCI Sound Card input/capture channel 7 (from input port 7)"
    }
}

pcm.outch8 {
    type plug
    slave.pcm {
        type dshare
        ipc_key 1111
        slave pci-sc
        bindings [ 7 ]
        hint.description "PCI Sound Card output/playback channel 8 (from output port 8)"
    }
}

pcm.inch8 {
    type plug
    slave.pcm {
        type dsnoop
        ipc_key 1111
        slave pci-sc
        bindings [ 7 ]
        hint.description "PCI Sound Card input/capture channel 8 (from input port 8)"
    }
}

This time around the same issue comes up – only inch1, inch2, inch3 are available but outch1, outch2, outch3 are not available in the recording device or playback device list! The above works fine for USB sound card. I’ve tried and tested. Shouldn’t this work for PCI based soundcard as well? What dependencies on hardware should I be aware of?

What could be going wrong here? How to fix this?


Get this bounty!!!

Leave a Reply

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