Compare

fcbc48dc650d2f58bfe19c4486830de0e9cad62e..f7934340c56a84fc1b246ebf6b2e806d775f3b54

ASoC: max98371: Fix the Speaker DHT Min Volume bits

Register 0x31 holds two 4-bit fields. The datasheet puts SPK_GAIN_MIN
at bits 7:4 and DHT_VROT_PNT at bits 3:0. The Speaker DHT Min Volume
and Speaker DHT Rotation Volume controls both use bits 3:0.

So setting the minimum speaker gain changes the DHT rotation point, and
SPK_GAIN_MIN cannot be set.

Move Speaker DHT Min Volume to bits 7:4.

Fixes: ca2cd6bc6663 ("ASoC: Add max98371 codec driver")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Link: https://patch.msgid.link/20261008130953.2446692-5-sammiee5311@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

HyeongJun An <sammiee5311@gmail.com> · 2026-10-08 13:09 UTC · committed by Mark Brown

Browse files
5 files changed, +5 −5
modified drivers/gpio/gpio-nct6694.c
@@ -444,7 +444,7 @@ static int nct6694_gpio_probe(struct platform_device *pdev)
444 444 data->gpio.set_config = nct6694_set_config;
445 445 data->gpio.init_valid_mask = nct6694_init_valid_mask;
446 446 data->gpio.base = -1;
447 - data->gpio.can_sleep = true;
447 + data->gpio.can_sleep = false;
448 448 data->gpio.owner = THIS_MODULE;
449 449 data->gpio.ngpio = NCT6694_NR_GPIO;
450 450
modified sound/soc/codecs/cs42l52.c
@@ -290,7 +290,7 @@ static const char * const cs42l52_ng_type_text[] = {
290 290 };
291 291
292 292 static SOC_ENUM_SINGLE_DECL(ng_type_enum,
293 - CS42L52_NOISE_GATE_CTL, 6,
293 + CS42L52_NOISE_GATE_CTL, 7,
294 294 cs42l52_ng_type_text);
295 295
296 296 static const char * const left_swap_text[] = {
modified sound/soc/codecs/cs42l56.c
@@ -481,7 +481,7 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = {
481 481 0, 0x3f, 0, 0),
482 482 SOC_SINGLE_TLV("Limiter MAX", CS42L56_LIM_THRESHOLD_CTL,
483 483 5, 0x07, 1, alc_tlv),
484 - SOC_SINGLE_TLV("Limiter Cushion", CS42L56_ALC_THRESHOLD,
484 + SOC_SINGLE_TLV("Limiter Cushion", CS42L56_LIM_THRESHOLD_CTL,
485 485 2, 0x07, 1, alc_tlv),
486 486
487 487 SOC_SINGLE("NG Switch", CS42L56_NOISE_GATE_CTL, 6, 1, 1),
modified sound/soc/codecs/max98371.c
@@ -166,7 +166,7 @@ static const struct snd_kcontrol_new max98371_snd_controls[] = {
166 166 0, (1<<MAX98371_DHT_MAX_WIDTH)-1, 0,
167 167 max98371_dht_max_gain),
168 168 SOC_SINGLE_TLV("Speaker DHT Min Volume", MAX98371_DHT_GAIN,
169 - 0, (1<<MAX98371_DHT_GAIN_WIDTH)-1, 0,
169 + 4, (1<<MAX98371_DHT_GAIN_WIDTH)-1, 0,
170 170 max98371_dht_min_gain),
171 171 SOC_SINGLE_TLV("Speaker DHT Rotation Volume", MAX98371_DHT_GAIN,
172 172 0, (1<<MAX98371_DHT_ROT_WIDTH)-1, 0,
modified sound/soc/codecs/pcm3168a.c
@@ -103,7 +103,7 @@ static SOC_ENUM_SINGLE_DECL(pcm3168a_dac_zf_func, PCM3168A_DAC_ATT_DEMP_ZF,
103 103 static const char *const pcm3168a_pol[] = { "Active High", "Active Low" };
104 104
105 105 static SOC_ENUM_SINGLE_DECL(pcm3168a_dac_zf_pol, PCM3168A_DAC_ATT_DEMP_ZF,
106 - PCM3168A_DAC_ATSPDA_SHIFT, pcm3168a_pol);
106 + PCM3168A_DAC_ZREV_SHIFT, pcm3168a_pol);
107 107
108 108 static const char *const pcm3168a_con[] = { "Differential", "Single-Ended" };
109 109