Commit a11f8a1c authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: codecs: cs*: 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/87a7134mc4.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2925b582
...@@ -355,7 +355,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream, ...@@ -355,7 +355,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
/* Set the sample rate */ /* Set the sample rate */
reg = snd_soc_component_read32(component, CS4270_MODE); reg = snd_soc_component_read(component, CS4270_MODE);
reg &= ~(CS4270_MODE_SPEED_MASK | CS4270_MODE_DIV_MASK); reg &= ~(CS4270_MODE_SPEED_MASK | CS4270_MODE_DIV_MASK);
reg |= cs4270_mode_ratios[i].mclk; reg |= cs4270_mode_ratios[i].mclk;
...@@ -372,7 +372,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream, ...@@ -372,7 +372,7 @@ static int cs4270_hw_params(struct snd_pcm_substream *substream,
/* Set the DAI format */ /* Set the DAI format */
reg = snd_soc_component_read32(component, CS4270_FORMAT); reg = snd_soc_component_read(component, CS4270_FORMAT);
reg &= ~(CS4270_FORMAT_DAC_MASK | CS4270_FORMAT_ADC_MASK); reg &= ~(CS4270_FORMAT_DAC_MASK | CS4270_FORMAT_ADC_MASK);
switch (cs4270->mode) { switch (cs4270->mode) {
...@@ -412,7 +412,7 @@ static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute) ...@@ -412,7 +412,7 @@ static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute)
struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component);
int reg6; int reg6;
reg6 = snd_soc_component_read32(component, CS4270_MUTE); reg6 = snd_soc_component_read(component, CS4270_MUTE);
if (mute) if (mute)
reg6 |= CS4270_MUTE_DAC_A | CS4270_MUTE_DAC_B; reg6 |= CS4270_MUTE_DAC_A | CS4270_MUTE_DAC_B;
...@@ -567,7 +567,7 @@ static int cs4270_soc_suspend(struct snd_soc_component *component) ...@@ -567,7 +567,7 @@ static int cs4270_soc_suspend(struct snd_soc_component *component)
struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component);
int reg, ret; int reg, ret;
reg = snd_soc_component_read32(component, CS4270_PWRCTL) | CS4270_PWRCTL_PDN_ALL; reg = snd_soc_component_read(component, CS4270_PWRCTL) | CS4270_PWRCTL_PDN_ALL;
if (reg < 0) if (reg < 0)
return reg; return reg;
...@@ -599,7 +599,7 @@ static int cs4270_soc_resume(struct snd_soc_component *component) ...@@ -599,7 +599,7 @@ static int cs4270_soc_resume(struct snd_soc_component *component)
regcache_sync(cs4270->regmap); regcache_sync(cs4270->regmap);
/* ... then disable the power-down bits */ /* ... then disable the power-down bits */
reg = snd_soc_component_read32(component, CS4270_PWRCTL); reg = snd_soc_component_read(component, CS4270_PWRCTL);
reg &= ~CS4270_PWRCTL_PDN_ALL; reg &= ~CS4270_PWRCTL_PDN_ALL;
return snd_soc_component_write(component, CS4270_PWRCTL, reg); return snd_soc_component_write(component, CS4270_PWRCTL, reg);
......
...@@ -877,7 +877,7 @@ static int cs42l42_digital_mute(struct snd_soc_dai *dai, int mute) ...@@ -877,7 +877,7 @@ static int cs42l42_digital_mute(struct snd_soc_dai *dai, int mute)
CS42L42_PLL_START_MASK, CS42L42_PLL_START_MASK,
1 << CS42L42_PLL_START_SHIFT); 1 << CS42L42_PLL_START_SHIFT);
/* Read the headphone load */ /* Read the headphone load */
regval = snd_soc_component_read32(component, CS42L42_LOAD_DET_RCSTAT); regval = snd_soc_component_read(component, CS42L42_LOAD_DET_RCSTAT);
if (((regval & CS42L42_RLA_STAT_MASK) >> if (((regval & CS42L42_RLA_STAT_MASK) >>
CS42L42_RLA_STAT_SHIFT) == CS42L42_RLA_STAT_15_OHM) { CS42L42_RLA_STAT_SHIFT) == CS42L42_RLA_STAT_15_OHM) {
fullScaleVol = CS42L42_HP_FULL_SCALE_VOL_MASK; fullScaleVol = CS42L42_HP_FULL_SCALE_VOL_MASK;
......
...@@ -61,7 +61,7 @@ static int cs42l51_get_chan_mix(struct snd_kcontrol *kcontrol, ...@@ -61,7 +61,7 @@ static int cs42l51_get_chan_mix(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) struct snd_ctl_elem_value *ucontrol)
{ {
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
unsigned long value = snd_soc_component_read32(component, CS42L51_PCM_MIXER)&3; unsigned long value = snd_soc_component_read(component, CS42L51_PCM_MIXER)&3;
switch (value) { switch (value) {
default: default:
...@@ -407,8 +407,8 @@ static int cs42l51_hw_params(struct snd_pcm_substream *substream, ...@@ -407,8 +407,8 @@ static int cs42l51_hw_params(struct snd_pcm_substream *substream,
return -EINVAL; return -EINVAL;
} }
intf_ctl = snd_soc_component_read32(component, CS42L51_INTF_CTL); intf_ctl = snd_soc_component_read(component, CS42L51_INTF_CTL);
power_ctl = snd_soc_component_read32(component, CS42L51_MIC_POWER_CTL); power_ctl = snd_soc_component_read(component, CS42L51_MIC_POWER_CTL);
intf_ctl &= ~(CS42L51_INTF_CTL_MASTER | CS42L51_INTF_CTL_ADC_I2S intf_ctl &= ~(CS42L51_INTF_CTL_MASTER | CS42L51_INTF_CTL_ADC_I2S
| CS42L51_INTF_CTL_DAC_FORMAT(7)); | CS42L51_INTF_CTL_DAC_FORMAT(7));
...@@ -490,7 +490,7 @@ static int cs42l51_dai_mute(struct snd_soc_dai *dai, int mute) ...@@ -490,7 +490,7 @@ static int cs42l51_dai_mute(struct snd_soc_dai *dai, int mute)
int reg; int reg;
int mask = CS42L51_DAC_OUT_CTL_DACA_MUTE|CS42L51_DAC_OUT_CTL_DACB_MUTE; int mask = CS42L51_DAC_OUT_CTL_DACA_MUTE|CS42L51_DAC_OUT_CTL_DACB_MUTE;
reg = snd_soc_component_read32(component, CS42L51_DAC_OUT_CTL); reg = snd_soc_component_read(component, CS42L51_DAC_OUT_CTL);
if (mute) if (mute)
reg |= mask; reg |= mask;
......
...@@ -938,8 +938,8 @@ static int cs42l73_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) ...@@ -938,8 +938,8 @@ static int cs42l73_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
unsigned int inv, format; unsigned int inv, format;
u8 spc, mmcc; u8 spc, mmcc;
spc = snd_soc_component_read32(component, CS42L73_SPC(id)); spc = snd_soc_component_read(component, CS42L73_SPC(id));
mmcc = snd_soc_component_read32(component, CS42L73_MMCC(id)); mmcc = snd_soc_component_read(component, CS42L73_MMCC(id));
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBM_CFM:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment