Other Parts Discussed in Thread: CC3200AUDBOOST, CC3200
Hello all,
i'm using CC26x2 launchpad and CC3200AUDBOOST module togheter. What i want to achive is to play some melody using CC3200 audio board.
Sorry if my questions will be naive (or even stupid), but i'm totaly new to this topic (audio, i2s, etc).
So first what i did was run i2secho example from sdk 4.30 and it worked for me.
Now i want to just play single tone (1kHz sine wave). I tried to modify the example, but without success.
So generaly i created array with 1kHz sine wave to be played out. I used audio codec driver from example.
First i tried to use only i2s_startWrite() with one transaction but it didn't work.
So my idea was to use those lists (write, treatment and read) from example, and only modify "treatment buffers" before they will be send out.
I did it like shown below:
if(transactionToTreat != NULL){ /* * Treatment: * The higher the sampling frequency, * the less time we have to process the data */ // put sin 1khz to the buffer to be send out static size_t tmp = 0; int16_t* buf = transactionToTreat->bufPtr; for(size_t i = 0; i < BUFSIZE; i++){ buf[i] = tone[tmp]; // put 1khz sine samples to the actual transaction buffer tmp++; if(tmp == tone_buffer_size_get()){ tmp = 0; } }
I simply copy values from my tone array which contains samples of 1kHz sine, to the transaction buffer that will be send out next.
But this doesnt work for me as well.
I've some questions about how to use i2s driver and audio codec.
1. How can i set up i2s or/and audio codec to only send out data. I dont need to read any data from mic.
I tried to pass "AudioCodec_MIC_NONE" to AudioCodec_config function but didn't saw any difference.
2. Have i always use both I2S_startRead() and I2S_startWrite()?
3. Is there any documentation for I2S driver? I couldnt find anything up to date.
4. How exactly works I2S driver? What will happen when i'll have only one transaction in list? Will it simply end transfer audio data?
Regrads,
mf