hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/soc/codecs/wm8776.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * wm8776.c -- WM8776 ALSA SoC Audio driver
34 *
45 * Copyright 2009-12 Wolfson Microelectronics plc
56 *
67 * Author: Mark Brown <broonie@opensource.wolfsonmicro.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.
118 *
129 * TODO: Input ALC/limiter support
1310 */
....@@ -285,7 +282,7 @@
285282 }
286283
287284 /* Only need to set MCLK/LRCLK ratio if we're master */
288
- if (snd_soc_component_read32(component, WM8776_MSTRCTRL) & master) {
285
+ if (snd_soc_component_read(component, WM8776_MSTRCTRL) & master) {
289286 for (i = 0; i < ARRAY_SIZE(mclk_ratios); i++) {
290287 if (wm8776->sysclk[dai->driver->id] / params_rate(params)
291288 == mclk_ratios[i])
....@@ -312,7 +309,7 @@
312309 return 0;
313310 }
314311
315
-static int wm8776_mute(struct snd_soc_dai *dai, int mute)
312
+static int wm8776_mute(struct snd_soc_dai *dai, int mute, int direction)
316313 {
317314 struct snd_soc_component *component = dai->component;
318315
....@@ -364,10 +361,11 @@
364361 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
365362
366363 static const struct snd_soc_dai_ops wm8776_dac_ops = {
367
- .digital_mute = wm8776_mute,
364
+ .mute_stream = wm8776_mute,
368365 .hw_params = wm8776_hw_params,
369366 .set_fmt = wm8776_set_fmt,
370367 .set_sysclk = wm8776_set_sysclk,
368
+ .no_capture_mute = 1,
371369 };
372370
373371 static const struct snd_soc_dai_ops wm8776_adc_ops = {