[alsa-devel] need input on USB Audio class device.
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
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
participants (2)
-
Clemens Ladisch
-
Sakthi Subramanian