Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 7dd0f7ca authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown
Browse files

ASoC: arizona: Fixup some minor formatting issues



Repair any formatting/style issues that can be fixed without major
code refactoring.

Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0fe1daa6
Loading
Loading
Loading
Loading
+33 −26
Original line number Diff line number Diff line
@@ -90,7 +90,8 @@ 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, ARIZONA_INTERRUPT_RAW_STATUS_3);
		val = snd_soc_component_read32(component,
					       ARIZONA_INTERRUPT_RAW_STATUS_3);
		if (val & ARIZONA_SPK_OVERHEAT_STS) {
			dev_crit(arizona->dev,
				 "Speaker not enabled due to temperature\n");
@@ -641,7 +642,6 @@ const unsigned int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE] = {
};
EXPORT_SYMBOL_GPL(arizona_rate_val);


const struct soc_enum arizona_isrc_fsh[] = {
	SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_1_CTRL_1,
			      ARIZONA_ISRC1_FSH_SHIFT, 0xf,
@@ -923,7 +923,8 @@ int arizona_in_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol,
		priv->in_pending++;
		break;
	case SND_SOC_DAPM_POST_PMU:
		snd_soc_component_update_bits(component, reg, ARIZONA_IN1L_MUTE, 0);
		snd_soc_component_update_bits(component, reg,
					      ARIZONA_IN1L_MUTE, 0);

		/* If this is the last input pending then allow VU */
		priv->in_pending--;
@@ -1070,8 +1071,7 @@ int arizona_out_ev(struct snd_soc_dapm_widget *w,
}
EXPORT_SYMBOL_GPL(arizona_out_ev);

int arizona_hp_ev(struct snd_soc_dapm_widget *w,
		   struct snd_kcontrol *kcontrol,
int arizona_hp_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol,
		  int event)
{
	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
@@ -1275,8 +1275,8 @@ static unsigned int arizona_opclk_ref_44k1_rates[] = {
	45158400,
};

static int arizona_set_opclk(struct snd_soc_component *component, unsigned int clk,
			     unsigned int freq)
static int arizona_set_opclk(struct snd_soc_component *component,
			     unsigned int clk, unsigned int freq)
{
	struct arizona_priv *priv = snd_soc_component_get_drvdata(component);
	unsigned int reg;
@@ -1727,16 +1727,21 @@ static int arizona_hw_params_rate(struct snd_pcm_substream *substream,
		}

		snd_soc_component_update_bits(component, ARIZONA_SAMPLE_RATE_1,
				    ARIZONA_SAMPLE_RATE_1_MASK, sr_val);
					      ARIZONA_SAMPLE_RATE_1_MASK,
					      sr_val);
		if (base)
			snd_soc_component_update_bits(component, base + ARIZONA_AIF_RATE_CTRL,
			snd_soc_component_update_bits(component,
					base + ARIZONA_AIF_RATE_CTRL,
					ARIZONA_AIF1_RATE_MASK, 0);
		break;
	case ARIZONA_CLK_ASYNCCLK:
		snd_soc_component_update_bits(component, ARIZONA_ASYNC_SAMPLE_RATE_1,
				    ARIZONA_ASYNC_SAMPLE_RATE_1_MASK, sr_val);
		snd_soc_component_update_bits(component,
					      ARIZONA_ASYNC_SAMPLE_RATE_1,
					      ARIZONA_ASYNC_SAMPLE_RATE_1_MASK,
					      sr_val);
		if (base)
			snd_soc_component_update_bits(component, base + ARIZONA_AIF_RATE_CTRL,
			snd_soc_component_update_bits(component,
					base + ARIZONA_AIF_RATE_CTRL,
					ARIZONA_AIF1_RATE_MASK,
					8 << ARIZONA_AIF1_RATE_SHIFT);
		break;
@@ -1849,7 +1854,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
					    base + ARIZONA_AIF_RX_ENABLES);
		/* Disable AIF TX/RX before reconfiguring it */
		regmap_update_bits_async(arizona->regmap,
				    base + ARIZONA_AIF_TX_ENABLES, 0xff, 0x0);
					 base + ARIZONA_AIF_TX_ENABLES,
					 0xff, 0x0);
		regmap_update_bits(arizona->regmap,
				   base + ARIZONA_AIF_RX_ENABLES, 0xff, 0x0);
	}
@@ -1960,7 +1966,8 @@ static int arizona_set_tristate(struct snd_soc_dai *dai, int tristate)
	else
		reg = 0;

	return snd_soc_component_update_bits(component, base + ARIZONA_AIF_RATE_CTRL,
	return snd_soc_component_update_bits(component,
					     base + ARIZONA_AIF_RATE_CTRL,
					     ARIZONA_AIF1_TRI, reg);
}

@@ -2319,7 +2326,6 @@ static int arizona_calc_fll(struct arizona_fll *fll,
	arizona_fll_dbg(fll, "GAIN=0x%x(%d)\n", cfg->gain, 1 << cfg->gain);

	return 0;

}

static void arizona_apply_fll(struct arizona *arizona, unsigned int base,
@@ -2565,9 +2571,8 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source,
	fll->ref_src = source;
	fll->ref_freq = Fref;

	if (fll->fout && Fref > 0) {
	if (fll->fout && Fref > 0)
		ret = arizona_enable_fll(fll);
	}

	return ret;
}
@@ -2656,7 +2661,8 @@ EXPORT_SYMBOL_GPL(arizona_init_fll);
 * Most systems have a single static configuration and should use
 * platform data instead.
 */
int arizona_set_output_mode(struct snd_soc_component *component, int output, bool diff)
int arizona_set_output_mode(struct snd_soc_component *component, int output,
			    bool diff)
{
	unsigned int reg, val;

@@ -2670,7 +2676,8 @@ int arizona_set_output_mode(struct snd_soc_component *component, int output, boo
	else
		val = 0;

	return snd_soc_component_update_bits(component, reg, ARIZONA_OUT1_MONO, val);
	return snd_soc_component_update_bits(component, reg,
					     ARIZONA_OUT1_MONO, val);
}
EXPORT_SYMBOL_GPL(arizona_set_output_mode);

+11 −11
Original line number Diff line number Diff line
@@ -202,8 +202,7 @@ SOC_DOUBLE_R_TLV("HPOUT1 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_1L,
		 ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_VOL_SHIFT,
		 0xbf, 0, digital_tlv),
SOC_SINGLE_TLV("Speaker Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_4L,
		 ARIZONA_OUT4L_VOL_SHIFT,
		 0xbf, 0, digital_tlv),
	       ARIZONA_OUT4L_VOL_SHIFT, 0xbf, 0, digital_tlv),

SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp),
SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp),
@@ -494,8 +493,7 @@ SND_SOC_DAPM_PGA("ISRC3DEC4", ARIZONA_ISRC_3_CTRL_3,
		 ARIZONA_ISRC3_DEC3_ENA_SHIFT, 0, NULL, 0),

SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1,
		       ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0,
		       &cs47l24_aec_loopback_mux),
		 ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, &cs47l24_aec_loopback_mux),

SND_SOC_DAPM_AIF_OUT("AIF1TX1", NULL, 0,
		     ARIZONA_AIF1_TX_ENABLES, ARIZONA_AIF1TX1_ENA_SHIFT, 0),
@@ -931,8 +929,8 @@ static const struct snd_soc_dapm_route cs47l24_dapm_routes[] = {
	{ "DSP3 Voice Trigger", "Switch", "DSP3" },
};

static int cs47l24_set_fll(struct snd_soc_component *component, int fll_id, int source,
			  unsigned int Fref, unsigned int Fout)
static int cs47l24_set_fll(struct snd_soc_component *component, int fll_id,
			   int source, unsigned int Fref, unsigned int Fout)
{
	struct cs47l24_priv *cs47l24 = snd_soc_component_get_drvdata(component);

@@ -1144,7 +1142,8 @@ static int cs47l24_component_probe(struct snd_soc_component *component)
		goto err_adsp2_codec_probe;

	ret = snd_soc_add_component_controls(component,
					 &arizona_adsp2_rate_controls[1], 2);
					     &arizona_adsp2_rate_controls[1],
					     2);
	if (ret)
		goto err_adsp2_codec_probe;

@@ -1295,7 +1294,8 @@ static int cs47l24_probe(struct platform_device *pdev)

	ret = devm_snd_soc_register_component(&pdev->dev,
					      &soc_component_dev_cs47l24,
				      cs47l24_dai, ARRAY_SIZE(cs47l24_dai));
					      cs47l24_dai,
					      ARRAY_SIZE(cs47l24_dai));
	if (ret < 0) {
		dev_err(&pdev->dev, "Failed to register component: %d\n", ret);
		goto err_spk_irqs;
+10 −10
Original line number Diff line number Diff line
@@ -717,7 +717,7 @@ static int wm5102_out_comp_switch_put(struct snd_kcontrol *kcontrol,
	return 0;
}

static const char *wm5102_osr_text[] = {
static const char * const wm5102_osr_text[] = {
	"Low power", "Normal", "High performance",
};

@@ -1062,7 +1062,7 @@ ARIZONA_MIXER_ENUMS(DSP1R, ARIZONA_DSP1RMIX_INPUT_1_SOURCE);

ARIZONA_DSP_AUX_ENUMS(DSP1, ARIZONA_DSP1AUX1MIX_INPUT_1_SOURCE);

static const char *wm5102_aec_loopback_texts[] = {
static const char * const wm5102_aec_loopback_texts[] = {
	"HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "EPOUT",
	"SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R",
};
@@ -1317,8 +1317,7 @@ SND_SOC_DAPM_AIF_IN("SLIMRX8", NULL, 0,
ARIZONA_DSP_WIDGETS(DSP1, "DSP1"),

SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1,
		       ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0,
		       &wm5102_aec_loopback_mux),
		 ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, &wm5102_aec_loopback_mux),

SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM,
		   ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev,
@@ -1736,8 +1735,8 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
	{ "DRC1 Signal Activity", NULL, "DRC1R" },
};

static int wm5102_set_fll(struct snd_soc_component *component, int fll_id, int source,
			  unsigned int Fref, unsigned int Fout)
static int wm5102_set_fll(struct snd_soc_component *component, int fll_id,
			  int source, unsigned int Fref, unsigned int Fout)
{
	struct wm5102_priv *wm5102 = snd_soc_component_get_drvdata(component);

@@ -2106,7 +2105,8 @@ static int wm5102_probe(struct platform_device *pdev)

	ret = devm_snd_soc_register_component(&pdev->dev,
					      &soc_component_dev_wm5102,
				      wm5102_dai, ARRAY_SIZE(wm5102_dai));
					      wm5102_dai,
					      ARRAY_SIZE(wm5102_dai));
	if (ret < 0) {
		dev_err(&pdev->dev, "Failed to register component: %d\n", ret);
		goto err_spk_irqs;
+34 −28
Original line number Diff line number Diff line
@@ -332,18 +332,24 @@ static int wm5110_hp_pre_disable(struct snd_soc_dapm_widget *w)
	switch (w->shift) {
	case ARIZONA_OUT1L_ENA_SHIFT:
		if (!(val & ARIZONA_DRE1L_ENA_MASK)) {
			snd_soc_component_update_bits(component, ARIZONA_SPARE_TRIGGERS,
					    ARIZONA_WS_TRG1, ARIZONA_WS_TRG1);
			snd_soc_component_update_bits(component, ARIZONA_SPARE_TRIGGERS,
			snd_soc_component_update_bits(component,
						      ARIZONA_SPARE_TRIGGERS,
						      ARIZONA_WS_TRG1,
						      ARIZONA_WS_TRG1);
			snd_soc_component_update_bits(component,
						      ARIZONA_SPARE_TRIGGERS,
						      ARIZONA_WS_TRG1, 0);
			priv->out_down_delay += 27;
		}
		break;
	case ARIZONA_OUT1R_ENA_SHIFT:
		if (!(val & ARIZONA_DRE1R_ENA_MASK)) {
			snd_soc_component_update_bits(component, ARIZONA_SPARE_TRIGGERS,
					    ARIZONA_WS_TRG2, ARIZONA_WS_TRG2);
			snd_soc_component_update_bits(component, ARIZONA_SPARE_TRIGGERS,
			snd_soc_component_update_bits(component,
						      ARIZONA_SPARE_TRIGGERS,
						      ARIZONA_WS_TRG2,
						      ARIZONA_WS_TRG2);
			snd_soc_component_update_bits(component,
						      ARIZONA_SPARE_TRIGGERS,
						      ARIZONA_WS_TRG2, 0);
			priv->out_down_delay += 27;
		}
@@ -1036,7 +1042,7 @@ ARIZONA_MUX_ENUMS(ISRC3DEC2, ARIZONA_ISRC3DEC2MIX_INPUT_1_SOURCE);
ARIZONA_MUX_ENUMS(ISRC3DEC3, ARIZONA_ISRC3DEC3MIX_INPUT_1_SOURCE);
ARIZONA_MUX_ENUMS(ISRC3DEC4, ARIZONA_ISRC3DEC4MIX_INPUT_1_SOURCE);

static const char *wm5110_aec_loopback_texts[] = {
static const char * const wm5110_aec_loopback_texts[] = {
	"HPOUT1L", "HPOUT1R", "HPOUT2L", "HPOUT2R", "HPOUT3L", "HPOUT3R",
	"SPKOUTL", "SPKOUTR", "SPKDAT1L", "SPKDAT1R", "SPKDAT2L", "SPKDAT2R",
};
@@ -1274,8 +1280,7 @@ SND_SOC_DAPM_PGA("ISRC3DEC4", ARIZONA_ISRC_3_CTRL_3,
		 ARIZONA_ISRC3_DEC3_ENA_SHIFT, 0, NULL, 0),

SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1,
		       ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0,
		       &wm5110_aec_loopback_mux),
		 ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, &wm5110_aec_loopback_mux),

SND_SOC_DAPM_SUPPLY("RXANC NG External Clock", SND_SOC_NOPM,
		    ARIZONA_EXT_NG_SEL_SET_SHIFT, 0, arizona_anc_ev,
@@ -2034,8 +2039,8 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
	{ "DSP3 Voice Trigger", "Switch", "DSP3" },
};

static int wm5110_set_fll(struct snd_soc_component *component, int fll_id, int source,
			  unsigned int Fref, unsigned int Fout)
static int wm5110_set_fll(struct snd_soc_component *component, int fll_id,
			  int source, unsigned int Fref, unsigned int Fout)
{
	struct wm5110_priv *wm5110 = snd_soc_component_get_drvdata(component);

@@ -2461,7 +2466,8 @@ static int wm5110_probe(struct platform_device *pdev)

	ret = devm_snd_soc_register_component(&pdev->dev,
					      &soc_component_dev_wm5110,
				      wm5110_dai, ARRAY_SIZE(wm5110_dai));
					      wm5110_dai,
					      ARRAY_SIZE(wm5110_dai));
	if (ret < 0) {
		dev_err(&pdev->dev, "Failed to register component: %d\n", ret);
		goto err_spk_irqs;
+7 −7
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ static int wm8997_sysclk_ev(struct snd_soc_dapm_widget *w,
	return arizona_dvfs_sysclk_ev(w, kcontrol, event);
}

static const char *wm8997_osr_text[] = {
static const char * const wm8997_osr_text[] = {
	"Low power", "Normal", "High performance",
};

@@ -609,8 +609,7 @@ SND_SOC_DAPM_AIF_IN("SLIMRX8", NULL, 0,
		    ARIZONA_SLIMRX8_ENA_SHIFT, 0),

SND_SOC_DAPM_MUX("AEC Loopback", ARIZONA_DAC_AEC_CONTROL_1,
		       ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0,
		       &wm8997_aec_loopback_mux),
		 ARIZONA_AEC_LOOPBACK_ENA_SHIFT, 0, &wm8997_aec_loopback_mux),

SND_SOC_DAPM_PGA_E("OUT1L", SND_SOC_NOPM,
		   ARIZONA_OUT1L_ENA_SHIFT, 0, NULL, 0, arizona_hp_ev,
@@ -927,8 +926,8 @@ static const struct snd_soc_dapm_route wm8997_dapm_routes[] = {
	{ "MICSUPP", NULL, "SYSCLK" },
};

static int wm8997_set_fll(struct snd_soc_component *component, int fll_id, int source,
			  unsigned int Fref, unsigned int Fout)
static int wm8997_set_fll(struct snd_soc_component *component, int fll_id,
			  int source, unsigned int Fref, unsigned int Fout)
{
	struct wm8997_priv *wm8997 = snd_soc_component_get_drvdata(component);

@@ -1174,7 +1173,8 @@ static int wm8997_probe(struct platform_device *pdev)

	ret = devm_snd_soc_register_component(&pdev->dev,
					      &soc_component_dev_wm8997,
				     wm8997_dai, ARRAY_SIZE(wm8997_dai));
					      wm8997_dai,
					      ARRAY_SIZE(wm8997_dai));
	if (ret < 0) {
		dev_err(&pdev->dev, "Failed to register component: %d\n", ret);
		goto err_spk_irqs;
Loading