Re: where is line-in



On Mon, 11 Sep 2006 00:35:40 -0700, Webe2 <logicon@xxxxxxxxxx> wrote:

Bob Masta wrote:

On Sun, 10 Sep 2006 02:29:51 -0700, Webe2 <logicon@xxxxxxxxxx> wrote:



Hi,
Wrote a data collection program for my soundcard which samples down to
1min rate off of either or both channels. Used /dev/dsp.
Is there a way, i.e. device, I can do this using line-in?



I'm afraid I don't understand your question. What is your data
collection program reading now? Or is it only using dummy
streams for development and now you are looking to make it
actually collect data? If the latter, have a look at the waveIn
API functions. You will need a multiple buffer scheme so
one buffer can be read by your software while another is
being written by the sound card.

If your question is how to select Line In using the Mixer API,
this task is exceedingly convoluted. The Mixer API is surely
one of the most Byzantine systems in all of Windows.

But I'm also curious about the statement that your program
samples down to 1min rate. Sound cards are all AC-coupled
(as far as I know) and will block signals below a few Hz. So
you won't be able to use one directly as a slow-speed
chart recorder to record DC-type signals like temperature,
blood pressure, etc. And no, it's not a simple matter of
modifying the card by shorting out the input capacitors:
Cards typically operate internally with a unipolar supply,
and the incoming no-signal level rides at half the supply
voltage. Without that input cap, you'd need some way
to add a very stable offset voltage to your input signal.
Not a good approach. You may need to get a real
DC-coupled data acquisition board, and use its
proprietary driver interface.

Best regards,



Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Home of DaqGen, the FREEWARE signal generator


Hi,
For completeness I am using Slackware 10.1 (Linux 2.4.something) w/ alsa
1.0.9.
In final phase of testing using me and a microphone for noise. I have
used the parrot.c program at
http://www.oreilly.de/catalog/multilinux/excerpt/ch14-05.htm
which I modified for my data logger and using a rate of 44100 and 8 bits
(via ioctl calls) sampling every 1 minute then extracting from either or
both left/right channels. This works ok for stuff at slow sampling
rates but then realized that I had been using MIC not LINE-IN jacks,
which I would guess should relate to using /dev/dsp. The original parrot
program works as does my data logger when I use the microphone to enter
noise in the MIC but not LINE-IN. This is after setting LINE-IN in
capture mode. What I don't know is the relationship between /dev/dsp
and either or both of MIC or LINE-IN. Everything I have read to date
seems to connect LINE-IN with /dev/dsp. Is this incorrect?
As a further example of my perplexity, the playback mode when running
the parrot and my logger program had alsamixer showing MIC capture,
volume (?) 0, and mute. To my way of thinking the programs should have
worked when the MIC or LINE-IN is in capture mode, unless there is NO
relationship between them and /dev/dsp, except the hole where I plug in
the microphone.

I don't know anything about Linux programming, so I can't help with
Line vs Mic selection. However, regardless of the OS you still have
the issue of the sound card being AC-coupled. Sampling once per
minute will only grab the instantaneous AC value, assuming its
frequency is high enough to make it into the card, and of course
an instantaneous sample of an AC wave could give you any value
within its amplitude range, including zero.

You *could* sample AC activity at a once-per-minute rate by
grabbing (say) 1024 samples in a burst and then scanning
for absolute values or RMS or whatever, but I'm guessing that
this is not what you want: Almost every data logger application
I have seen is for slow data.

It's not totally impossible to use a sound card for DC logging,
but you'll need some extra hardware and software. For example,
you can chop the input data to turn it into a square wave, which
*will* make it into the card. Then your software can scan for the
peak-to-peak value of the wave and save that as the DC sample.
This scheme is fairly straightforward; with a stereo card you can
record 2 channels. If you want to get really tricky, you can
multiplex several DC inputs into a single chopped data stream,
and with careful attention to details you can extract each channel
separately in software. The circuitry is more involved, however,
so I wouldn't recommend it for a first project.

Best regards,


Bob Masta
dqatechATdaqartaDOTcom

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Home of DaqGen, the FREEWARE signal generator
.



Relevant Pages

  • Re: cant view HD (ATSC) Channels in XP Media Center
    ... into my ATSC input connector for hD channels) I can STILL receive Qam digital ... The CCC control center controls the output from your ATI graphics card to ... is what I want you to install and try. ...
    (microsoft.public.windows.mediacenter)
  • Re: cant view HD (ATSC) Channels in XP Media Center
    ... First I suggest that you try the other Cyber link decoder that is MC compatible. ... I have both my Charter cable and my HD powered antenna connected to my card. ... When I run setup it finds both my cable and HD channels just fine. ... which you were then feeding to your analog tuner. ...
    (microsoft.public.windows.mediacenter)
  • Re: unable to obtain 16x9 on digital channels
    ... STB to the TV tuner card in the PC via S-video. ... The STB uses this setting to decide if 16:9 HD channels are ... The other settings effecting your output are of course you display card ...
    (microsoft.public.windows.mediacenter)
  • Re: Hauppauge WINTV GO
    ... > Mostly the problem is the TV Tuner isn't changing the channels. ... I have tried to update via YAST a bunch of times. ... > The card model is detected as Hauppauge WinTV in YAST. ...
    (alt.os.linux.suse)
  • Re: DiSEqC with Sky
    ... >> you could tell me which version of DiSEqC is supported by the Sky ... And is it possible to sort the channels in the Sky ... >> Would the viewing card that is offered for 20 pounds work on all Sky ...
    (uk.tech.tv.sky)

Loading