XR-AVB-LC-BRD 48kHz sampling to 96kHz
Posted: Tue Apr 17, 2012 10:13 am
By default, the source code provided on githhub avb software stack (5.1.2) is for 24bits 48kHz audio sampling. I'm trying to change the code for a 24bits 96kHz sampling. Of course, i'm facing difficulties :
some jitter and console error
"Media output n (any channel) locked: x (from -100 et +100) samples shorter
Media output n lost lock"
Sound like part of good sample between jitter and freeze. Should start checking the output buffer. The audio output is better and seems to get stability after 1 min.
the modification for now :
xr_avb_demo.xc
media_input_fifo.h
media_output_fifo.h
media_clock_support.c
avb_1722_def.h
I'm starting to use card/ide/tools so it is like jumping up the cliff... It is so much possible that i'm wrong. I have still source code to study but some external advice will be great.
some jitter and console error
"Media output n (any channel) locked: x (from -100 et +100) samples shorter
Media output n lost lock"
Sound like part of good sample between jitter and freeze. Should start checking the output buffer. The audio output is better and seems to get stability after 1 min.
the modification for now :
xr_avb_demo.xc
Code: Select all
// this is the sample rate, the frequency of the word clock
#define SAMPLE_RATE 96000 //48000
// This is the number of master clocks in a word clock
#define MASTER_TO_WORDCLOCK_RATIO 256 //512
Code: Select all
#ifndef AVB_MAX_AUDIO_SAMPLE_RATE
#define AVB_MAX_AUDIO_SAMPLE_RATE (96000) //48000
#endif
#ifndef MEDIA_INPUT_FIFO_SAMPLE_FIFO_SIZE
#define GET_SIZE(x) (x == 44100 || x == 96000) ? 64 : 256
//#define GET_SIZE(x) (x == 44100 || x == 48000) ? 64 : 128
#define MEDIA_INPUT_FIFO_SAMPLE_FIFO_SIZE (GET_SIZE(AVB_MAX_AUDIO_SAMPLE_RATE))
#endif
Code: Select all
#ifndef AVB_MAX_AUDIO_SAMPLE_RATE
#define AVB_MAX_AUDIO_SAMPLE_RATE (96000) //48000
#endif
Code: Select all
#ifndef AVB_MAX_AUDIO_SAMPLE_RATE
#define AVB_MAX_AUDIO_SAMPLE_RATE 96000 //48000
#endif
Code: Select all
#define AVB1722_DEFAULT_FDF (4) //2
// The rate of 1722 packets (8kHz) -> 16kHz
#define AVB1722_PACKET_RATE (16000)