hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/cs42l56.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * cs42l56.c -- CS42L56 ALSA SoC audio driver
34 *
45 * Copyright 2014 CirrusLogic, Inc.
56 *
67 * Author: Brian Austin <brian.austin@cirrus.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
11
- *
128 */
139
1410 #include <linux/module.h>
....@@ -203,14 +199,6 @@
203199 SOC_ENUM_SINGLE(CS42L56_BEEP_TONE_CFG, 1,
204200 ARRAY_SIZE(beep_bass_text), beep_bass_text);
205201
206
-static const char * const adc_swap_text[] = {
207
- "None", "A+B/2", "A-B/2", "Swap"
208
-};
209
-
210
-static const struct soc_enum adc_swap_enum =
211
- SOC_ENUM_SINGLE(CS42L56_MISC_ADC_CTL, 3,
212
- ARRAY_SIZE(adc_swap_text), adc_swap_text);
213
-
214202 static const char * const pgaa_mux_text[] = {
215203 "AIN1A", "AIN2A", "AIN3A"};
216204
....@@ -403,9 +391,9 @@
403391 SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1),
404392
405393 SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME,
406
- CS42L56_HPB_VOLUME, 0, 0x84, 0x48, hl_tlv),
394
+ CS42L56_HPB_VOLUME, 0, 0x44, 0x48, hl_tlv),
407395 SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME,
408
- CS42L56_LOB_VOLUME, 0, 0x84, 0x48, hl_tlv),
396
+ CS42L56_LOB_VOLUME, 0, 0x44, 0x48, hl_tlv),
409397
410398 SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL,
411399 0, 0x00, 1, tone_tlv),
....@@ -812,7 +800,7 @@
812800 return 0;
813801 }
814802
815
-static int cs42l56_digital_mute(struct snd_soc_dai *dai, int mute)
803
+static int cs42l56_mute(struct snd_soc_dai *dai, int mute, int direction)
816804 {
817805 struct snd_soc_component *component = dai->component;
818806
....@@ -941,9 +929,10 @@
941929
942930 static const struct snd_soc_dai_ops cs42l56_ops = {
943931 .hw_params = cs42l56_pcm_hw_params,
944
- .digital_mute = cs42l56_digital_mute,
932
+ .mute_stream = cs42l56_mute,
945933 .set_fmt = cs42l56_set_dai_fmt,
946934 .set_sysclk = cs42l56_set_sysclk,
935
+ .no_capture_mute = 1,
947936 };
948937
949938 static struct snd_soc_dai_driver cs42l56_dai = {