Use arecord to record stero channel for 4 micophone spratly!

Dear all ,

I have rockpis … which work perectly using ubuntu …

As you know all … rockpis have 8 input microphones …
Let say i will connect microphone to line-input 1 and line input 2 … and i will connect other two microphone to line-input 4 and line-input 5
How i can use arecord app to record from 1&2 and in same time run arecord for 4&5 … i will have two stero files ???

It possible to done or no …

If you are happy to write an asoundrc file, you should be able to route different channels to different device plugins
You can make the slave device dsnoop. Then your two arecord calls can record at the same time

thank you for your replay ,
but
this is an example for dsnoop confi.
`

pcm.dsnooped {
    type dsnoop
    slave {
        pcm "hw:0,0" 
        channels 2 
    }
}

`

you have an example for dsnoop how to choose for example channel 1,2 for first soundcard and 7,8 channel for second sound card ?

thank you and regards

You can use the ALSA route plugin with the ttable commands to switch channel positions.

In that way, you can route the other two channels for the second device.

Here is a good example :
https://bootlin.com/blog/audio-multi-channel-routing-and-mixing-using-alsalib/