From: David Smoot Subject: Re: Question: setting up the hardware for alsa Date: Fri, 4 Nov 2005 11:33:59 -0600 Message-ID: References: <436B88BE.1090106@superbug.co.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_24507_18062557.1131125639661" Return-path: In-Reply-To: <436B88BE.1090106@superbug.co.uk> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: James Courtier-Dutton Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org ------=_Part_24507_18062557.1131125639661 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sorry, it appears I did not provide enough detail. I am playing with the tutorial from the linuxjournal: http://www.linuxjournal.com/article/6735 I can compile and run the first listing, it just prints out some variables set up by the soundalib. But the second listing that actually calls "snd_pcm_open" fails because it cannot open the default device. So I believe I am failing somewhere to set some variable or parameter that tells ALSA what the default devices is. All I am doing so far is creating the nodes and loading the sound modules. I'm thinking I am missing one more step. Any suggestions? David On 11/4/05, James Courtier-Dutton wrote: > > David Smoot wrote: > > Greetings, first post to the list and hopefully a simple question: > > > > My company builds Linux based telemetry systems. We are working on an > > airborne telemetry platform. The customer has expressed a desire to > record > > the pilot voice traffic on the data stream with the other data from the > > instruments. > > > > We use a stripped down kernel and build pretty much everything by hand. > I'm > > attempting to set up ALSA so I can pull the audio data from the line in= . > > > > At this point I at least knew libasound was OK because I could execute > some > > simple code that listed libasound data types and parameters. > > > > But I can't open any devices and talk to them. I know I am missing some > kind > > of crucial step in setting up the hw:0,0 device but I can't seem to > figure > > out the next step. I've read tutorials, googled, but I am stuck. If > someone > > would point me to the proper documents I would be grateful. > > > > David > > > > The ca0106 alsa driver is quite new and as such might not be the most > reliable driver to use for avionics systems. Line in/Mic input was only > recently added to the driver, so it would be important for you to tell > us which alsa version you are using. The following will tell you. > cat /proc/asound/version. > > Another problem you will have is noise on the input. Special care has to > be taken when recording voice in an aircraft. > > A good application to use to test voice capture is arecord. > The ca0106 card is very basic, and you should only really use a capture > rate of 48000 Hz if you want any sort of quality captured. You can > resample it in your application to a lower rate, or compress it using a > codec before transmission over the telemetry link. The ca0106 is > particulary bad at 44100 Hz, but should be ok at rates 24000, 12000,8000 > Hz > > You should open the devices directly, but instead use the libasound > snd_pcm_open() call. > > James > > ------=_Part_24507_18062557.1131125639661 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sorry, it appears I did not provide enough detail.  I am playing with = the tutorial from the linuxjournal:
http://www.linuxjourna= l.com/article/6735

I can compile and run the first listing, it just prints out some variables set up by the soundalib.  But the second listing that actually calls "snd_pcm_open"
fails because it cannot open the default device. 

So I believe I am failing somewhere to set some variable or parameter that tells ALSA what the default devices is.  All I am doing so far is creating the nodes and loading the sound modules.  I'm  thinking I am missing one more step.  Any suggestions?

David
On 11/4/05, James Courtier-Dutton &l= t;James@superbug.co.uk> wrot= e:
David Smoot wrote= :
> Greetings, first post to the list and hopefully a simple question= :
>
> My company builds Linux based telemetry systems. We are wo= rking on an
> airborne telemetry platform. The customer has expressed= a desire to record
> the pilot voice traffic on the data stream with= the other data from the
> instruments.
>
> We use a stripped down kernel and bui= ld pretty much everything by hand. I'm
> attempting to set up ALSA so= I can pull the audio data from the line in.
>
> At this point = I at least knew libasound was OK because I could execute some
> simple code that listed libasound data types and parameters.
&g= t;
> But I can't open any devices and talk to them. I know I am missi= ng some kind
> of crucial step in setting up the hw:0,0 device but I = can't seem to figure
> out the next step. I've read tutorials, googled, but I am stuck. I= f someone
> would point me to the proper documents I would be gratefu= l.
>
> David
>

The ca0106 alsa driver is quite new= and as such might not be the most
reliable driver to use for avionics systems. Line in/Mic input was only=
recently added to the driver, so it would be important for you to tell<= br>us which alsa version you are using. The following will tell you.
cat /proc/asound/version.

Another problem you will have is noise on = the input. Special care has to
be taken when recording voice in an aircr= aft.

A good application to use to test voice capture is arecord.
The ca0106 card is very basic, and you should only really use a capture=
rate of 48000 Hz if you want any sort of quality captured. You can
r= esample it in your application to a lower rate, or compress it using a
codec before transmission over the telemetry link. The ca0106 is
particu= lary bad at 44100 Hz, but should be ok at rates 24000, 12000,8000 Hz
You should open the devices directly, but instead use the libasound
snd_pcm_open() call.

James


------=_Part_24507_18062557.1131125639661-- ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php