discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] GNU Radio Companion - ALSA


From: Volker Schroer
Subject: Re: [Discuss-gnuradio] GNU Radio Companion - ALSA
Date: Sun, 19 Feb 2017 17:27:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Hi Robin,
I think that the PI audio hardware is stereo.
So set in your audio sink the number of inputs to to and than connect the second input channel to the same port of the preceding port the first channel is connected to.

-- Volker

Am 19.02.2017 um 17:17 schrieb Robin A. Jensen:
Hello Volker

My audiosink is in mono. 1 input.
If I put in a 2. Rationel Sampler and gonnect it's input to WBFM Revicer
and then put Rat. Samp. 2 to a second input on audio sink, i'll get:
RuntimeError: audio_alsa_sink
don't know another way to make WBFM into 2 channel?

Best regards
Robin.


Den 19-02-2017 kl. 17:05 skrev Volker Schroer:
Hi Robin,
that means , you got the correct device name, but your selected
topology is wrong. That happens for example if you provide one input
to a stereo device.

-- Volker

Am 19.02.2017 um 16:52 schrieb Robin A. Jensen:
Hello Volker

It will still create error:
    RuntimeError: check topology failed on audio_alsasink(8) using
ninputs=1, noutputs=0

Best regards
Robin.


Den 19-02-2017 kl. 16:44 skrev Volker Schroer:
Robin,
try to use hw:0 or plughw:0 as device string.

The hardware device must be written in lowercase.

If I user uppercase I get the same error as you reported.

ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.1.2/work/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate)

Unknown PCM HW:2,0
ERROR: [HW:2,0]: Datei oder Verzeichnis nicht gefunden

If in lowercase:

audio_alsa_sink[hw:2,0]: using S32_LE

-- Volker


Am 19.02.2017 um 16:15 schrieb Robin A. Jensen:
Yes of course.
Here we go:

aplay -L

null
    Discard all samples (playback) or generate zero samples (capture)

pulse
    PulseAudio Sound Server
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device

dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device

dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device

dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device

dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device

hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions

hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions

plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions

plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions

If i use @: speaker-test -f 800 -t sinus -r 48000 -c 1-s 1
I'll get a fine sinus tone.
So there are sound through the system.

Best regards
Robin.


Den 19-02-2017 kl. 15:48 skrev Marcus Müller:
You're right, we should tackle this more systematically.

My problem is that I don't have a RPi3 to play around with at hand,
so I
have to trust you on the "HW:0,0"; it's not a very typical string,
through, as most alsa device names are lowercase. Could you share the
output of "aplay -L" with us?

Best regards,
Marcus

On 19.02.2017 15:16, Robin A. Jensen wrote:
Hello Marcus.

Thanks for your reply and your welcomming to the community.

I've made the changes as suggested.
Also i've made a setup on a Windows 10 machine, to ensure the script
runs.
With the changes the sound is much better! :-)

But when i run the same setup on RPi 3 / Jessie-distro i've end up
with the same result, no matter what I do with the Audio sink.
I'm using Gnu Radio Companion 3.7.5
The error code is still:

ALSA libpcm.c2239:)snd_pcm_open_noupdate) Unknown PCM HW:0,0 <-- 10
times this line
gr::log :ERROR: audio_alsa_sink0 - [HW:0,0]: No such file or
directory.
File "/home/pi/radio/top_block.py", line133, in <module>
  tb= top_block()
File "/home/pi/radio/top_block.py", line82, in __init__
self.audio_sink_0 = audio.sink(48000, "HW:0,0", True)
File
"/usr/lib/python2.7/dist-packages/gnuradio/audio/audio_swig.py",
line 195, in make
return _ausio_swig.sink_make(*args, **kwargs)
RuntimeError: audio_alsa_sink

I know is alwayes is eassy to blame the software, but could it be a
bug?
As i said. i've tried with all the suggested lines from
documentation
of the block.

Best regards
Robin.

Den 18-02-2017 kl. 18:17 skrev Marcus Müller:
Hi Robin,

first of all: Welcome to the GNU Radio community!


On 02/18/2017 05:29 PM, Robin A. Jensen wrote:
Hello all of you.

I've just recieved my RTL-SDR dongle and is all new to this
sdr-stuff,
so please bear over with me, if i'm at the wrong place.
I'm using GNU Radio Companion on a RPi 3 and no mather what i'll
do, i
can't get the sound to work.
If a'im using rtl_fm and aplay, i'll get sound but it won't set
on the
radiostation.
aha, so that's good, the sound system as it does work.
You'll probably want to use "aplay -L" to find the possible ALSA
device
names that you can use in the GNU Radio Audio sink.
I'll take on that later.
I've createt a small FM Reciever in GNU Radio companion and
everytime
i'll execute the script i'll get an error:

RuntimeError.audio.alsa.sink
Hm, I've never seen a GNU Radio error being printed like this; but
that
might just be me. However, I can't reproduce this error printing
shape
as hard as I try.
I've been all over the internet to find a solution but with no
luck.
So now i'm have a hope that this mailling list can help me?

My suspicion is that your audio device doesn't like the sampling
rate
your trying to use, or you need to specify a device name (or
both). Can
you make things work on the PC you use to design these flow graphs?

I'd start with a signal source (sampling rate == the sampling rate
that
you set in your Audio sink), configured to produce a "float" output
sine
of 1 kHz, directly connected to an Audio sink. If that works, move
on.

--------------------------------------------------------------------------------





What I say about the flow graph in the following has, as far as
I can
tell, nothing to do with the error you're getting. Still, there's
mistakes in the flow graph that would make it impossible to
successfully
run it, and thus I'd like to avoid frustration later on by pointing
them
out know:


So, the main issue with your flow graph is that the sampling
rate at
the
audio sink must be what you configured your audio sink for (48
kHz).
But: that rate is the result of your SDR's sampling rate (2MS/s),
multiplied with all interpolations, divided by all decimations
in the
path between.

My setup is:
RTL-SDR Source: samplerate:  2M, frequency 96.5 MHz ->
Rationel Sampler: Interpolation 4, Decimation: 1 ->
Uh, that means that you have now 8MS/s. That seems unnecessary,
since to
capture a <100 kHz wide FM channel, you wouldn't even need the
2MS/s
you get
Low Pass Filter: Sample rate: 2M, Cutoff freq: 100K, Transition
Width:
100k ->
Which contradicts the 2MS/s used here, so you're actually getting
400kHz
passband width, 400kHz transition width. Also, this feels like a
prime
candidate for including decimation in the filter (because the
resulting
bandwidth is 200 kHz (if you overlap the two transition widths),
and
for
that you'd only need 200 kS/s of complex digital signal).
WBFM Recive: Quadrature: 500K, Audio Decimation: 1 ->
This is now off by a factor of 16; are you sure you should be using
"interpolation=4,decimation=1" instead of the inverse?
Rationel Sampler: Interpolation: 500
Certainly not :) 8 MS/s · 500 = 4 GS/s
Decimation: 48
Aside from that not even having greatest common denominator of 1
with
500 (you can't know that this is important, not blaming you), this
would
give you an output sampling rate of 4GS/s/48 = 1 GS/s / 12 = 83.333
MS/s. Which isn't even a multiple of 48 kHz, which you use in the
audio
sink:
->
Audio Sink: Sample Rate: 48 KHz, Device Name: HW:0,0

I've found that recipie on a Hack5 video and there it's working
I think there's some error in the way you configured these
resamplers. I
don't know the Video you're referring to, but the amount of
rational
resamplers used here alone, paired with the fact that you don't
decimate
in the WBFM receiver makes me kind of suspicious this might not
have
been the optimal video to take reference designs from!

--------------------------------------------------------------------------------





Best regards,
Marcus
With best regards
Robin.


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]