View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Audio

From LQWiki

Jump to: navigation, search

Audio is sound that can be heard. Audio in linux is governed mostly by ALSA, a software layer that interacts with your computer's soundcard and software to produce sound output through speakers or digital input from a microphone or other input device.

Contents

Supported Devices

Radio

radioSHARK

Made by Griffin, this is a USB radio tuner. (a.k.a. Radio Shark)

The linux 2.6.12 usb audio drivers are known to work with the radioSHARK. A user-mode application is required to change radio stations and turn on/off LEDs on the hardware. This application uses a usb-hid (human interface device) interface to send six byte commands to the device to do the control.

The usb audio drivers (if using OSS) will expose the input as a dsp device, with 2 channels and a 6400 sample rate. The program ecasound can be used to pipe the output from the radio input to the sound card/speaker output. For example: ecasound -D -f:s16_le,2ch,6400,inter-leaved -i:/dev/dsp1 -o:/dev/dsp -B:nonrt -z:db -b:4096

The user-mode application posted here is public domain. It requires libhid.

What version libhid ?

While obtaining libhid, be sure *not* to use the CVS version as they stopped updating it as of October 2004 in favor of Subversion. The CVS service is still functional; however, it sends an old version that does not include a function that shark.c requires. (hid_interrupt_write)

example

< plug in the usb device >

shark -fm 90.3

ecasound -D -f:s16_le,2ch,6400,inter-leaved -i:/dev/dsp1 -o:/dev/dsp -B:nonrt -z:db -b:4096

success stories

A useful webpage for operating the radioSHARK via the ALSA interface can be found at http://whats.all.this.brouhaha.com/?p=199


Personal tools