hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/ak4535.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * ak4535.c -- AK4535 ALSA Soc Audio driver
34 *
....@@ -6,10 +7,6 @@
67 * Author: Richard Purdie <richard@openedhand.com>
78 *
89 * Based on wm8753.c by Liam Girdwood
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License version 2 as
12
- * published by the Free Software Foundation.
1310 */
1411
1512 #include <linux/module.h>
....@@ -264,7 +261,7 @@
264261 {
265262 struct snd_soc_component *component = dai->component;
266263 struct ak4535_priv *ak4535 = snd_soc_component_get_drvdata(component);
267
- u8 mode2 = snd_soc_component_read32(component, AK4535_MODE2) & ~(0x3 << 5);
264
+ u8 mode2 = snd_soc_component_read(component, AK4535_MODE2) & ~(0x3 << 5);
268265 int rate = params_rate(params), fs = 256;
269266
270267 if (rate)
....@@ -312,10 +309,11 @@
312309 return 0;
313310 }
314311
315
-static int ak4535_mute(struct snd_soc_dai *dai, int mute)
312
+static int ak4535_mute(struct snd_soc_dai *dai, int mute, int direction)
316313 {
317314 struct snd_soc_component *component = dai->component;
318
- u16 mute_reg = snd_soc_component_read32(component, AK4535_DAC);
315
+ u16 mute_reg = snd_soc_component_read(component, AK4535_DAC);
316
+
319317 if (!mute)
320318 snd_soc_component_write(component, AK4535_DAC, mute_reg & ~0x20);
321319 else
....@@ -351,8 +349,9 @@
351349 static const struct snd_soc_dai_ops ak4535_dai_ops = {
352350 .hw_params = ak4535_hw_params,
353351 .set_fmt = ak4535_set_dai_fmt,
354
- .digital_mute = ak4535_mute,
352
+ .mute_stream = ak4535_mute,
355353 .set_sysclk = ak4535_set_dai_sysclk,
354
+ .no_capture_mute = 1,
356355 };
357356
358357 static struct snd_soc_dai_driver ak4535_dai = {