Thread:CircuitCo talk:Audio Cape RevB/aplay .wav file synchronization issues

Hi,

Basically the audio cape is working. Except for one strange phenomena that mistifies me. I will try to explain.

When I play a .wav file for example speaker-test -t vaw -> if lucky I hear Front Left - Front right as one expects. But 9 out of 10, I hear white noise with the audio front left front right very faint in the background or at another time the sound is simply distorted. The same happens when I play a file with aplay or mplayer.

So when I am lucky, or timing with respect to system clock is in sync I hear the audio clearly, if out of sync it might me white noise or distorted playback.

I have google extensively and have not found any solution. So I hope one of you guys knows whats happening here. It has to be something low level.

I'm quite a newby in this matter but acording to this: http://www.troubleshooters.com/linux/sound/sound_troubleshooting.htm all seams to work ok.

These are my system parameters and settings: root@beaglebone:~# lsb_release -a Distributor ID: Angstrom Description:   Angstrom GNU/Linux v2012.12 (Core edition) Release:       v2012.12 Codename:      Core edition

root@beaglebone:~# cat /sys/devices/bone_capemgr*/slots 0: 54:PF--- 1: 55:PF--- 2: 56:P---L CBB-Relay,00A0,Logic_Supply,CBB-Relay 3: 57:PF--- 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI 6: ff:P-O-L Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BONE-AUDI-02

root@beaglebone:~# speaker-test -t wav

speaker-test 1.0.25

Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels WAV file(s) Rate set to 48000Hz (requested 48000Hz) Buffer size range from 128 to 32768 Period size range from 8 to 2048 Using max buffer size 32768 Periods = 4 was set period_size = 2048 was set buffer_size = 32768 0 - Front Left Time per period = 0.641097 0 - Front Left

root@beaglebone:~# mplayer AxelF.wav MPlayer2 2.0-379-ge3f5043 (C) 2000-2011 MPlayer Team 162 audio & 361 video codecs

Playing AxelF.wav. Detected file format: WAV format (libavformat) [wav @ 0xb6082780]max_analyze_duration reached [lavf] stream 0: audio (pcm_s16le), -aid 0 Load subtitles in.

=
============================================================= Forced audio codec: mad Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)

=
============================================================= AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... A:  1.6 (01.6) of 15.9 (15.8)  0.3%

MPlayer interrupted by signal 2 in module: unknown

Exiting... (Quit)