hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/sound/soc/codecs/alc5623.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * alc5623.c -- alc562[123] ALSA Soc Audio driver
34 *
....@@ -6,13 +7,7 @@
67 *
78 * Copyright 2010 Arnaud Patard <arnaud.patard@rtp-net.org>
89 *
9
- *
1010 * Based on WM8753.c
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License version 2 as
14
- * published by the Free Software Foundation.
15
- *
1611 */
1712
1813 #include <linux/module.h>
....@@ -539,7 +534,7 @@
539534 0);
540535
541536 /* pll is not used in slave mode */
542
- reg = snd_soc_component_read32(component, ALC5623_DAI_CONTROL);
537
+ reg = snd_soc_component_read(component, ALC5623_DAI_CONTROL);
543538 if (reg & ALC5623_DAI_SDP_SLAVE_MODE)
544539 return 0;
545540
....@@ -706,7 +701,7 @@
706701 int coeff, rate;
707702 u16 iface;
708703
709
- iface = snd_soc_component_read32(component, ALC5623_DAI_CONTROL);
704
+ iface = snd_soc_component_read(component, ALC5623_DAI_CONTROL);
710705 iface &= ~ALC5623_DAI_I2S_DL_MASK;
711706
712707 /* bit size */
....@@ -742,11 +737,11 @@
742737 return 0;
743738 }
744739
745
-static int alc5623_mute(struct snd_soc_dai *dai, int mute)
740
+static int alc5623_mute(struct snd_soc_dai *dai, int mute, int direction)
746741 {
747742 struct snd_soc_component *component = dai->component;
748743 u16 hp_mute = ALC5623_MISC_M_DAC_L_INPUT | ALC5623_MISC_M_DAC_R_INPUT;
749
- u16 mute_reg = snd_soc_component_read32(component, ALC5623_MISC_CTRL) & ~hp_mute;
744
+ u16 mute_reg = snd_soc_component_read(component, ALC5623_MISC_CTRL) & ~hp_mute;
750745
751746 if (mute)
752747 mute_reg |= hp_mute;
....@@ -834,10 +829,11 @@
834829
835830 static const struct snd_soc_dai_ops alc5623_dai_ops = {
836831 .hw_params = alc5623_pcm_hw_params,
837
- .digital_mute = alc5623_mute,
832
+ .mute_stream = alc5623_mute,
838833 .set_fmt = alc5623_set_dai_fmt,
839834 .set_sysclk = alc5623_set_dai_sysclk,
840835 .set_pll = alc5623_set_dai_pll,
836
+ .no_capture_mute = 1,
841837 };
842838
843839 static struct snd_soc_dai_driver alc5623_dai = {