hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/da732x.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * da732x.c --- Dialog DA732X ALSA SoC Audio Driver
34 *
45 * Copyright (C) 2012 Dialog Semiconductor GmbH
56 *
67 * Author: Michal Hajduk <Michal.Hajduk@diasemi.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #include <linux/module.h>
....@@ -364,7 +361,7 @@
364361 unsigned int reg = enum_ctrl->reg;
365362 int val;
366363
367
- val = snd_soc_component_read32(component, reg) & DA732X_HPF_MASK;
364
+ val = snd_soc_component_read(component, reg) & DA732X_HPF_MASK;
368365
369366 switch (val) {
370367 case DA732X_HPF_VOICE_EN:
....@@ -1290,9 +1287,9 @@
12901287 msleep(DA732X_WAIT_FOR_STABILIZATION);
12911288
12921289 /* Check DAC offset sign */
1293
- sign[DA732X_HPL_DAC] = (snd_soc_component_read32(component, DA732X_REG_HPL_DAC_OFF_CNTL) &
1290
+ sign[DA732X_HPL_DAC] = (snd_soc_component_read(component, DA732X_REG_HPL_DAC_OFF_CNTL) &
12941291 DA732X_HP_DAC_OFF_CNTL_COMPO);
1295
- sign[DA732X_HPR_DAC] = (snd_soc_component_read32(component, DA732X_REG_HPR_DAC_OFF_CNTL) &
1292
+ sign[DA732X_HPR_DAC] = (snd_soc_component_read(component, DA732X_REG_HPR_DAC_OFF_CNTL) &
12961293 DA732X_HP_DAC_OFF_CNTL_COMPO);
12971294
12981295 /* Binary search DAC offset values (both channels at once) */
....@@ -1309,10 +1306,10 @@
13091306
13101307 msleep(DA732X_WAIT_FOR_STABILIZATION);
13111308
1312
- if ((snd_soc_component_read32(component, DA732X_REG_HPL_DAC_OFF_CNTL) &
1309
+ if ((snd_soc_component_read(component, DA732X_REG_HPL_DAC_OFF_CNTL) &
13131310 DA732X_HP_DAC_OFF_CNTL_COMPO) ^ sign[DA732X_HPL_DAC])
13141311 offset[DA732X_HPL_DAC] &= ~step;
1315
- if ((snd_soc_component_read32(component, DA732X_REG_HPR_DAC_OFF_CNTL) &
1312
+ if ((snd_soc_component_read(component, DA732X_REG_HPR_DAC_OFF_CNTL) &
13161313 DA732X_HP_DAC_OFF_CNTL_COMPO) ^ sign[DA732X_HPR_DAC])
13171314 offset[DA732X_HPR_DAC] &= ~step;
13181315
....@@ -1353,9 +1350,9 @@
13531350 msleep(DA732X_WAIT_FOR_STABILIZATION);
13541351
13551352 /* Check output offset sign */
1356
- sign[DA732X_HPL_AMP] = snd_soc_component_read32(component, DA732X_REG_HPL) &
1353
+ sign[DA732X_HPL_AMP] = snd_soc_component_read(component, DA732X_REG_HPL) &
13571354 DA732X_HP_OUT_COMPO;
1358
- sign[DA732X_HPR_AMP] = snd_soc_component_read32(component, DA732X_REG_HPR) &
1355
+ sign[DA732X_HPR_AMP] = snd_soc_component_read(component, DA732X_REG_HPR) &
13591356 DA732X_HP_OUT_COMPO;
13601357
13611358 snd_soc_component_write(component, DA732X_REG_HPL, DA732X_HP_OUT_COMP |
....@@ -1376,10 +1373,10 @@
13761373
13771374 msleep(DA732X_WAIT_FOR_STABILIZATION);
13781375
1379
- if ((snd_soc_component_read32(component, DA732X_REG_HPL) &
1376
+ if ((snd_soc_component_read(component, DA732X_REG_HPL) &
13801377 DA732X_HP_OUT_COMPO) ^ sign[DA732X_HPL_AMP])
13811378 offset[DA732X_HPL_AMP] &= ~step;
1382
- if ((snd_soc_component_read32(component, DA732X_REG_HPR) &
1379
+ if ((snd_soc_component_read(component, DA732X_REG_HPR) &
13831380 DA732X_HP_OUT_COMPO) ^ sign[DA732X_HPR_AMP])
13841381 offset[DA732X_HPR_AMP] &= ~step;
13851382