AN00231 SPDIF-Receive-to-I2S-output-using-ASRC x->192kHz
-
- Experienced Member
- Posts: 78
- Joined: Thu Mar 08, 2018 2:44 pm
Yes I am running the original project on the Multi-channel board. How can i enable console output? Button 1 does change SR but in the code there isn't an option for 192 so ones I set 192 as default I2S is is kept like that. My only way of monitoring the system is with APx. Could you point me towards how I should proceed with getting console output?
-
- Experienced Member
- Posts: 119
- Joined: Mon Sep 15, 2014 1:32 pm
Open Makefile
Add -DDEBUG_PRINT_ENABLE=1 to the XCC_FLAGS
LED discription you can find here:
https://www.xmos.com/download/private/A ... rc1%29.pdf
Add -DDEBUG_PRINT_ENABLE=1 to the XCC_FLAGS
Code: Select all
XCC_FLAGS = -O3 -g -report -DDEBUG_PRINT_ENABLE=1
https://www.xmos.com/download/private/A ... rc1%29.pdf
-
- Experienced Member
- Posts: 78
- Joined: Thu Mar 08, 2018 2:44 pm
-
- Experienced Member
- Posts: 119
- Joined: Mon Sep 15, 2014 1:32 pm
Try this
Run Configurations -> Main tab -> Target I/O options -> select xSCOPE
Run Configurations -> Main tab -> Target I/O options -> select xSCOPE
-
- Experienced Member
- Posts: 78
- Joined: Thu Mar 08, 2018 2:44 pm
-
- Experienced Member
- Posts: 119
- Joined: Mon Sep 15, 2014 1:32 pm
What I see with my board:
Disconnect AES cable, run program
Connect AES@48k cable
Disconnect AES cable, run program
Code: Select all
Starting I2S
SR change in lib_audio_codec - 192000
Initializing I2S to 192000Hz and MCLK to 24576000Hz
spdif rate ave=0, valid=0, i2s rate=190994, valid=0, i2s_buff=-615, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=190994, valid=0, i2s_buff=-195, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=190994, valid=0, i2s_buff=-419, fs_ratio=0x4000000, nom_fs=0x4000000
Code: Select all
New rate in SRC in=1, out=5
New rate in SRC in=1, out=5
spdif rate ave=48003, valid=1, i2s rate=191999, valid=1, i2s_buff=-9, fs_ratio=0x40010B7, nom_fs=0x4000000
spdif rate ave=48003, valid=1, i2s rate=191999, valid=1, i2s_buff=-2, fs_ratio=0x3FFFCCB, nom_fs=0x4000000
spdif rate ave=48003, valid=1, i2s rate=191999, valid=1, i2s_buff=-3, fs_ratio=0x3FFFDB6, nom_fs=0x4000000
-
- Experienced Member
- Posts: 78
- Joined: Thu Mar 08, 2018 2:44 pm
could you send me your software? Because I have made only the adjustments that you have spoke of. I will be able to make that APx test again tomorrow and I will post the results.
-
- Experienced Member
- Posts: 119
- Joined: Mon Sep 15, 2014 1:32 pm
Are you sure you have set
#define DEFAULT_FREQ_HZ_I2S 192000 ?
non_fs in your console output is 0x1000000. It's like i2s rate is 48k.
check main.xc -> asrc() uses defines, not digital values
#define DEFAULT_FREQ_HZ_I2S 192000 ?
non_fs in your console output is 0x1000000. It's like i2s rate is 48k.
check main.xc -> asrc() uses defines, not digital values
Code: Select all
fs_code_t in_fs_code = samp_rate_to_code(DEFAULT_FREQ_HZ_SPDIF); //Sample rate code 0..5
fs_code_t out_fs_code = samp_rate_to_code(DEFAULT_FREQ_HZ_I2S);
-
- Experienced Member
- Posts: 78
- Joined: Thu Mar 08, 2018 2:44 pm
I just tested some other options. But setting 192 as default only gives out 182.

Starting I2S
SR change in lib_audio_codec - 192000
Initializing I2S to 192000Hz and MCLK to 24576000Hz
spdif rate ave=0, valid=0, i2s rate=182360, valid=0, i2s_buff=-141, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182314, valid=0, i2s_buff=-36, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182311, valid=0, i2s_buff=-90, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182360, valid=0, i2s_buff=-146, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182314, valid=0, i2s_buff=-40, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182311, valid=0, i2s_buff=-31, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182314, valid=0, i2s_buff=-86, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182360, valid=0, i2s_buff=-141, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182311, valid=0, i2s_buff=-35, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182314, valid=0, i2s_buff=-91, fs_ratio=0x4000000, nom_fs=0x4000000

Starting I2S
SR change in lib_audio_codec - 192000
Initializing I2S to 192000Hz and MCLK to 24576000Hz
spdif rate ave=0, valid=0, i2s rate=182360, valid=0, i2s_buff=-141, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182314, valid=0, i2s_buff=-36, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182311, valid=0, i2s_buff=-90, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182360, valid=0, i2s_buff=-146, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182314, valid=0, i2s_buff=-40, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182311, valid=0, i2s_buff=-31, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182314, valid=0, i2s_buff=-86, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182360, valid=0, i2s_buff=-141, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182311, valid=0, i2s_buff=-35, fs_ratio=0x4000000, nom_fs=0x4000000
spdif rate ave=0, valid=0, i2s rate=182314, valid=0, i2s_buff=-91, fs_ratio=0x4000000, nom_fs=0x4000000
-
- Experienced Member
- Posts: 119
- Joined: Mon Sep 15, 2014 1:32 pm
What i2s rate is when you plug correct spdif input stream?