On Tue, Jan 27, 2009 at 11:15:48AM +0100, Matteo Canella wrote:
I'm trying to implement an alsa interface for the audio section of my board. I have an mpc5200 that control via i2s a pcm1774 stereo DAC and I also have an amplifier between the DAC and the speakers. At the moment I have the pcm1774 driver properly working, but I have a few ideas on how to integrate the control of the external amplifier in the alsa structure. I need to set the amplifier level with a PWM input to it.
Now I'm trying to use "non dapm" controls, adding the PWM settings into this structure...
What do you guys think about this? Am I completely wrong or could this be a good way?
Using a non-DAPM control to set gain sounds sensible. Depending on how exactly this works you may want to also have a DAPM control so you can power the amplifier off when the path isn't in use (though your application may not be sufficiently sensitive to power consumption to make it worth bothering or the hardware may not let you do anything useful).