Problems when using ALSA driver and GStreamer framework

      Problems when using ALSA driver and GStreamer framework

      Hello,

      we use PicoCOM4 with kernel "zImage_PicoCOM4_V1.2". Main target of our applications is to transmit and receive audio signals via LAN. Therefore we started with ALSA driver and GStreamer framework. But the simplest application doesn't work: "gst-launch alsasrc ! alsasink". When we put a sine wave test signal to Audio Input we can hear a twisted sine wave signal at Audio Output (some times only with harmonics, some times with strong distortions, but never a clear sine wave). The quality of the output signal changes by itself, without any intervention from us. To check if GStreamer was the problem we coded it directly in C (directly using ALSA driver, without invoking GStreamer): the same behavior appears. A test with the ALSA speaker test application ("speaker-test -f 440 - t sine") shows also a failure ("write error: -32, broken pipe"). We tried also to use OSS driver, but we couldn't open it ("no such device or directory"). And last but not least: The audio test source from GStreamer doesn't work together with alsasink: "gst-launch audiotestsrc ! alsasink" produces a test signal only for a second, then silence. At the PC Linux (Fedora 17) all things (except OSS) work correctly.

      Who can we solve the problem? It is a very important issue for us regarding the decision of using PicoCOM4 as basic board in our applications.

      Re: Problems when using ALSA driver and GStreamer framework

      we tested audio functionality with

      madplay test.mp3

      and

      aplay test.wav

      and

      speaker-test -t wav -c 2

      and that works. So i re-tested with your test and got the same issues. I will look into this.
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      Re: Problems when using ALSA driver and GStreamer framework

      We tested now the new kernel "zImagePC4_V1.4-rc1". Application "gst-launch alsasrc ! alsasink" works much better, but not sufficient / not after every invoking. After invoking the command for the 22nd, 28th, 41st time, it doesn't work. The applications "speaker-test -f 440 - t sine" and "gst-launch audiotestsrc ! alsasink" still don't work (same behavior as reported on Feb 5th 2013). Sending audio streams via LAN with GStreamer have problems also (it works with CPU load of 24%, but on receivers side we didn't hear anything) (analyzing the network streams shows a lot of identical bytes, it looks like noise):

      --> Transmitting:
      gst-launch-1.0 -v rtpbin name=rb \
      alsasrc \
      ! audio/x-raw,format=S16LE, channels=2, rate=44100 \
      ! audioconvert dithering=none \
      ! audio/x-raw,format=S16BE, channels=2, rate=44100 \
      ! rtpL16pay pt=10 \
      ! rb.send_rtp_sink_0 \
      rb.send_rtp_src_0 \
      ! udpsink host=192.168.1.255 port=5302 ttl-mc=10 \
      rb.send_rtcp_src_0 \
      ! udpsink host=192.168.1.255 port=5303 ttl-mc=10 sync=false async=false

      --> Receiving:
      gst-launch -v gstrtpbin name=rb latency=1000 \
      udpsrc multicast-group=192.168.1.255 port=5302 \
      caps="application/x-rtp, media=(string)audio, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)2, channels=(int)2" \
      ! rb.recv_rtp_sink_0 \
      rb. \
      ! rtpL16depay \
      ! audioconvert \
      ! audio/x-raw-int, signed=true, width=16, endianness=1234, channels=2, rate=44100 \
      ! alsasink \
      udpsrc port=5303 \
      ! rb.recv_rtcp_sink_0

      Please provide as a solution a.s.a.p. because a order is pending ...

      Re: Problems when using ALSA driver and GStreamer framework

      RTP Audio

      PicoCOM4 is not capable to stream 44100 from alsasrc ([..] This is most likely because downstream can't keep up and is consuming samples too slowly.) Changing to 32000 rate works.
      But using two channels also results in problems (default of L16 is one channel)

      PicoCOM4 as sender:

      Source Code

      1. gst-launch -v gstrtpbin name=rb alsasrc ! audioconvert ! "audio/x-raw-int,format=S16LE,channels=1,rate=32000" ! rtpL16pay ! rb.send_rtp_sink_0 rb.send_rtp_src_0 ! udpsink host=$IP port=5302 ttl-mc=10 rb.send_rtcp_src_0 ! udpsink host=$IP port=5303 ttl-mc=10 sync=false async=false


      Receiver:

      Source Code

      1. gst-launch -v gstrtpbin name=rb latency=1000 udpsrc port=5302 caps="application/x-rtp, media=(string)audio, clock-rate=(int)32000, encoding-name=(string)L16, encoding-params=(string)1, channels=(int)1, payload=(int)96" ! rb.recv_rtp_sink_0 rb. ! rtpL16depay ! audioconvert ! alsasink udpsrc port=5303 ! rb.recv_rtcp_sink_0
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.