Skip to content

Fixup Cirrus SX control usage

Charles Keepax alsa-devel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ASoC: cs42l52: Fix TLV scales for mixer controlssound/soc/codecs/cs42l52.c+2 -20 replies
2/6ASoC: cs35l36: Update digital volume TLVsound/soc/codecs/cs35l36.c+2 -10 replies
3/6ASoC: cs53l30: Correct number of volume levels on SX controlssound/soc/codecs/cs53l30.c+8 -80 replies
4/6ASoC: cs42l52: Correct TLV for Bypass Volumesound/soc/codecs/cs42l52.c+3 -10 replies
5/6ASoC: cs42l56: Correct typo in minimum level for SX volume controlssound/soc/codecs/cs42l56.c+2 -20 replies
6/6ASoC: cs42l51: Correct minimum value for SX volume controlsound/soc/codecs/cs42l51.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] Fixup Cirrus SX control usage

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(-)
Signature · 1 line
2.30.2