hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/sound/soc/codecs/twl6040.c
....@@ -1,22 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * ALSA SoC TWL6040 codec driver
34 *
45 * Author: Misael Lopez Cruz <x0052729@ti.com>
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * version 2 as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18
- * 02110-1301 USA
19
- *
206 */
217
228 #include <linux/module.h>
....@@ -1011,7 +997,7 @@
1011997 }
1012998 }
1013999
1014
-static int twl6040_digital_mute(struct snd_soc_dai *dai, int mute)
1000
+static int twl6040_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
10151001 {
10161002 switch (dai->id) {
10171003 case TWL6040_DAI_LEGACY:
....@@ -1034,7 +1020,8 @@
10341020 .hw_params = twl6040_hw_params,
10351021 .prepare = twl6040_prepare,
10361022 .set_sysclk = twl6040_set_dai_sysclk,
1037
- .digital_mute = twl6040_digital_mute,
1023
+ .mute_stream = twl6040_mute_stream,
1024
+ .no_capture_mute = 1,
10381025 };
10391026
10401027 static struct snd_soc_dai_driver twl6040_dai[] = {
....@@ -1122,10 +1109,8 @@
11221109 priv->component = component;
11231110
11241111 priv->plug_irq = platform_get_irq(pdev, 0);
1125
- if (priv->plug_irq < 0) {
1126
- dev_err(component->dev, "invalid irq: %d\n", priv->plug_irq);
1112
+ if (priv->plug_irq < 0)
11271113 return priv->plug_irq;
1128
- }
11291114
11301115 INIT_DELAYED_WORK(&priv->hs_jack.work, twl6040_accessory_work);
11311116