Skip to content

Commit d5a4d7f

Browse files
fidomaxbroonie
authored andcommitted
ASoC: codecs: nau8824: fix max volume for Speaker output
There is no audio output if Speaker volume is set above 25. According to datasheet Rev 2.5 maximum allowed value for the Speaker output is 0b11001 (25) 0x6D CLASSD_GAIN_1/ 0x6E CLASSD_GAIN_2: Left/Right Channel Class-D Driver Gain For DAC Left/Right Input (Step size is 1dB.) 00000 = Mute (DEFAULT) 00001 = 0dB 00002 = 1dB ... 11000 = 23dB 11001 = 24dB So adjust this value in accordance with the datasheet. Signed-off-by: Maxim Kochetkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 139fa59 commit d5a4d7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/soc/codecs/nau8824.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,13 @@ static const struct snd_kcontrol_new nau8824_snd_controls[] = {
368368
SOC_ENUM("DAC Oversampling Rate", nau8824_dac_oversampl_enum),
369369

370370
SOC_SINGLE_TLV("Speaker Right DACR Volume",
371-
NAU8824_REG_CLASSD_GAIN_1, 8, 0x1f, 0, spk_vol_tlv),
371+
NAU8824_REG_CLASSD_GAIN_1, 8, 0x19, 0, spk_vol_tlv),
372372
SOC_SINGLE_TLV("Speaker Left DACL Volume",
373-
NAU8824_REG_CLASSD_GAIN_2, 0, 0x1f, 0, spk_vol_tlv),
373+
NAU8824_REG_CLASSD_GAIN_2, 0, 0x19, 0, spk_vol_tlv),
374374
SOC_SINGLE_TLV("Speaker Left DACR Volume",
375-
NAU8824_REG_CLASSD_GAIN_1, 0, 0x1f, 0, spk_vol_tlv),
375+
NAU8824_REG_CLASSD_GAIN_1, 0, 0x19, 0, spk_vol_tlv),
376376
SOC_SINGLE_TLV("Speaker Right DACL Volume",
377-
NAU8824_REG_CLASSD_GAIN_2, 8, 0x1f, 0, spk_vol_tlv),
377+
NAU8824_REG_CLASSD_GAIN_2, 8, 0x19, 0, spk_vol_tlv),
378378

379379
SOC_SINGLE_TLV("Headphone Right DACR Volume",
380380
NAU8824_REG_ATT_PORT0, 8, 0x1f, 0, hp_vol_tlv),

0 commit comments

Comments
 (0)