Commit 5b8e0909 authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Mark Brown

ASoC: rt5682: fix space issues

Fixes blank lines and indent issues.
Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200430082231.151127-3-tzungbi@google.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 38c2e325
......@@ -806,6 +806,7 @@ static void rt5682_reset(struct rt5682_priv *rt5682)
if (!rt5682->is_sdw)
regmap_write(rt5682->regmap, RT5682_I2C_MODE, 1);
}
/**
* rt5682_sel_asrc_clk_src - select ASRC clock source for a set of filters
* @component: SoC audio component device.
......@@ -823,7 +824,6 @@ static void rt5682_reset(struct rt5682_priv *rt5682)
int rt5682_sel_asrc_clk_src(struct snd_soc_component *component,
unsigned int filter_mask, unsigned int clk_src)
{
switch (clk_src) {
case RT5682_CLK_SEL_SYS:
case RT5682_CLK_SEL_I2S1_ASRC:
......@@ -918,7 +918,6 @@ static int rt5682_headset_detect(struct snd_soc_component *component,
unsigned int val, count;
if (jack_insert) {
snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1,
RT5682_PWR_VREF2 | RT5682_PWR_MB,
RT5682_PWR_VREF2 | RT5682_PWR_MB);
......@@ -952,7 +951,6 @@ static int rt5682_headset_detect(struct snd_soc_component *component,
default:
rt5682->jack_type = SND_JACK_HEADPHONE;
}
} else {
rt5682_enable_push_button_irq(component, false);
snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_1,
......@@ -1184,15 +1182,13 @@ static const struct snd_kcontrol_new rt5682_snd_controls[] = {
3, 0, adc_bst_tlv),
};
static int rt5682_div_sel(struct rt5682_priv *rt5682,
int target, const int div[], int size)
{
int i;
if (rt5682->sysclk < target) {
pr_err("sysclk rate %d is too low\n",
rt5682->sysclk);
pr_err("sysclk rate %d is too low\n", rt5682->sysclk);
return 0;
}
......@@ -1201,18 +1197,17 @@ static int rt5682_div_sel(struct rt5682_priv *rt5682,
if (target * div[i] == rt5682->sysclk)
return i;
if (target * div[i + 1] > rt5682->sysclk) {
dev_dbg(rt5682->component->dev, "can't find div for sysclk %d\n",
dev_dbg(rt5682->component->dev,
"can't find div for sysclk %d\n",
rt5682->sysclk);
return i;
}
}
if (target * div[i] < rt5682->sysclk)
pr_err("sysclk rate %d is too high\n",
rt5682->sysclk);
pr_err("sysclk rate %d is too high\n", rt5682->sysclk);
return size - 1;
}
/**
......@@ -1347,7 +1342,6 @@ static int is_using_asrc(struct snd_soc_dapm_widget *w,
default:
return 0;
}
}
/* Digital Mixer */
......@@ -1538,7 +1532,6 @@ static int rt5682_hp_event(struct snd_soc_dapm_widget *w,
}
return 0;
}
static int set_dmic_power(struct snd_soc_dapm_widget *w,
......@@ -1831,7 +1824,6 @@ static const struct snd_soc_dapm_widget rt5682_dapm_widgets[] = {
/* Output Lines */
SND_SOC_DAPM_OUTPUT("HPOL"),
SND_SOC_DAPM_OUTPUT("HPOR"),
};
static const struct snd_soc_dapm_route rt5682_dapm_routes[] = {
......@@ -2065,7 +2057,6 @@ static int rt5682_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
return 0;
}
static int rt5682_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{
......@@ -2997,8 +2988,8 @@ static int rt5682_sdw_hw_params(struct snd_pcm_substream *substream,
unsigned int val_p = 0, val_c = 0, osr_p = 0, osr_c = 0;
dev_dbg(dai->dev, "%s %s", __func__, dai->name);
stream = snd_soc_dai_get_dma_data(dai, substream);
stream = snd_soc_dai_get_dma_data(dai, substream);
if (!stream)
return -ENOMEM;
......@@ -3308,7 +3299,6 @@ static void rt5682_calibrate(struct rt5682_priv *rt5682)
regmap_write(rt5682->regmap, RT5682_STO1_ADC_MIXER, 0xc0c4);
mutex_unlock(&rt5682->calibrate_mutex);
}
#if IS_ENABLED(CONFIG_SND_SOC_RT5682_SDW)
......@@ -3664,14 +3654,12 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
INIT_DELAYED_WORK(&rt5682->jd_check_work,
rt5682_jd_check_handler);
if (i2c->irq) {
ret = devm_request_threaded_irq(&i2c->dev, i2c->irq, NULL,
rt5682_irq, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING
| IRQF_ONESHOT, "rt5682", rt5682);
if (ret)
dev_err(&i2c->dev, "Failed to reguest IRQ: %d\n", ret);
}
return devm_snd_soc_register_component(&i2c->dev,
......
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