forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/codecs/lm49453.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * lm49453.c - LM49453 ALSA Soc Audio driver
34 *
45 * Copyright (c) 2012 Texas Instruments, Inc
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; version 2 of the License.
96 *
107 * Initially based on sound/soc/codecs/wm8350.c
118 */
....@@ -1221,35 +1218,35 @@
12211218 return 0;
12221219 }
12231220
1224
-static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute)
1221
+static int lm49453_hp_mute(struct snd_soc_dai *dai, int mute, int direction)
12251222 {
12261223 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(1)|BIT(0),
12271224 (mute ? (BIT(1)|BIT(0)) : 0));
12281225 return 0;
12291226 }
12301227
1231
-static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute)
1228
+static int lm49453_lo_mute(struct snd_soc_dai *dai, int mute, int direction)
12321229 {
12331230 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(3)|BIT(2),
12341231 (mute ? (BIT(3)|BIT(2)) : 0));
12351232 return 0;
12361233 }
12371234
1238
-static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute)
1235
+static int lm49453_ls_mute(struct snd_soc_dai *dai, int mute, int direction)
12391236 {
12401237 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(5)|BIT(4),
12411238 (mute ? (BIT(5)|BIT(4)) : 0));
12421239 return 0;
12431240 }
12441241
1245
-static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute)
1242
+static int lm49453_ep_mute(struct snd_soc_dai *dai, int mute, int direction)
12461243 {
12471244 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(4),
12481245 (mute ? BIT(4) : 0));
12491246 return 0;
12501247 }
12511248
1252
-static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute)
1249
+static int lm49453_ha_mute(struct snd_soc_dai *dai, int mute, int direction)
12531250 {
12541251 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(7)|BIT(6),
12551252 (mute ? (BIT(7)|BIT(6)) : 0));
....@@ -1291,35 +1288,40 @@
12911288 .hw_params = lm49453_hw_params,
12921289 .set_sysclk = lm49453_set_dai_sysclk,
12931290 .set_fmt = lm49453_set_dai_fmt,
1294
- .digital_mute = lm49453_hp_mute,
1291
+ .mute_stream = lm49453_hp_mute,
1292
+ .no_capture_mute = 1,
12951293 };
12961294
12971295 static const struct snd_soc_dai_ops lm49453_speaker_dai_ops = {
12981296 .hw_params = lm49453_hw_params,
12991297 .set_sysclk = lm49453_set_dai_sysclk,
13001298 .set_fmt = lm49453_set_dai_fmt,
1301
- .digital_mute = lm49453_ls_mute,
1299
+ .mute_stream = lm49453_ls_mute,
1300
+ .no_capture_mute = 1,
13021301 };
13031302
13041303 static const struct snd_soc_dai_ops lm49453_haptic_dai_ops = {
13051304 .hw_params = lm49453_hw_params,
13061305 .set_sysclk = lm49453_set_dai_sysclk,
13071306 .set_fmt = lm49453_set_dai_fmt,
1308
- .digital_mute = lm49453_ha_mute,
1307
+ .mute_stream = lm49453_ha_mute,
1308
+ .no_capture_mute = 1,
13091309 };
13101310
13111311 static const struct snd_soc_dai_ops lm49453_ep_dai_ops = {
13121312 .hw_params = lm49453_hw_params,
13131313 .set_sysclk = lm49453_set_dai_sysclk,
13141314 .set_fmt = lm49453_set_dai_fmt,
1315
- .digital_mute = lm49453_ep_mute,
1315
+ .mute_stream = lm49453_ep_mute,
1316
+ .no_capture_mute = 1,
13161317 };
13171318
13181319 static const struct snd_soc_dai_ops lm49453_lineout_dai_ops = {
13191320 .hw_params = lm49453_hw_params,
13201321 .set_sysclk = lm49453_set_dai_sysclk,
13211322 .set_fmt = lm49453_set_dai_fmt,
1322
- .digital_mute = lm49453_lo_mute,
1323
+ .mute_stream = lm49453_lo_mute,
1324
+ .no_capture_mute = 1,
13231325 };
13241326
13251327 /* LM49453 dai structure. */