alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* need input on USB Audio class device.
@ 2011-01-31 10:21 Sakthi Subramanian
  2011-01-31 11:42 ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: Sakthi Subramanian @ 2011-01-31 10:21 UTC (permalink / raw)
  To: alsa-devel

Hi All,
i am trying to develop a ALSA record application for USB - Audio device.
This USB Audio device has stereo recording and 4 inputs (4 mics).
I am trying to capture PCM audio from the 4 mics using the simple record
application.

Need inputs on the below questions, thanks in advance for the inputs.

1. I have used the ALSA API to set the number of channels as 8.
snd_pcm_hw_params_set_channels (capture_handle, hw_params, 8);

I have started capturing the data with the above change,
and opened the same using Audacity, it says 16 bit PCM Mono channel Little
Endian.
in my opinion, that must show as 8 channel.

Am i calling the right API with parameters? or Please let me know how to get
the multi channel PCM capture data from ALSA?

This is the output of arecord -l:

# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Device [USB PnP Audio Device], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Once again thanks a lot for ur inputs..

Regards
Sakthi  SG

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: need input on USB Audio class device.
  2011-01-31 10:21 need input on USB Audio class device Sakthi Subramanian
@ 2011-01-31 11:42 ` Clemens Ladisch
       [not found]   ` <AANLkTi=oR4ADAjJOArUme73AjKdGnge8_n8Eo_+Fgw85@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2011-01-31 11:42 UTC (permalink / raw)
  To: Sakthi Subramanian; +Cc: alsa-devel

Sakthi Subramanian wrote:
> ...
> I have started capturing the data with the above change,
> and opened the same using Audacity, it says 16 bit PCM Mono channel Little Endian.
> in my opinion, that must show as 8 channel.

What did you open, the device or a file?
In the first case, you have to tell Audacity to use 8 channels.
In the latter case, I'd guess that your application did not write the .wav
header correctly.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: need input on USB Audio class device.
       [not found]   ` <AANLkTi=oR4ADAjJOArUme73AjKdGnge8_n8Eo_+Fgw85@mail.gmail.com>
@ 2011-02-02 15:14     ` Clemens Ladisch
  0 siblings, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2011-02-02 15:14 UTC (permalink / raw)
  To: Sakthi Subramanian; +Cc: alsa-devel

Sakthi Subramanian wrote:
> i have opened a capture device, and the captured data i have written to a
> file.
> That file is of RAW format.
> I have opened the raw file in audacity, with 8 channel it shows only 2
> channels having the captured data.

Raw-format files do not have any information about the format, so
Audacity has to guess.  Just write a .wav file with the proper headers.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-02 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31 10:21 need input on USB Audio class device Sakthi Subramanian
2011-01-31 11:42 ` Clemens Ladisch
     [not found]   ` <AANLkTi=oR4ADAjJOArUme73AjKdGnge8_n8Eo_+Fgw85@mail.gmail.com>
2011-02-02 15:14     ` Clemens Ladisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).