rxseger / linuxproblems

Problems I encountered with Linux-based software
1 stars 0 forks source link

gr::log :ERROR: audio_alsa_sink0 - [default]: set_channels failed: Invalid argument #4

Open rxseger opened 8 years ago

rxseger commented 8 years ago

Raspberry Pi 3 with Raspbian OS 2016-05-27-raspbian-jessie.img, headless setup and VNC sudo apt install gnuradio sudo apt install gr-osmosdr gnuradio-companion

Create a trivial flowgraph with an Audio Sink:

screen shot 2016-06-05 at 1 18 35 am

attempt to run it. Fails with an ALSA error:

Generating: "/home/pi/top_block.py"

Executing: "/home/pi/top_block.py"

linux; GNU C++ version 4.9.1; Boost_105500; UHD_003.007.003-0-unknown

Xlib:  extension "RANDR" missing on display ":2.0".
Using Volk machine: neon_hardfp_orc
gr-osmosdr 0.1.3 (0.1.3) gnuradio 3.7.5
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy 

FATAL: No supported devices found to pick from.

Trying to fill up 1 missing channel(s) with null source(s).
This is being done to prevent the application from crashing
due to gnuradio bug #528.

gr::log :INFO: audio source - Audio sink arch: alsa
gr::log :ERROR: audio_alsa_sink0 - [default]: set_channels failed: Invalid argument
Traceback (most recent call last):
  File "/home/pi/top_block.py", line 204, in <module>
    tb.Start(True)
  File "/usr/lib/python2.7/dist-packages/grc_gnuradio/wxgui/top_block_gui.py", line 73, in Start
    self.start()
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 104, in start
    top_block_start_unlocked(self._tb, max_noutput_items)
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 4726, in top_block_start_unlocked
    return _runtime_swig.top_block_start_unlocked(*args, **kwargs)
RuntimeError: check topology failed on audio_alsa_sink(20) using ninputs=1, noutputs=0
rxseger commented 8 years ago

Also seen at:

When trying to use audio sink in GRC I get following error:

audio: using audio_alsa audio_alsa_sink[hw:0,0]: set_channels failed: Invalid argument

It's the same with device "plughw:0,0". No error with hw:0,1 (HDMI output but i'm not connected to a TV)

Something related to speakers channels ? On the RPi, there is only one jack output.

Thanks in advance for any help.

Plugged in an audio jack, same results.

Hint from http://gnuradio.4.n7.nabble.com/Error-with-audio-alsa-sink-td24565.html - "Try it with the -O plughw:0,0 option"

Double-click on audio sink, can specify Device Name, documentation says:

    Creates a sink from an audio device at a specified sample_rate. The specific audio device to use can be specified as the device_name parameter. Typical choices are: 

       - pulse, hw:0,0, plughw:0,0, surround51, /dev/dsp

    Args:
        sampling_rate : 
        device_name : 
        ok_to_block :

Same results with Device Name of "hw:0,0", but "hw:0,1" gives a different error with 48k sampling rate: snd_pcm_sw_params: Invalid argument. 32k returns "unable to support sampling rate 32000, Card requested 44100 instead".

The following parameters produce no errors:

Device Name: hw:0,1 Sampling Rate: 44100

and produce audio on the 3.5mm audio jack (although it is choppy and GNU Radio reports OaUUOaUOOaU...)


update: fm radio reception works with 48000 audio sink sample rate, hw:0,1, and osmocom source samp_rate 1e6

VeggieVampire commented 7 years ago

Try changing the Variable Sample Rate value to 2e6 on the left side to stops the OaUUOaUOOaU