[alsa-devel] multi channels input and single channel out

hong zhang henryzhang62 at yahoo.com
Fri May 6 18:48:26 CEST 2011


Yes, you are right. But 6 files (3 pins) size is same 4096 see following.

$arecord -f S16_LE -r 48000 -c 6 -D plughw:0,1 --separate-channels c1.wav c2.wav c3.wav c4.wav c5.wav c6.wav
Recording raw data 'c1.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Channels 6

$ll c*
-rw-r--r-- 1 root root 4096 2011-05-06 09:44 c1.wav
-rw-r--r-- 1 root root 4096 2011-05-06 09:44 c2.wav
-rw-r--r-- 1 root root 4096 2011-05-06 09:44 c3.wav
-rw-r--r-- 1 root root 4096 2011-05-06 09:44 c4.wav
-rw-r--r-- 1 root root 4096 2011-05-06 09:44 c5.wav
-rw-r--r-- 1 root root 4096 2011-05-06 09:44 c6.wav

$aplay -f S16_LE -r 48000 -c 1 -D plughw:0,0 c1.wav

does not have sound.

Are my commands right?
 


--- On Fri, 5/6/11, Takashi Iwai <tiwai at suse.de> wrote:

> From: Takashi Iwai <tiwai at suse.de>
> Subject: Re: [alsa-devel] multi channels input and single channel out
> To: "hong zhang" <henryzhang62 at yahoo.com>
> Cc: "alsa-devel at alsa-project.org" <alsa-devel at alsa-project.org>, "Lu Guanqun" <guanqun.lu at intel.com>
> Date: Friday, May 6, 2011, 12:51 AM
> At Thu, 5 May 2011 17:31:06 -0700
> (PDT),
> hong zhang wrote:
> > 
> > "--separate-channels" option only allows two files for
> two channels.
> 
> No.  You passed -fdat, right?  "dat" format
> specifies 2 channels.
> Pass -c8 after -fdat.
> 
> 
> Takashi
> 
> > Interesting thing is plughw:0,1 -c 1 works only for
> one pin input (two channels). 
> > 
> > plughw:0,1 -c 1 complains overrun for 6 channels (3
> input pins) input.
> > 
> > --- On Thu, 5/5/11, Lu Guanqun <guanqun.lu at intel.com>
> wrote:
> > 
> > > From: Lu Guanqun <guanqun.lu at intel.com>
> > > Subject: Re: [alsa-devel] multi channels input
> and single channel out
> > > To: "hong zhang" <henryzhang62 at yahoo.com>
> > > Cc: "alsa-devel at alsa-project.org"
> <alsa-devel at alsa-project.org>
> > > Date: Thursday, May 5, 2011, 7:23 PM
> > > On Fri, May 06, 2011 at 07:47:55AM
> > > +0800, hong zhang wrote:
> > > > List,
> > > > 
> > > > I have 8 channels of hdmi input and one
> channel output
> > > on my board.
> > > > When arecord -f dat hdmi-rx.wav to store 8
> channels
> > > data, aplay -f dat hdmi-rx.wav releases noise.
> > > > 
> > > > Ia there any way arecord stores each channel
> data to 8
> > > different files?
> > > 
> > > check out the "--separate-channels" option for
> arecord.
> > > see if it meets your needs.
> > > 
> > > > Or I have to do beam forming to sort 8
> channels out by
> > > custom application?
> > > > 
> > > > Thanks.
> > > > 
> > > > ---henry
> > > >
> _______________________________________________
> > > > Alsa-devel mailing list
> > > > Alsa-devel at alsa-project.org
> > > > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> > > 
> > > -- 
> > > guanqun
> > > 
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel at alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> > 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


More information about the Alsa-devel mailing list