Audio Source and Sink, mostly in GRC

Hi All -

Noob here, but I’ve spent a number of hours googling and fiddling this
to no avail, so I’ll risk bringing it to the list:

I just did a fresh install of Karmic on an i5 Intel box and installed
3.2.2. Starting out at baseband I have an on-board Intel sound plus two
USB audio devices (one of them built into an HF rig), and they all work
fine… except with GNURadio, where I’m having some… um… issues.

Please excuse the length and my basic grasp of things, but here’s what
I’m seeing:

  1. Initially dial_tone.py works fine from the command line (although the
    first time I launched it it said “gr_vmcircbuf_createfilemapping:
    createfilemapping not available”)

  2. Using Ubuntu’s Sound Preferences pane I set the USB device in the
    Icom as default input, then open GRC and send audio from an audio source
    associated with “default” to the fft_sink, all at 24K samples. That
    works fine, although CPU utilization goes to 100% on one of my cores and
    every 5-30 seconds the thread appears to switch from one core to
    another.

  3. Adding a throttle in the middle brings the CPU down off the ceiling a
    bit, varying between about 70-100 percent, and stops the
    core-swapping… but after a few minutes it’s back on the roof and
    switching cores again, albeit not quite as frequently. With all three
    components at 48K it takes about 15 seconds for the busy thread to get
    up to 100%, as opposed to about 5 seconds at 24k.

  4. But I substitute an audio_sink for the fft_sink, and set the chain to
    24K samples, I get a few seconds of stuttering audio and about thirty
    “aU” underflow flags, and then it appears to freeze with CPU utilization
    stuck at 100%.

  5. dial_tone.py still works fine to the same output, and I can swap back
    to the fft_sink with similar results as before.

  6. OK, so I did a simple mod of dial_tone.py, substituting an
    audio.source for one of the tones and disabling the other, and adjusting
    the connections accordingly. Now I get fairly stable audio from the USB
    source at 48K, with a few underflows at the start and 100% on one of the
    cores… but the latency is about two seconds!

So I’m wondering: Is it possible there might be something going awry
between audio_source / audio_sink and my ALSA (1.0.20) driver that’s
making them drive the CPU so hard? Or am I just missing something basic
about how to wire things in GRC and/or GNURadio?

Also I’m wondering what’s the difference between connections under GRC
and directly from Python?

(And also I’m a little vague on what values to use for the “PCM Device
Name” in setting up audio sources and sinks using various devices.)

Yep… all told I’m pretty much a lost ball in high weeds. Please have
mercy! Any insights or pointers will be much appreciated.

  • Art

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs