Unverified Commit 981abdfe authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: codecs: rename to snd_soc_component_read()



We need to use snd_soc_component_read()
instead of     snd_soc_component_read32()

This patch renames _read32() to _read()

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mu534me5.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f0daed1a
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -274,10 +274,10 @@ static int snd_soc_get_volsw_2r_st(struct snd_kcontrol *kcontrol,
	unsigned int reg2 = mc->rreg;
	int val[2], val2[2], i;

	val[0] = snd_soc_component_read32(component, reg) & 0x3f;
	val[1] = (snd_soc_component_read32(component, PM860X_SIDETONE_SHIFT) >> 4) & 0xf;
	val2[0] = snd_soc_component_read32(component, reg2) & 0x3f;
	val2[1] = (snd_soc_component_read32(component, PM860X_SIDETONE_SHIFT)) & 0xf;
	val[0] = snd_soc_component_read(component, reg) & 0x3f;
	val[1] = (snd_soc_component_read(component, PM860X_SIDETONE_SHIFT) >> 4) & 0xf;
	val2[0] = snd_soc_component_read(component, reg2) & 0x3f;
	val2[1] = (snd_soc_component_read(component, PM860X_SIDETONE_SHIFT)) & 0xf;

	for (i = 0; i < ARRAY_SIZE(st_table); i++) {
		if ((st_table[i].m == val[0]) && (st_table[i].n == val[1]))
@@ -333,8 +333,8 @@ static int snd_soc_get_volsw_2r_out(struct snd_kcontrol *kcontrol,
	int max = mc->max, val, val2;
	unsigned int mask = (1 << fls(max)) - 1;

	val = snd_soc_component_read32(component, reg) >> shift;
	val2 = snd_soc_component_read32(component, reg2) >> shift;
	val = snd_soc_component_read(component, reg) >> shift;
	val2 = snd_soc_component_read(component, reg2) >> shift;
	ucontrol->value.integer.value[0] = (max - val) & mask;
	ucontrol->value.integer.value[1] = (max - val2) & mask;

@@ -426,7 +426,7 @@ static int pm860x_dac_event(struct snd_soc_dapm_widget *w,
			snd_soc_component_update_bits(component, PM860X_EAR_CTRL_2,
					    RSYNC_CHANGE, RSYNC_CHANGE);
			/* update dac */
			data = snd_soc_component_read32(component, PM860X_DAC_EN_2);
			data = snd_soc_component_read(component, PM860X_DAC_EN_2);
			data &= ~dac;
			if (!(data & (DAC_LEFT | DAC_RIGHT)))
				data &= ~MODULATOR;
+4 −4
Original line number Diff line number Diff line
@@ -1100,7 +1100,7 @@ static void anc_configure(struct snd_soc_component *component,
	if (apply_fir)
		for (bnk = 0; bnk < AB8500_NR_OF_ANC_COEFF_BANKS; bnk++)
			for (par = 0; par < AB8500_ANC_FIR_COEFFS; par++) {
				val = snd_soc_component_read32(component,
				val = snd_soc_component_read(component,
						drvdata->anc_fir_values[par]);
				anc_fir(component, bnk, par, val);
			}
@@ -1108,7 +1108,7 @@ static void anc_configure(struct snd_soc_component *component,
	if (apply_iir)
		for (bnk = 0; bnk < AB8500_NR_OF_ANC_COEFF_BANKS; bnk++)
			for (par = 0; par < AB8500_ANC_IIR_COEFFS; par++) {
				val = snd_soc_component_read32(component,
				val = snd_soc_component_read(component,
						drvdata->anc_iir_values[par]);
				anc_iir(component, bnk, par, val);
			}
@@ -1153,7 +1153,7 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,

	mutex_lock(&drvdata->ctrl_lock);

	sidconf = snd_soc_component_read32(component, AB8500_SIDFIRCONF);
	sidconf = snd_soc_component_read(component, AB8500_SIDFIRCONF);
	if (((sidconf & BIT(AB8500_SIDFIRCONF_FIRSIDBUSY)) != 0)) {
		if ((sidconf & BIT(AB8500_SIDFIRCONF_ENFIRSIDS)) == 0) {
			dev_err(component->dev, "%s: Sidetone busy while off!\n",
@@ -1168,7 +1168,7 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,
	snd_soc_component_write(component, AB8500_SIDFIRADR, 0);

	for (param = 0; param < AB8500_SID_FIR_COEFFS; param++) {
		val = snd_soc_component_read32(component, drvdata->sid_fir_values[param]);
		val = snd_soc_component_read(component, drvdata->sid_fir_values[param]);
		snd_soc_component_write(component, AB8500_SIDFIRCOEF1, val >> 8 & 0xff);
		snd_soc_component_write(component, AB8500_SIDFIRCOEF2, val & 0xff);
	}
+2 −2
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ static int ad1980_soc_probe(struct snd_soc_component *component)
	if (ret < 0)
		goto reset_err;

	vendor_id2 = snd_soc_component_read32(component, AC97_VENDOR_ID2);
	vendor_id2 = snd_soc_component_read(component, AC97_VENDOR_ID2);
	if (vendor_id2 == 0x5374) {
		dev_warn(component->dev,
			"Found AD1981 - only 2/2 IN/OUT Channels supported\n");
@@ -270,7 +270,7 @@ static int ad1980_soc_probe(struct snd_soc_component *component)
	snd_soc_component_write(component, AC97_SURROUND_MASTER, 0x0000);

	/*power on LFE/CENTER/Surround DACs*/
	ext_status = snd_soc_component_read32(component, AC97_EXTENDED_STATUS);
	ext_status = snd_soc_component_read(component, AC97_EXTENDED_STATUS);
	snd_soc_component_write(component, AC97_EXTENDED_STATUS, ext_status&~0x3800);

	return 0;
+9 −9
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ static int arizona_spk_ev(struct snd_soc_dapm_widget *w,

	switch (event) {
	case SND_SOC_DAPM_POST_PMU:
		val = snd_soc_component_read32(component,
		val = snd_soc_component_read(component,
					       ARIZONA_INTERRUPT_RAW_STATUS_3);
		if (val & ARIZONA_SPK_OVERHEAT_STS) {
			dev_crit(arizona->dev,
@@ -897,7 +897,7 @@ static void arizona_in_set_vu(struct snd_soc_component *component, int ena)
bool arizona_input_analog(struct snd_soc_component *component, int shift)
{
	unsigned int reg = ARIZONA_IN1L_CONTROL + ((shift / 2) * 8);
	unsigned int val = snd_soc_component_read32(component, reg);
	unsigned int val = snd_soc_component_read(component, reg);

	return !(val & ARIZONA_IN1_MODE_MASK);
}
@@ -937,7 +937,7 @@ int arizona_in_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol,
		break;
	case SND_SOC_DAPM_POST_PMD:
		/* Disable volume updates if no inputs are enabled */
		reg = snd_soc_component_read32(component, ARIZONA_INPUT_ENABLES);
		reg = snd_soc_component_read(component, ARIZONA_INPUT_ENABLES);
		if (reg == 0)
			arizona_in_set_vu(component, 0);
		break;
@@ -1755,15 +1755,15 @@ static bool arizona_aif_cfg_changed(struct snd_soc_component *component,
{
	int val;

	val = snd_soc_component_read32(component, base + ARIZONA_AIF_BCLK_CTRL);
	val = snd_soc_component_read(component, base + ARIZONA_AIF_BCLK_CTRL);
	if (bclk != (val & ARIZONA_AIF1_BCLK_FREQ_MASK))
		return true;

	val = snd_soc_component_read32(component, base + ARIZONA_AIF_TX_BCLK_RATE);
	val = snd_soc_component_read(component, base + ARIZONA_AIF_TX_BCLK_RATE);
	if (lrclk != (val & ARIZONA_AIF1TX_BCPF_MASK))
		return true;

	val = snd_soc_component_read32(component, base + ARIZONA_AIF_FRAME_CTRL_1);
	val = snd_soc_component_read(component, base + ARIZONA_AIF_FRAME_CTRL_1);
	if (frame != (val & (ARIZONA_AIF1TX_WL_MASK |
			     ARIZONA_AIF1TX_SLOT_LEN_MASK)))
		return true;
@@ -1813,7 +1813,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
	}

	/* Force multiple of 2 channels for I2S mode */
	val = snd_soc_component_read32(component, base + ARIZONA_AIF_FORMAT);
	val = snd_soc_component_read(component, base + ARIZONA_AIF_FORMAT);
	val &= ARIZONA_AIF1_FMT_MASK;
	if ((channels & 1) && (val == ARIZONA_FMT_I2S_MODE)) {
		arizona_aif_dbg(dai, "Forcing stereo mode\n");
@@ -1845,9 +1845,9 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,

	if (reconfig) {
		/* Save AIF TX/RX state */
		aif_tx_state = snd_soc_component_read32(component,
		aif_tx_state = snd_soc_component_read(component,
					    base + ARIZONA_AIF_TX_ENABLES);
		aif_rx_state = snd_soc_component_read32(component,
		aif_rx_state = snd_soc_component_read(component,
					    base + ARIZONA_AIF_RX_ENABLES);
		/* Disable AIF TX/RX before reconfiguring it */
		regmap_update_bits_async(arizona->regmap,
+2 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ static int nau8822_eq_get(struct snd_kcontrol *kcontrol,
	val = (u16 *)ucontrol->value.bytes.data;
	reg = NAU8822_REG_EQ1;
	for (i = 0; i < params->max / sizeof(u16); i++) {
		reg_val = snd_soc_component_read32(component, reg + i);
		reg_val = snd_soc_component_read(component, reg + i);
		/* conversion of 16-bit integers between native CPU format
		 * and big endian format
		 */
@@ -445,7 +445,7 @@ static int check_mclk_select_pll(struct snd_soc_dapm_widget *source,
		snd_soc_dapm_to_component(source->dapm);
	unsigned int value;

	value = snd_soc_component_read32(component, NAU8822_REG_CLOCKING);
	value = snd_soc_component_read(component, NAU8822_REG_CLOCKING);

	return (value & NAU8822_CLKM_MASK);
}
Loading