2008-06-26 15:26:14 obtaining I2S channel information from SPORT?
Kyle Schlansker (UNITED STATES)
Message: 57936
I've configured SPORT0 to read data from and AD1871 chip via the I2S protocol. When I'm reading the data from the sport data register, how do I know what channel (left or right) that specific sample is from? If the SPORT was configured as a master then I could assume a known starting state by reading the "send left channel first" (RRFST) bit in the SPORT RCR2 register. However, it is configured as a slave device so I'm not sure how to get that info.
QuoteReplyEditDelete
2008-06-27 16:14:49 Re: obtaining I2S channel information from SPORT?
Kyle Schlansker (UNITED STATES)
Message: 57974
In case anyone is interested, I worked around this issue by simply tying the L/R clock (frame signal) to the secondary data line (PJ4) of the SPORT0 interface. This means that every other value in the SPORT FIFO is really the channel identifier. So, I can read one value from the fifo, then read another to determine what channel it was from. While this means my driver needs to process 2x as much data, it seems to be the only solution I have thought of.
I'm pretty surprised there aren't separate fifo's for each channel. The bf537 eval board looks like it has an AD1871 chip wired up as a master (so the SPORT0 acts as a slave). Anyone know how that board determines channels?
QuoteReplyEditDelete
2008-06-28 15:02:28 Re: obtaining I2S channel information from SPORT?
Robin Getz (UNITED STATES)
Message: 58028
Kyle:
The I2S normally defines an L/R frame sync.
-Robin
QuoteReplyEditDelete
2008-06-30 09:33:28 Re: obtaining I2S channel information from SPORT?
Kyle Schlansker (UNITED STATES)
Message: 58120
Hi Robin,
I meant that I was confused on how to obtain channel information once data is in the hardware fifo. I do indeed supply an L/R frame sync, which I assume is needed for the blackfin hardware to work. However, once I read from the SPORT0_RX register, how do I determine if the value I just read is from the left or right channel?
QuoteReplyEditDelete
2008-08-11 16:35:04 Re: obtaining I2S channel information from SPORT?
Kyle Schlansker (UNITED STATES)
Message: 60256
For the sake of the forum record:
It appears that the left channel is always the first value in the hardware fifo, even if the SPORT is configured as a slave. I confirmed this by tieing the frame sync line to the secondary data pin, and on every test run the second fifo value (corresponding to the secondary data pin, or frame sync signal) is 0xffffffff, indicating the left channel.