hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/sound/soc/codecs/cs42l52.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * cs42l52.c -- CS42L52 ALSA SoC audio driver
34 *
....@@ -5,11 +6,6 @@
56 *
67 * Author: Georgi Vlaev <joe@nucleusys.com>
78 * 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
- *
139 */
1410
1511 #include <linux/module.h>
....@@ -141,7 +137,9 @@
141137
142138 static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0);
143139
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);
145143
146144 static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0);
147145
....@@ -355,7 +353,7 @@
355353 CS42L52_SPKB_VOL, 0, 0x40, 0xC0, hl_tlv),
356354
357355 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),
359357
360358 SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0),
361359
....@@ -368,7 +366,7 @@
368366 CS42L52_ADCB_VOL, 0, 0xA0, 0x78, ipd_tlv),
369367 SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume",
370368 CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL,
371
- 0, 0x19, 0x7F, ipd_tlv),
369
+ 0, 0x19, 0x7F, mix_tlv),
372370
373371 SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0),
374372
....@@ -788,7 +786,7 @@
788786 return 0;
789787 }
790788
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)
792790 {
793791 struct snd_soc_component *component = dai->component;
794792
....@@ -869,9 +867,10 @@
869867
870868 static const struct snd_soc_dai_ops cs42l52_ops = {
871869 .hw_params = cs42l52_pcm_hw_params,
872
- .digital_mute = cs42l52_digital_mute,
870
+ .mute_stream = cs42l52_mute,
873871 .set_fmt = cs42l52_set_fmt,
874872 .set_sysclk = cs42l52_set_sysclk,
873
+ .no_capture_mute = 1,
875874 };
876875
877876 static struct snd_soc_dai_driver cs42l52_dai = {