ALSA: hda: cs35l41: Set the max PCM Gain using tuning setting
authorStefan Binding <sbinding@opensource.cirrus.com>
Thu, 11 Apr 2024 11:08:07 +0000 (12:08 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 18 Apr 2024 06:43:18 +0000 (08:43 +0200)
commitef752c60e41e4e2d7030238e8978e057878a97b1
tree7894f1e35c81c69ae5bc2330f7d55426565ebae8
parent05cf17f1bf6d3ffda9a5cba5a2f6175dd155014a
ALSA: hda: cs35l41: Set the max PCM Gain using tuning setting

Some systems requires different max PCM Gains settings than the default.
The current default value, when running firmware is 17.5 dB, which is
used for all systems. Some systems require lower values.
Value when running without firmware is 4.5 dB and remains unchanged.

Since the gain value is dependent on Tuning and Firmware, it can
change, so it cannot be saved in _DSD. Instead we can store it inside
a configuration binary file alongside the Firmware and Tuning files.

The gain value increments in steps of 1 dB, with value 0 representing
0.5 dB. The max value is 20, which corresponds to 20.5 dB.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240411110813.330483-2-sbinding@opensource.cirrus.com>
include/sound/cs35l41.h
sound/pci/hda/cs35l41_hda.c
sound/pci/hda/cs35l41_hda.h