.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * cs42l52.c -- CS42L52 ALSA SoC audio driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Georgi Vlaev <joe@nucleusys.com> |
---|
7 | 8 | * Author: Brian Austin <brian.austin@cirrus.com> |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License version 2 as |
---|
11 | | - * published by the Free Software Foundation. |
---|
12 | | - * |
---|
13 | 9 | */ |
---|
14 | 10 | |
---|
15 | 11 | #include <linux/module.h> |
---|
.. | .. |
---|
141 | 137 | |
---|
142 | 138 | static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); |
---|
143 | 139 | |
---|
144 | | -static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0); |
---|
| 140 | +static DECLARE_TLV_DB_SCALE(pass_tlv, -6000, 50, 0); |
---|
| 141 | + |
---|
| 142 | +static DECLARE_TLV_DB_SCALE(mix_tlv, -5150, 50, 0); |
---|
145 | 143 | |
---|
146 | 144 | static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0); |
---|
147 | 145 | |
---|
.. | .. |
---|
355 | 353 | CS42L52_SPKB_VOL, 0, 0x40, 0xC0, hl_tlv), |
---|
356 | 354 | |
---|
357 | 355 | SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, |
---|
358 | | - CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pga_tlv), |
---|
| 356 | + CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pass_tlv), |
---|
359 | 357 | |
---|
360 | 358 | SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0), |
---|
361 | 359 | |
---|
.. | .. |
---|
368 | 366 | CS42L52_ADCB_VOL, 0, 0xA0, 0x78, ipd_tlv), |
---|
369 | 367 | SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", |
---|
370 | 368 | CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL, |
---|
371 | | - 0, 0x19, 0x7F, ipd_tlv), |
---|
| 369 | + 0, 0x19, 0x7F, mix_tlv), |
---|
372 | 370 | |
---|
373 | 371 | SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0), |
---|
374 | 372 | |
---|
.. | .. |
---|
788 | 786 | return 0; |
---|
789 | 787 | } |
---|
790 | 788 | |
---|
791 | | -static int cs42l52_digital_mute(struct snd_soc_dai *dai, int mute) |
---|
| 789 | +static int cs42l52_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
792 | 790 | { |
---|
793 | 791 | struct snd_soc_component *component = dai->component; |
---|
794 | 792 | |
---|
.. | .. |
---|
869 | 867 | |
---|
870 | 868 | static const struct snd_soc_dai_ops cs42l52_ops = { |
---|
871 | 869 | .hw_params = cs42l52_pcm_hw_params, |
---|
872 | | - .digital_mute = cs42l52_digital_mute, |
---|
| 870 | + .mute_stream = cs42l52_mute, |
---|
873 | 871 | .set_fmt = cs42l52_set_fmt, |
---|
874 | 872 | .set_sysclk = cs42l52_set_sysclk, |
---|
| 873 | + .no_capture_mute = 1, |
---|
875 | 874 | }; |
---|
876 | 875 | |
---|
877 | 876 | static struct snd_soc_dai_driver cs42l52_dai = { |
---|