mbox series

[0/6] Fixup Cirrus SX control usage

Message ID 20220602162119.3393857-1-ckeepax@opensource.cirrus.com (mailing list archive)
Headers show
Series Fixup Cirrus SX control usage | expand

Message

Charles Keepax June 2, 2022, 4:21 p.m. UTC
Mostly the usage of the SX controls seems to match the lowest gain
value + number of gain levels expected. The one notable exception
there being cs53l30 as David noted. However, there are a couple of
other places where the minimum value/TLVs are slightly incorrectly
specified.

There are two I couldn't quite work out yet, any input on these
greatly appreciated:

SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, CS42L52_SPKB_VOL,
                    0, 0x40, 0xC0, hl_tlv),

0.5dB step
0x40 - -96dB
0x00 - 0dB

This one is weird, the datasheet says 0x40 is the minimum, which
matches, but the datasheet also says 0.5dB steps to 0x00 being 0dB
which doesn't match with 0x40 being the minimum, or 0xC0 being
the number of levels. Some clarification will needed from the
hardware guys.

SOC_SINGLE_SX_TLV("Beep Volume", CS42L56_BEEP_FREQ_OFFTIME,
                  0, 0x07, 0x23, beep_tlv),

2dB step
0x07 - -50dB
0x00 - 0dB
0x06 - +6dB

The minimum checks out at 0x07, but rest of this is weird. The values
in the datasheet don't make sense, based on starting at -50dB with
a 2dB step, 0x06 should equate to 12dB, over 31 volume levels, not
6dB over 35 volume levels as stated. The control specifies 0x23(35)
levels, which takes us up to a final value of 0x0A at 20dB. Again
some clarification from the hardware guys might be needed here.

Finally it is worth noting I don't actually have hardware for most of
these devices, so mostly this is just build tested.

Thanks,
Charles

Charles Keepax (6):
  ASoC: cs42l52: Fix TLV scales for mixer controls
  ASoC: cs35l36: Update digital volume TLV
  ASoC: cs53l30: Correct number of volume levels on SX controls
  ASoC: cs42l52: Correct TLV for Bypass Volume
  ASoC: cs42l56: Correct typo in minimum level for SX volume controls
  ASoC: cs42l51: Correct minimum value for SX volume control

 sound/soc/codecs/cs35l36.c |  3 ++-
 sound/soc/codecs/cs42l51.c |  2 +-
 sound/soc/codecs/cs42l52.c |  8 +++++---
 sound/soc/codecs/cs42l56.c |  4 ++--
 sound/soc/codecs/cs53l30.c | 16 ++++++++--------
 5 files changed, 18 insertions(+), 15 deletions(-)

Comments

Mark Brown June 3, 2022, 11:28 a.m. UTC | #1
On Thu, 2 Jun 2022 17:21:13 +0100, Charles Keepax wrote:
> Mostly the usage of the SX controls seems to match the lowest gain
> value + number of gain levels expected. The one notable exception
> there being cs53l30 as David noted. However, there are a couple of
> other places where the minimum value/TLVs are slightly incorrectly
> specified.
> 
> There are two I couldn't quite work out yet, any input on these
> greatly appreciated:
> 
> [...]

Applied to

   broonie/sound.git for-linus

Thanks!

[1/6] ASoC: cs42l52: Fix TLV scales for mixer controls
      commit: 8bf5aabf524eec61013e506f764a0b2652dc5665
[2/6] ASoC: cs35l36: Update digital volume TLV
      commit: 5005a2345825eb8346546d99bfe669f73111b5c5
[3/6] ASoC: cs53l30: Correct number of volume levels on SX controls
      commit: 7fbd6dd68127927e844912a16741016d432a0737
[4/6] ASoC: cs42l52: Correct TLV for Bypass Volume
      commit: 91e90c712fade0b69cdff7cc6512f6099bd18ae5
[5/6] ASoC: cs42l56: Correct typo in minimum level for SX volume controls
      commit: a8928ada9b96944cadd8b65d191e33199fd38782
[6/6] ASoC: cs42l51: Correct minimum value for SX volume control
      commit: fcb3b5a58926d16d9a338841b74af06d4c29be15

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark