HiassofT wrote: ↑
Mon Dec 10, 2018 12:56 pm
If this is in addition to an (I2S) audio card then just create a codec driver that exposes a volume control mixer and add that as an auxiliary device in the card driver (aux_dev list in snd_soc_card or aux-devs DT property in the simple audio card driver).
See for example the various amplifier drivers in sound/soc/codecs (grep Kconfig for amplifier), most of them use I2C but for SPI it'll work exactly the same way (just use spi_driver instead of i2c_driver, actual bus access is handled via regmap).
Yes this in in addition to I2S sound card.
I am not a linux person so isv there a step by step guide on how to do this.
I have some code written for a PIC16F from micro chip but how do I port that or reuse it for the Pi?