Dear all ALSA Users,

Recently my team and I are making an attempt to record audio signals from an 
open source sound card called 8 Sounds USB 
(http://sourceforge.net/p/eightsoundsusb/wiki/Main_Page/) and were facing great 
difficulty in the most fundamental of issues, being unable to get any signals 
recorded from the sound card/mic array system for months until we found out 
that the issue could be solved by enabling audio capture on the sound card in 
Alsamixer as shown on the page: (http://alsa.opensrc.org/Record_from_mic) . 
With the capture enabled, we were able to actually record down signals from all 
the microphones in the array with the Audacity application, and play them back 
without a glitch. However, we are really puzzled as to why enabling capture in 
Alsamixer solved the problem, so this comes to our first question of:

1. How does enabling capture in alsamixer actually allow for a device to be 
able to start recording signals when previously, without capture enabled, 
although we could detect the device on our system (but that too is quite fuzzy, 
with certain commands, we were able to detect the device, while with other 
means we did not detect the device on Ubuntu) in audacity at least, we could 
not get any recorded signals (we can initiate the recording but get zero 
inputs, no spikes whatsoever) ?
   what changes did alsamixer actually make to ALSA (its drivers etc) that 
would have miraculously enabled the signals to be recorded?

Also, we made an observation that might be interesting and we are not sure if 
it has anything to do with the alsamixer enabling capture issue. Basically on 
the Ubuntu laptop that we have, we identified our sound card to be numbered as 
device 1. So when we do a listing of the /proc directory tree for this sound 
card, we get:

augustine@augustine-ubuntu:~$ tree /proc/asound/card1
/proc/asound/card1
├── id
├── pcm0c
│   ├── info
│   ├── sub0
│   │   ├── hw_params
│   │   ├── info
│   │   ├── status
│   │   └── sw_params
│   └── xrun_debug
├── pcm0p
│   ├── info
│   ├── sub0
│   │   ├── hw_params
│   │   ├── info
│   │   ├── status
│   │   └── sw_params
│   └── xrun_debug
├── stream0
├── usbbus
├── usbid
└── usbmixer

4 directories, 17 files

And when we do a cat of the following directory when we are no doing any 
recording with Audacity, we get:

augustine@augustine-ubuntu:~$ cat /proc/asound/card1/pcm0c/sub0/status
state: RUNNING
owner_pid   : 4614
trigger_time: 26673.762479721
tstamp      : 28544.782938570
delay       : 926
avail       : 926
avail_max   : 926
-----
hw_ptr      : 82477944
appl_ptr    : 82477018

And this is the case all the time we are doing a recording, regardless of 
whether we have enabled or have not enabled Alsamixer capture for our sound 
card device numbered 1 on our machine. The only difference it seems, when we 
enable capture, is that we actually get a audio recording, as opposed to not 
getting anything when we don’t.

Lastly, to complete the observation, we found that when we stop the recording 
in Audacity and do the same cat command, we get:

augustine@augustine-ubuntu:~$ cat /proc/asound/card1/pcm0c/sub0/status
closed

So our second question would be:

2. What exactly does the /proc/asound/card1/pcm0c/sub0/status file tell us, and 
if we see a “RUNNING” state regardless of whether we have enabled alsamixer 
capture or not (as implied by what we observed), then does this suggest that 
alsamixer is independent from the /proc/asound/card1 directory?

We really appreciate all your help and thank you all in advance! We have always 
been struggling to wrap our heads around ALSA and issues arising from getting 
our mic array + sound card system to work with our Ubuntu 14.04 machine, and 
any help here will be appreciated! Please feel free to chip in with comments 
even if they do not answer our questions too.

PS: I’m not too sure if my mail should go to the developers mailing list too. 
If it should, please let me know and I’ll post it up there too.

Best regards,
Augustine Koh

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to