ICE1712 and ALSA sink

Built GNUradio from git on Debian Testing AMD64 this afternoon, and
intending to use it with a Funcube Dongle and gr-fcd. I am having some
difficulty with the ALSA sink and an ICE1712 [M-Audio 2496] sound card.
I created a very simple flow graph with a sine wave Signal Source
straight in to an Audio Sink. When I try to execute it, I get:

Traceback (most recent call last):
File “/home/alex/downloads/radio/gr-fcd/apps/top_block.py”, line 118,
in
tb.Run(True)
File
“/usr/local/lib/python2.6/dist-packages/grc_gnuradio/wxgui/top_block_gui.py”,
line 72, in Run
if start: self.start()
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py”, line
97, in start
self._tb.start()
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/gr/gnuradio_core_runtime.py”,
line 1480, in start
return _gnuradio_core_runtime.gr_top_block_sptr_start(self)
RuntimeError: audio_alsa_sink(3): insufficient connected input ports
(10 needed, 1 connected)

Done

I have connected an old USB sound card, which becomes hw:2,0 and
pointed it at that, and it works fine. So there seems to be some kind of
incompatibility between gnuradio and this sound card. Where is the best
place to start looking into what the issue might be?

alexd

On 07/17/2011 06:19 PM, Alex DEKKER wrote:

File
return _gnuradio_core_runtime.gr_top_block_sptr_start(self)
RuntimeError: audio_alsa_sink(3): insufficient connected input ports
(10 needed, 1 connected)

I suspect this has nothing to do with ALSA or the ICE1712 driver within
ALSA, since that message comes from the flow-graph executor.
My suspicion is that you typoed at some point in your flow-graph
creation, and created a sink with 10 input ports. From the perspective
of Gnu Radio, one sound-card is the same as another.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On 07/17/2011 06:19 PM, Alex DEKKER wrote:

File
return _gnuradio_core_runtime.gr_top_block_sptr_start(self)
alexd

So, the audio_alsa_sink.cc module queries the ALSA subsystem for the
min_chans that it offers, and configures the I/O configuration for
Gnu Radio accordingly. Near as I can tell, your reported error
indicates that the ALSA driver is reporting that the minimum number of
supported channels is 10, which is a bit odd. No, it’s very odd. I
can imagine a card only supporting stereo input, and not mono. But
a minimum of *10" channels? That sounds like a bug in an ALSA driver
to me.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On Sun, 17 Jul 2011 19:36:50 -0400, Marcus D. Leech wrote:

Here’s a discussion of a strongly-related issue with the M-Audio 2496
that seems to imply that the driver only offers 10 channels, not the
conventional ‘2’, and so things that would ordinarily expect ‘2’
get astonished as a result:

http://comments.gmane.org/gmane.linux.alsa.devel/83525

OK thanks for that. I guess I should be able to craft an asoundrc that
creates a virtual device with 2 channels that just points at the right
place and gnuradio will be happy.

alexd

On 07/17/2011 06:19 PM, Alex DEKKER wrote:

File
return _gnuradio_core_runtime.gr_top_block_sptr_start(self)
RuntimeError: audio_alsa_sink(3): insufficient connected input ports
(10 needed, 1 connected)

Here’s a discussion of a strongly-related issue with the M-Audio 2496
that seems to imply that the driver only offers 10 channels, not the
conventional ‘2’, and so things that would ordinarily expect ‘2’ get
astonished as a result:

http://comments.gmane.org/gmane.linux.alsa.devel/83525


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

Here is an example that works for an Delta M44 card for input and
output
This card uses the snd_ice1712 module.

Content of .asoundrc

pcm.SDR1000_card {
type hw
card M44
}
ctl.SDR1000_card {
type hw
card M44
}

pcm.dmixer {
type dmix
ipc_key 4714
slave {
pcm SDR1000_card
format S32_LE
period_time 0
channels 2
period_size 512
buffer_size 4096
}
bindings {
0 0
1 1
}
}
pcm.dsnooper {
type dsnoop
ipc_key 4711
slave {
pcm SDR1000_card
format S32_LE
period_time 0
period_size 512
buffer_size 4096
}
bindings {
0 0
1 1
}
}

pcm.SDR1000Play {
type plug
slave {
pcm “dmixer”
}
}
pcm.SDR1000Record {
type plug
slave {
pcm “dsnooper”
}
}

=================================
M44 is the name of the card you see in /proc/asound

You can use SDR1000Play as sink and SDR1000Record as source.

Volker

Am 18.07.2011 09:39, schrieb Alex DEKKER:

On Mon, 18 Jul 2011 19:20:55 +0200, Volker S. wrote:

Here is an example that works for an Delta M44 card for input and
output
This card uses the snd_ice1712 module.

Thanks for your help. I feel I must be getting closer; I specify
SDR1000Play as the sink device, and I can now execute the simple flow
graph I created! However, all I get is a click when I start the block,
and a click when I end it. But it’s coming out of the correct speakers,
at least.

There’s a simple example C++ NFM decoder with gr-fcd:

If I change line 96 of fcd_nfm_rx.cc to:

 audio_sink::sptr sink = audio_make_sink(rate,"SDR1000Play");

recompile, re-run, I get

$ ./fcd_nfm_rx

gr_fir_ccf: using 3DNow!
terminate called after throwing an instance of ‘std::runtime_error’
what(): audio_alsa_source(2): insufficient connected output ports
(12 needed, 2 connected)
Aborted

Somehow it’s not fooled by the .asoundrc, but I can substitute
audio_make_sink(rate,“hw:2,0”); and decode NFM out of a USB sound card.

I can’t get
gr-fcd/apps/fcd_nfm_rx.grc at master · csete/gr-fcd · GitHub to work
with either a USB sound card, the M2496 or the M2496 with Volker’s
.asoundrc. The only output I get is

Executing: “/home/alex/downloads/radio/gr-fcd/apps/fcd_nfm_rx.py”

gr_fir_ccc: using 3DNow!Ext
len(audio_taps) = 635
gr_fir_fff: using 3DNow!
gr_fir_ccf: using 3DNow!

Done

I think I’m just going to give up on this PC and use the laptop with
the FCD instead.

alexd