Skip to content

Commit

Permalink
ASoC: mt8183: Fixes from an initial glance at a
Browse files Browse the repository at this point in the history
Merge series from Mark Brown <broonie@kernel.org>:

This is a collection of fixes I came up after glancing through an
initial test run with the snappily named Kukui Jacuzzi SKU16 Chromebook
on KernelCI.  There are more issues flagged, this is just what I fixed
thus far.
  • Loading branch information
Mark Brown committed Feb 28, 2023
2 parents 11d4e47 + 18f51ed commit e48223e
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions sound/soc/mediatek/mt8183/mt8183-dai-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,26 +141,24 @@ static int mt8183_i2s_hd_set(struct snd_kcontrol *kcontrol,
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
struct mtk_afe_i2s_priv *i2s_priv;
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
int hd_en;
int hd_en, change;

if (ucontrol->value.enumerated.item[0] >= e->items)
return -EINVAL;

hd_en = ucontrol->value.integer.value[0];

dev_info(afe->dev, "%s(), kcontrol name %s, hd_en %d\n",
__func__, kcontrol->id.name, hd_en);

i2s_priv = get_i2s_priv_by_name(afe, kcontrol->id.name);

if (!i2s_priv) {
dev_warn(afe->dev, "%s(), i2s_priv == NULL", __func__);
return -EINVAL;
}

change = i2s_priv->low_jitter_en != hd_en;
i2s_priv->low_jitter_en = hd_en;

return 0;
return change;
}

static const struct snd_kcontrol_new mtk_dai_i2s_controls[] = {
Expand Down Expand Up @@ -276,9 +274,6 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w,
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);

dev_info(cmpnt->dev, "%s(), name %s, event 0x%x\n",
__func__, w->name, event);

switch (event) {
case SND_SOC_DAPM_PRE_PMU:
if (strcmp(w->name, APLL1_W_NAME) == 0)
Expand Down Expand Up @@ -307,9 +302,6 @@ static int mtk_mclk_en_event(struct snd_soc_dapm_widget *w,
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
struct mtk_afe_i2s_priv *i2s_priv;

dev_info(cmpnt->dev, "%s(), name %s, event 0x%x\n",
__func__, w->name, event);

i2s_priv = get_i2s_priv_by_name(afe, w->name);

if (!i2s_priv) {
Expand Down Expand Up @@ -715,11 +707,6 @@ static int mtk_dai_i2s_config(struct mtk_base_afe *afe,
unsigned int i2s_con = 0, fmt_con = I2S_FMT_I2S << I2S_FMT_SFT;
int ret = 0;

dev_info(afe->dev, "%s(), id %d, rate %d, format %d\n",
__func__,
i2s_id,
rate, format);

if (i2s_priv) {
i2s_priv->rate = rate;

Expand Down Expand Up @@ -810,8 +797,6 @@ static int mtk_dai_i2s_set_sysclk(struct snd_soc_dai *dai,
return -EINVAL;
}

dev_info(afe->dev, "%s(), freq %d\n", __func__, freq);

apll = mt8183_get_apll_by_rate(afe, freq);
apll_rate = mt8183_get_apll_rate(afe, apll);

Expand Down

0 comments on commit e48223e

Please sign in to comment.