Writing codec class drivers
In order to be coupled together, machine, platform, and codec entities need dedicated drivers. The codec class driver is the most basic. It implements code that should leverage the codec device and expose its hardware properties so that user space tools such as amixer
can play with it. The codec class driver is and should be platform-independent. The same codec driver can be used whatever the platform. Since it targets a specific codec, it should contain audio controls, audio interface capabilities, a codec DAPM definition, and I/O functions. Each codec driver must fulfill the following specifications:
- Provide an interface to other modules by defining DAI and PCM configurations.
- Provide codec control IO hooks (using I2C or SPI or both APIs).
- Expose additional kcontrols (kernel controls) as needed for userspace utilities to dynamically control module behavior.
- Optionally, define DAPM widgets and establish DAPM routes for dynamic power...