hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/da9055.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * DA9055 ALSA Soc codec driver
34 *
....@@ -6,11 +7,6 @@
67 * Tested on (Samsung SMDK6410 board + DA9055 EVB) using I2S and I2C
78 * Written by David Chen <david.chen@diasemi.com> and
89 * Ashish Chavan <ashish.chavan@kpitcummins.com>
9
- *
10
- * This program is free software; you can redistribute it and/or modify it
11
- * under the terms of the GNU General Public License as published by the
12
- * Free Software Foundation; either version 2 of the License, or (at your
13
- * option) any later version.
1410 */
1511
1612 #include <linux/delay.h>
....@@ -465,12 +461,12 @@
465461 /* Select middle 8 bits for read back from data register */
466462 snd_soc_component_write(component, DA9055_ALC_CIC_OP_LVL_CTRL,
467463 reg_val | DA9055_ALC_DATA_MIDDLE);
468
- mid_data = snd_soc_component_read32(component, DA9055_ALC_CIC_OP_LVL_DATA);
464
+ mid_data = snd_soc_component_read(component, DA9055_ALC_CIC_OP_LVL_DATA);
469465
470466 /* Select top 8 bits for read back from data register */
471467 snd_soc_component_write(component, DA9055_ALC_CIC_OP_LVL_CTRL,
472468 reg_val | DA9055_ALC_DATA_TOP);
473
- top_data = snd_soc_component_read32(component, DA9055_ALC_CIC_OP_LVL_DATA);
469
+ top_data = snd_soc_component_read(component, DA9055_ALC_CIC_OP_LVL_DATA);
474470
475471 sum += ((mid_data << 8) | (top_data << 16));
476472 }
....@@ -492,8 +488,8 @@
492488 */
493489
494490 /* Save current values from Mic control registers */
495
- mic_left = snd_soc_component_read32(component, DA9055_MIC_L_CTRL);
496
- mic_right = snd_soc_component_read32(component, DA9055_MIC_R_CTRL);
491
+ mic_left = snd_soc_component_read(component, DA9055_MIC_L_CTRL);
492
+ mic_right = snd_soc_component_read(component, DA9055_MIC_R_CTRL);
497493
498494 /* Mute Mic PGA Left and Right */
499495 snd_soc_component_update_bits(component, DA9055_MIC_L_CTRL,
....@@ -502,8 +498,8 @@
502498 DA9055_MIC_R_MUTE_EN, DA9055_MIC_R_MUTE_EN);
503499
504500 /* Save current values from ADC control registers */
505
- adc_left = snd_soc_component_read32(component, DA9055_ADC_L_CTRL);
506
- adc_right = snd_soc_component_read32(component, DA9055_ADC_R_CTRL);
501
+ adc_left = snd_soc_component_read(component, DA9055_ADC_L_CTRL);
502
+ adc_right = snd_soc_component_read(component, DA9055_ADC_R_CTRL);
507503
508504 /* Enable ADC Left and Right */
509505 snd_soc_component_update_bits(component, DA9055_ADC_L_CTRL,
....@@ -1180,7 +1176,7 @@
11801176 }
11811177
11821178 /* Don't allow change of mode if PLL is enabled */
1183
- if ((snd_soc_component_read32(component, DA9055_PLL_CTRL) & DA9055_PLL_EN) &&
1179
+ if ((snd_soc_component_read(component, DA9055_PLL_CTRL) & DA9055_PLL_EN) &&
11841180 (da9055->master != mode))
11851181 return -EINVAL;
11861182
....@@ -1215,7 +1211,7 @@
12151211 return 0;
12161212 }
12171213
1218
-static int da9055_mute(struct snd_soc_dai *dai, int mute)
1214
+static int da9055_mute(struct snd_soc_dai *dai, int mute, int direction)
12191215 {
12201216 struct snd_soc_component *component = dai->component;
12211217
....@@ -1328,7 +1324,8 @@
13281324 .set_fmt = da9055_set_dai_fmt,
13291325 .set_sysclk = da9055_set_dai_sysclk,
13301326 .set_pll = da9055_set_dai_pll,
1331
- .digital_mute = da9055_mute,
1327
+ .mute_stream = da9055_mute,
1328
+ .no_capture_mute = 1,
13321329 };
13331330
13341331 static struct snd_soc_dai_driver da9055_dai = {