This entry is kind of a continuation of:
http://e2e.ti.com/support/arm/sitara_arm/f/791/t/307825.aspx
I just felt that putting under the same entry would cause for confusion though.
Anyways if you look at the other post you will see that i was able to get audio output working on all 6 channels awhile back and it has been working great ever since. Recently i needed to get the line in (2 channel ADC) of the codec working. I encountered a couple issues in doing this:
1. If you look at my schematics on the other post i tied the ADC Bit Clk to the DAC Bit Clk and the ADC Frame Sync to the DAC Frame Sync. I was then setting the Codec up as the master so as soon as both the ADC and DAC were initialized it would all stop working because they were both trying to source a clock. Anyways this i fixed by modifying sound/soc/codecs/wm8580.c to init the DAC along with the ADC so that i could set the ADC as a slave allowing the DAC to control the clocks. The way i coded this into wm8580 rather than using calls from my davinci-evm.c file doesn't seem that desireable to me, so i may go back and try to get this set up more cleanly at some point.
2. Now this is the issue i have question on. Basically the codec has 6 output channels and only 2 input, so when the ADC is running you get data in the first 2 TDM slots but the other 4 have just garbage. Everything was set up to have only 2 capture channels and when i record data from linux it reads the garbage slots as input for my 2 channels. This means my sample is record 3x slower with a bunch of static and stuff introduced from it pulling in the garbage TDM slots. I could not figure out the way to indicate that only the 2 of the slots should be used. What i ended up doing was setting capture to 6 channels, so that it is essentially caputuring the other 4 slots as seperate channels. I can set up a config in asound.conf to use only those 2 channels. This seems to work great, but it doesn't seem like the right way. Is there a better way to indicate that the last 4 slots should be ignored or is setting it to 6 channels like i did the only way?