hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/alc5632.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * alc5632.c -- ALC5632 ALSA SoC Audio Codec
34 *
....@@ -9,10 +10,6 @@
910 * Marc Dietrich <marvin24@gmx.de>
1011 *
1112 * Based on alc5623.c by Arnaud Patard
12
-*
13
-* This program is free software; you can redistribute it and/or modify
14
-* it under the terms of the GNU General Public License version 2 as
15
-* published by the Free Software Foundation.
1613 */
1714
1815 #include <linux/module.h>
....@@ -697,7 +694,7 @@
697694 0);
698695
699696 /* pll is not used in slave mode */
700
- reg = snd_soc_component_read32(component, ALC5632_DAI_CONTROL);
697
+ reg = snd_soc_component_read(component, ALC5632_DAI_CONTROL);
701698 if (reg & ALC5632_DAI_SDP_SLAVE_MODE)
702699 return 0;
703700
....@@ -874,7 +871,7 @@
874871 int coeff, rate;
875872 u16 iface;
876873
877
- iface = snd_soc_component_read32(component, ALC5632_DAI_CONTROL);
874
+ iface = snd_soc_component_read(component, ALC5632_DAI_CONTROL);
878875 iface &= ~ALC5632_DAI_I2S_DL_MASK;
879876
880877 /* bit size */
....@@ -905,12 +902,12 @@
905902 return 0;
906903 }
907904
908
-static int alc5632_mute(struct snd_soc_dai *dai, int mute)
905
+static int alc5632_mute(struct snd_soc_dai *dai, int mute, int direction)
909906 {
910907 struct snd_soc_component *component = dai->component;
911908 u16 hp_mute = ALC5632_MISC_HP_DEPOP_MUTE_L
912909 |ALC5632_MISC_HP_DEPOP_MUTE_R;
913
- u16 mute_reg = snd_soc_component_read32(component, ALC5632_MISC_CTRL) & ~hp_mute;
910
+ u16 mute_reg = snd_soc_component_read(component, ALC5632_MISC_CTRL) & ~hp_mute;
914911
915912 if (mute)
916913 mute_reg |= hp_mute;
....@@ -1008,10 +1005,11 @@
10081005
10091006 static const struct snd_soc_dai_ops alc5632_dai_ops = {
10101007 .hw_params = alc5632_pcm_hw_params,
1011
- .digital_mute = alc5632_mute,
1008
+ .mute_stream = alc5632_mute,
10121009 .set_fmt = alc5632_set_dai_fmt,
10131010 .set_sysclk = alc5632_set_dai_sysclk,
10141011 .set_pll = alc5632_set_dai_pll,
1012
+ .no_capture_mute = 1,
10151013 };
10161014
10171015 static struct snd_soc_dai_driver alc5632_dai = {