On 04/11/2013 11:56 AM, Daniel Mack wrote:
Hi Lars, Hi Cliff,
I'm looking into the SigmaDSP AD1701 support, as a new prospective project will use it. What's going to be used on this chip is not the DAC/ADC features though, but the internal, programmable DSP things, and designers will use the SigmaStudio IDE to generate the firmware.
So I'm wondering how to support this kind of chip properly in ALSA, which is not straight-forward, as the controls exported by it are specific to the loaded firmware of course. Also, the IDE is free to re-allocate every sub-addresses of its controls when something changes in the layout of the building blocks.
One idea I have in mind is to have a little parser script that reads the generated sources of the IDE and dump a device-tree node snippet which can then be put into the final DT. The driver would need to learn about how to interpret that DT nodes, which will most likely just contain a name, a sub-address, along with some mask and shift values.
I wanted to ask for your opinion on that before I start. Have you ever used any of the DSP features from ALSA/ASoC? Are there any pitfalls I should be aware of? Is anyone actively working on improvements on the driver?
An alternative approach is to write a userspace library of course, but that's going to be problematic once anybody wants to use the DSP features in parallel to the DAC/ADC.
Hi,
I just yesterday wrote a small post how you can program the DSP registers. http://ez.analog.com/message/83094#83094
I'd like to be able to put the information about the different algorithms into the DSP firmware file itself, so we can auto instantiate the controls from the driver. The problem is that it is not so easy to generalize the export of the algorithms from SigmaStudio.
Another problem is that you don't know how to calculate the algorithm parameters at runtime for some of the more complex algorithms.
I don't think it's a good idea to put the control info into the devicetree and would rather prefer to see them go into the firmware. But as I said auto-generating this from exported SigmaStudio files is not so easy. So maybe manually creating the control info table might be an option.
Btw. in case you haven't seen it the SigmaTcp tools is quite useful during the development of the firmware since it allows you to connect SigmaStudio directly to the DSP on the board. http://wiki.analog.com/resources/tools-software/linux-software/sigmatcp
- Lars