[Letux-kernel] Audio Offset for handsfree speakers

H. Nikolaus Schaller hns at goldelico.com
Thu Dec 2 16:23:49 CET 2021


maybe some hint from SWCS050E 

> The registers can be accessed either exclusively by the I2C or by both I2C and PDM interfaces. The I2CSEL and PDMI2CSEL bits from the access control register (address 0x2D) in Table 6-46 select the interface (I2C or PDM) for the registers having dual access. By default, I2CSEL and PDMI2CSEL are 0 and all dual access registers are controlled by the PDM interface.

This could mean that the registers can not be accessed through I2C without switching the ACCCTL register first (depends on what the driver does as setup). 

And ED is right: there are HSOTRIM (0x2b) and HFOTRIM (0x2c). The first is for headset and the second one for hands-free.

IMHO the best strategy would be to add some new amixer control similar to existing controls for HFLGAIN / HFRGAIN registers for gain settting.

The individual amixer settings should be saved and restored on reboot.

> Am 02.12.2021 um 01:05 schrieb aTc <atc at k-n-p.org>:
> 
> Seems to be bus 0 address 0x4b.
> 
> cat /sys/kernel/debug/regmap/0-004b/registers
> 
> unfortunately setting it, and then reading it back makes no change
> 
> i2cget -f -y 0 0x4b 0x2c
> 0x14
> 
> i2cset -f -y 0 0x4b 0x2c 0x77
> 
> i2cget -f -y 0 0x4b 0x2c
> 0x14
> 
> No changes in sound either.
> 
> Might be because the device is in use, although I guess the driver resets those values anyway when it's loaded. We'll probably have to dig through the driver to see where it sets the regmap.
> 
> (also, 0x14 seems to be a bit off, if the default is supposed to be 0, and you'd expect both L and R to be the same.)
> 
>> i2cdetect to find the device and then i2cdump or i2cget to read.
>> _______________________________________________
>> Kernel mailing list -- kernel at pyra-handheld.com
>> To unsubscribe send an email to kernel-leave at pyra-handheld.com
> 



More information about the Letux-kernel mailing list