EnablingGstreamerSupport

  1. Enabling Gstreamer Support in 770
      1. Prerequisities
      2. Installing GStreamer and ALSA libraries
      3. Testing ALSA and OSS support
      4. Testing GStreamer support
      5. Troubleshooting

Enabling Gstreamer Support in 770

This HOWTO describes how to enable both ALSA and OSS sound support in Nokia 770.

Prerequisities

For audio support we need kernel with ALSA and / or OSS support enabled. USB audio needs to be enabled, too. Currently no working microphone driver exists and the only way to achieve both capture and playback we need USB headset (connected to USB hub). Use flasher to enable USB host mode for 770 ($ ./flasher --enable-usb-host-mode).

Installing GStreamer and ALSA libraries

First we download GStreamer debian packages for ARM from http://packages.debian.org. Good place to store the packages is the MMC (for example into directory gst-pkgs) because we will install them to 770.

Required packages * alsa-utils * libasound2 * gstreamer0.8-alsa * gstreamer0.8-misc * gstreamer0.8-oss * gstreamer0.8-tools * libgstreamer0.8 * libgstreamer0.8-plugins

Additional packages for RTP with GSM codec * gstreamer0.8-gsm * gstreamer0.8-rtp * libgsm1

We use serial console to gain root access to 770, and log in as root. The packages are installed by:

$ cd /media/mmc1/gst-pkgs
$ for i in *.deb; do dpkg -x $i /; done

Testing ALSA and OSS support

To verify the sound capabilities (kernel supported audio drivers) we check the existence of several block devices. IF we have OSS support:

$ ls /dev/sndstat

If the device does not exist, we do not have OSS support. Alsa support can be verified by

$ ls /proc/asound
alsamixer

can be used to adjust both playback and capture levels. Microphone has to have "Capture" enabled, but its levels zeroed.

If the kernel has ALSA support, we should now be able to test audio loopback (from microphone to loudspeakers) with USB headset. To try this we use arecord and aplay. USB headset is referred by ALSA as hw:1 (hw:0 is the default internal soundcard).

$ arecord -D hw:1 -f S16_LE - | aplay -D hw:1

If the kernel has OSS support, we read and write directly to /dev/dsp1, which is the block device for USB headset:

$ cat > /dev/dsp1 < /dev/dsp1

Testing GStreamer support

To test GStreamer with ALSA we create a GStreamer pipeline from ALSA source to ALSA sink.

$ gst-launch-0.8 alsasrc device="hw:1" ! alsasink device="hw:1"

GStreamer with OSS

$ gst-launch-0.8 osssrc device="/dev/dsp1" ! osssink device="/dev/dsp1"

Troubleshooting

  • No sound after 1-3 seconds when using GStreamer with ALSA. No solution yet, except to use OSS.
  • ESD (Enlightened Sound Daemon) might prevent playback. It can be shut down by $ /etc/init.d/esd stop.
  • If 770 is used without serial console as normal 'user', /dev/dsp1 needs to have read and write permissions for everybody ($ chmod o+rw /dev/dsp1).