K-Team KoreSound User Manual

Summary of KoreSound

  • Page 1

    Koresound user manual version 0.1 july 2004.

  • Page 2

    Documentation author c´edric gaudin for k-team s.A. Ch. De vuasset, cp 111 1028 pr´everenges switzerland email: info@k-team.Com url: www.K-team.Com trademark acknowledgments: ibm pc: international business machine corp. Macintosh: apple corp. Sun sparc-station: sun microsystems corp. Labview: nation...

  • Page 3

    Table of contents 1 introduction 3 2 koresound hardware 4 2.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 koresound connections . . . . . . . . . . . . . . . . . . . . . 4 2.2.1 korebot connections . . . . . . . . . . . . . . . . . . 5 2.3 hardware protection . . . . . ....

  • Page 4

    1 introduction the koresound board is a korebot extension that provides audio playback and recording capabilities. It offers one audio stereo output and two audio stereo inputs. This document presents how to use koresound. K-team s.A. 3.

  • Page 5

    2 koresound hardware 2.1 overview koresound can be used in application that requires sound playback and recording (such as mp3 player, speech synthesis and recognition). The hardware is quite simple and provides one audio output (out) and two audio inputs (in1 and in2). Figure 2.1 describes the boar...

  • Page 6

    2.2.1 korebot connections the korebot connection is pretty straightforward, the boards should be simply stacked together. The korebot will provide the +3.3v power supply to koresound. 2.3 hardware protection 2.3.1 electrostatic discharge protection as any electronic device, the koresound may be dama...

  • Page 7

    3 koresound software 3.1 overview this chapter presents how to use koresound from a korebot using the linux operating system. It requires: • a korebot (with a koreconnect or a koresdk) • a koresound • a terminal emulator software (such as minicom or hyperterminal) • a host computer with at least one...

  • Page 8

    Two devices is created in ’/dev/sound’ by the sound driver: /bin # ls /dev/sound/* /dev/sound/dsp /dev/sound/mixer 3.3 basic commands the simplest command that can be used is the standard file copy command ’cp’. This command just copy the content of a source file into a destina- tion file. The idea ...

  • Page 9

    3.4.1 sound devices the sound driver creates two devices; /dev/sound/dsp and /dev/sound/mixer. The first device (’/dev/sound/dsp’) is used to play and record sound. It con- trols the behaviour of the audio a/d and d/a converters. The mixer device (’/dev/sound/mixer’) is used to change the input leve...

  • Page 10

    To record sound or music, the ’read’ function is used. /* open a wave file to play */ wav_fd = open( "test.Wav" , o_rdwr ); if ( wav_fd /* opening error */ } /* open the sound device */ dsp_fd = open( "/dev/sound/dsp" , o_rdwr ); if ( dsp_fd /* opening error */ } ... /* * select the first input in1 ...

  • Page 11

    I/o control description sndctl dsp stereo always reports stereo channel. Sndctl dsp channels returns the number of channels used. Sound pcm read channels same as snd- ctl dsp channels sndctl dsp speed select the sampling rate. 8’000, 16’000, 22’050, 44’100, 48’000 hz are supported choices. Sound pcm...

  • Page 12

    I/o control description sound mixer info fill the structure struct mixer sound mixer volume changes the main output volume. Only the least significant byte is used to change both left and right channels. Sound mixer bass changes the bass level. Only the least significant byte is used to change both ...

  • Page 13

    K-team sa ch de vuasset, cp 111 1028 préverenges switzerland.