lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 2 Jun 2022 17:21:13 +0100
From:   Charles Keepax <ckeepax@...nsource.cirrus.com>
To:     <broonie@...nel.org>
CC:     <james.schulman@...rus.com>, <david.rhodes@...rus.com>,
        <lgirdwood@...il.com>, <alsa-devel@...a-project.org>,
        <patches@...nsource.cirrus.com>, <linux-kernel@...r.kernel.org>
Subject: [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(-)

-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ