hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/wm8985.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * wm8985.c -- WM8985 / WM8758 ALSA SoC Audio driver
34 *
....@@ -7,10 +8,6 @@
78 * WM8758 support:
89 * Copyright: 2016 Barix AG
910 * Author: Petr Kulhavy <petr@barix.com>
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License version 2 as
13
- * published by the Free Software Foundation.
1411 *
1512 * TODO:
1613 * o Add OUT3/OUT4 mixer controls.
....@@ -595,7 +592,7 @@
595592 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
596593 unsigned int reg;
597594
598
- reg = snd_soc_component_read32(component, WM8985_EQ1_LOW_SHELF);
595
+ reg = snd_soc_component_read(component, WM8985_EQ1_LOW_SHELF);
599596 if (reg & WM8985_EQ3DMODE)
600597 ucontrol->value.enumerated.item[0] = 1;
601598 else
....@@ -615,7 +612,7 @@
615612 && ucontrol->value.enumerated.item[0] != 1)
616613 return -EINVAL;
617614
618
- reg_eq = snd_soc_component_read32(component, WM8985_EQ1_LOW_SHELF);
615
+ reg_eq = snd_soc_component_read(component, WM8985_EQ1_LOW_SHELF);
619616 switch ((reg_eq & WM8985_EQ3DMODE) >> WM8985_EQ3DMODE_SHIFT) {
620617 case 0:
621618 if (!ucontrol->value.enumerated.item[0])
....@@ -627,8 +624,8 @@
627624 break;
628625 }
629626
630
- regpwr2 = snd_soc_component_read32(component, WM8985_POWER_MANAGEMENT_2);
631
- regpwr3 = snd_soc_component_read32(component, WM8985_POWER_MANAGEMENT_3);
627
+ regpwr2 = snd_soc_component_read(component, WM8985_POWER_MANAGEMENT_2);
628
+ regpwr3 = snd_soc_component_read(component, WM8985_POWER_MANAGEMENT_3);
632629 /* disable the DACs and ADCs */
633630 snd_soc_component_update_bits(component, WM8985_POWER_MANAGEMENT_2,
634631 WM8985_ADCENR_MASK | WM8985_ADCENL_MASK, 0);
....@@ -652,7 +649,7 @@
652649 return snd_soc_component_write(component, WM8985_SOFTWARE_RESET, 0x0);
653650 }
654651
655
-static int wm8985_dac_mute(struct snd_soc_dai *dai, int mute)
652
+static int wm8985_dac_mute(struct snd_soc_dai *dai, int mute, int direction)
656653 {
657654 struct snd_soc_component *component = dai->component;
658655
....@@ -1075,11 +1072,12 @@
10751072 }
10761073
10771074 static const struct snd_soc_dai_ops wm8985_dai_ops = {
1078
- .digital_mute = wm8985_dac_mute,
1075
+ .mute_stream = wm8985_dac_mute,
10791076 .hw_params = wm8985_hw_params,
10801077 .set_fmt = wm8985_set_fmt,
10811078 .set_sysclk = wm8985_set_sysclk,
1082
- .set_pll = wm8985_set_pll
1079
+ .set_pll = wm8985_set_pll,
1080
+ .no_capture_mute = 1,
10831081 };
10841082
10851083 #define WM8985_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \