Hi,
here are two patches for the ST STA32x ASoC codec driver. The first one adds SNDRV_CTL_ELEM_TYPE_BYTES controls for access to the biquad filter coefficients. I haven't found any other driver using SNDRV_CTL_ELEM_TYPE_BYTES in this way, but it works nicely. The coefficients can be set with amixer (although amixer has a quirk in that it prints the values in hex but can read them only as decimal).
# amixer cget name='Ch1 - Biquad 1' numid=43,iface=MIXER,name='Ch1 - Biquad 1' ; type=BYTES,access=rw------,values=15 : values=0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
# amixer cset name='Ch1 - Biquad 1' 12,34,0,0,0,0,0,0,0,0,0,0,0,255,78 numid=43,iface=MIXER,name='Ch1 - Biquad 1' ; type=BYTES,access=rw------,values=15 : values=0x0c,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x4e
Due to the way the internal coeffcient RAM is accessed, the corresponding I2C registers are volatile, thus I added the .volatile_register function in this patch.
The second patch preserves reset values as required by the chip documentation, it is mainly for future compatibility and was added during hardware testing to rule out issues from this side, although it did not make a difference in my tests. However, the chip spec insists it is important.
Thanks Johannes