Compare
dbd674ccf30f66f5eccf637964a93910df8dbf84..b26edc925c1cfa0184cd270ed81d4833db045ce0
ASoC: pcm3168a: Fix the DAC zero flag polarity bit
The DAC Zero Flag Polarity enum uses PCM3168A_DAC_ATSPDA_SHIFT, which
is bit 6 of register 70. That bit is ATSPDA, the attenuation speed,
which the DAC Volume Rate Multiplier enum already owns. The datasheet
puts ZREV, the zero flag polarity, at bit 0. The header defines
PCM3168A_DAC_ZREV_SHIFT for it, but nothing uses it.
So changing the zero flag polarity changes the attenuation speed, and
ZREV cannot be set.
Use PCM3168A_DAC_ZREV_SHIFT.
Fixes: a9b17a638af5 ("ASoC: pcm3168a: Add driver for pcm3168a codec")
Link: https://www.ti.com/lit/ds/symlink/pcm3168a.pdf
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20261008130953.2446692-4-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
4 files changed,
+18
−4
- drivers/power/sequencing/pwrseq-qcom-wcn.c
- sound/soc/codecs/cs42l52.c
- sound/soc/codecs/cs42l56.c
- sound/soc/codecs/pcm3168a.c
modified drivers/power/sequencing/pwrseq-qcom-wcn.c
| @@ -496,8 +496,15 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev) | |||
| 496 | 496 | return dev_err_probe(dev, PTR_ERR(ctx->bt_gpio), | |
| 497 | 497 | "Failed to get the Bluetooth enable GPIO\n"); | |
| 498 | 498 | ||
| 499 | + | /* | |
| 500 | + | * FIXME: This should actually be GPIOD_OUT_LOW, but doing so would | |
| 501 | + | * cause the WLAN power to be toggled, resulting in PCIe link down. | |
| 502 | + | * Since the PCIe controller driver is not handling link down currently, | |
| 503 | + | * the device becomes unusable. So we need to keep this workaround until | |
| 504 | + | * the link down handling is implemented in the controller driver. | |
| 505 | + | */ | |
| 499 | 506 | ctx->wlan_gpio = devm_gpiod_get_optional(dev, "wlan-enable", | |
| 500 | - | GPIOD_OUT_LOW); | |
| 507 | + | GPIOD_ASIS); | |
| 501 | 508 | if (IS_ERR(ctx->wlan_gpio)) | |
| 502 | 509 | return dev_err_probe(dev, PTR_ERR(ctx->wlan_gpio), | |
| 503 | 510 | "Failed to get the WLAN enable GPIO\n"); | |
| @@ -508,6 +515,13 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev) | |||
| 508 | 515 | return dev_err_probe(dev, PTR_ERR(ctx->xo_clk_gpio), | |
| 509 | 516 | "Failed to get the XO_CLK GPIO\n"); | |
| 510 | 517 | ||
| 518 | + | /* | |
| 519 | + | * Set direction to output but keep the current value in order to not | |
| 520 | + | * disable the WLAN module accidentally if it's already powered on. | |
| 521 | + | */ | |
| 522 | + | gpiod_direction_output(ctx->wlan_gpio, | |
| 523 | + | gpiod_get_value_cansleep(ctx->wlan_gpio)); | |
| 524 | + | ||
| 511 | 525 | ctx->clk = devm_clk_get_optional(dev, NULL); | |
| 512 | 526 | if (IS_ERR(ctx->clk)) | |
| 513 | 527 | return dev_err_probe(dev, PTR_ERR(ctx->clk), | |
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/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 | ||