Re: Semantics for _SX controls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/1/22 10:24, Mark Brown wrote:
For the Cirrus case 34198710f55b5f ("ASoC: Add info callback for
SX_TLV controls") says that the intended semantic is

     Currently every CODEC implementing these controls specifies the minimum
     as the non-zero value for the minimum and the maximum as the number of
     gain settings available.

which was from Charles at Cirrus so hopefully that's the semantic
used by Cirrus drivers.

The Cirrus parts have volume fields with a signed value. Typically this is a large negative attenuation and a smaller amount of gain (-102dB / +12dB for example). The goal for the control is to map this to a continuous range and in a way that understands the signed bit field.

From my review, all of the Cirrus drivers are providing the minimum and number of gain settings to SOC_SINGLE_SX_TLV as Charles described, with the exception of cs53l30. The cs53l30 driver uses the minimum (negative) and maximum (positive) values of the bit field.

At the very least, cs53l30 should be patched. For the other drivers, using a macro that is more explicit about the signed bit field and removes the max/#-steps confusion would be an improvement. Something similar to SOC_DOUBLE_R_S_TLV could work.

Thanks,
David



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux