I have a project based on a DJ (SU1) multichannel audio reference design.
Due to additional ports requirements I need to remap audio ports.
I remapped the ports in .xn file.
No audio appears at outputs.
Any ideas what additional steps should I take ?
Gennady
audio ports remapping on su1
-
- Experienced Member
- Posts: 99
- Joined: Sat Aug 31, 2013 11:23 pm
-
- XCore Legend
- Posts: 1126
- Joined: Thu May 27, 2010 10:08 am
Changing the XN file automatically will change your port mapping (it generates a temp .h file with the port defines in it during build) so you're on the right track, and simple port re-mapping won't affect functionality or timing.
If you are getting no audio then it's time to start debugging... SOme things to check.
Presumably you changed ports for equivalent types? Eg. 1b ports to 1b ports? Changing port width could change functionality.
If you hear no audio then, you're either your audio CODECs are connected to the wrong place (I2S lines are wrong) or perhaps something more fundamental like there's no MCLK. MCLK is needed to clock/drive the who firmware because it runs in asynch mode.
Did you try to change the SPI ports? Note that these are fixed at boot time so cannot be changed, short of modifying boot using OTP.
Does it all start working again if you revert to the standard mapping? (This will check to see if anything else got broken)
If you are getting no audio then it's time to start debugging... SOme things to check.
Presumably you changed ports for equivalent types? Eg. 1b ports to 1b ports? Changing port width could change functionality.
If you hear no audio then, you're either your audio CODECs are connected to the wrong place (I2S lines are wrong) or perhaps something more fundamental like there's no MCLK. MCLK is needed to clock/drive the who firmware because it runs in asynch mode.
Did you try to change the SPI ports? Note that these are fixed at boot time so cannot be changed, short of modifying boot using OTP.
Does it all start working again if you revert to the standard mapping? (This will check to see if anything else got broken)
-
- XCore Expert
- Posts: 968
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
What ports did you change? And to what?
-
- Experienced Member
- Posts: 99
- Joined: Sat Aug 31, 2013 11:23 pm
Thank for the response.
It was my fault -
the I2S_IN0 is remapped to the same port as FLASH_SPI_MISO
and the flash disable was not properly done :(
It works now.
I also have a few additional questions:
1. My board is self-powered.
Without
I could get only 2 USB channels (instead of 6 I need).
I can't find a SELF_POWERED definitions I can modify,
so I just inserted the above definition in endpoint0.xc.
Is this OK ?
2. My board is supposed to work at a single sample rate of 48K (fixed oscillator of 24.576MHz).
So I need to prevent the PC recording software from changing the sample rate.
I tried to set all sampling frequencies in USB descriptors to 48K values.
It didn't work.
So in audiorequests.xc function AudioClassRequests_2(), case CS_SAM_FREQ_CONTROL:
i commented out 44100, like this
So now the num_freq = 1 and the only value stored is 48000.
It works, but I am not sure that this is the right way to do it.
Any considerations ?
Gennady
It was my fault -
the I2S_IN0 is remapped to the same port as FLASH_SPI_MISO
and the flash disable was not properly done :(
It works now.
I also have a few additional questions:
1. My board is self-powered.
Without
Code: Select all
#define SELF_POWERED
I can't find a SELF_POWERED definitions I can modify,
so I just inserted the above definition in endpoint0.xc.
Is this OK ?
2. My board is supposed to work at a single sample rate of 48K (fixed oscillator of 24.576MHz).
So I need to prevent the PC recording software from changing the sample rate.
I tried to set all sampling frequencies in USB descriptors to 48K values.
It didn't work.
So in audiorequests.xc function AudioClassRequests_2(), case CS_SAM_FREQ_CONTROL:
i commented out 44100, like this
Code: Select all
//#if MAX_FREQ >= 44100
//storeFreq(buffer, i, 44100);
//num_freqs++;
//#endif
#if MAX_FREQ >= 48000
storeFreq(buffer, i, 48000);
num_freqs++;
#endif
It works, but I am not sure that this is the right way to do it.
Any considerations ?
Gennady
-
- XCore Expert
- Posts: 968
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
I would add it to customdefines.h as this is included over the whole project.genap wrote:Thank for the response.
It was my fault -
the I2S_IN0 is remapped to the same port as FLASH_SPI_MISO
and the flash disable was not properly done :(
It works now.
I also have a few additional questions:
1. My board is self-powered.
WithoutI could get only 2 USB channels (instead of 6 I need).Code: Select all
#define SELF_POWERED
I can't find a SELF_POWERED definitions I can modify,
so I just inserted the above definition in endpoint0.xc.
Is this OK ?
The supported freqs are not in the descriptors, but in the response to the request you have modified. What you have done is correct I would say (there is no MIN_FREQ define - maybe I should add one, but its a bit unusual)genap wrote: 2. My board is supposed to work at a single sample rate of 48K (fixed oscillator of 24.576MHz).
So I need to prevent the PC recording software from changing the sample rate.
I tried to set all sampling frequencies in USB descriptors to 48K values.
It didn't work.
So in audiorequests.xc function AudioClassRequests_2(), case CS_SAM_FREQ_CONTROL:
i commented out 44100, like this
So now the num_freq = 1 and the only value stored is 48000.Code: Select all
//#if MAX_FREQ >= 44100 //storeFreq(buffer, i, 44100); //num_freqs++; //#endif #if MAX_FREQ >= 48000 storeFreq(buffer, i, 48000); num_freqs++; #endif
It works, but I am not sure that this is the right way to do it.
Any considerations ?
Gennady