Skip to content

Commit e48223e

Browse files
committed
ASoC: mt8183: Fixes from an initial glance at a
Merge series from Mark Brown <[email protected]>: 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.
2 parents 11d4e47 + 18f51ed commit e48223e

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

sound/soc/mediatek/mt8183/mt8183-dai-i2s.c

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,26 +141,24 @@ static int mt8183_i2s_hd_set(struct snd_kcontrol *kcontrol,
141141
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
142142
struct mtk_afe_i2s_priv *i2s_priv;
143143
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
144-
int hd_en;
144+
int hd_en, change;
145145

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

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

151-
dev_info(afe->dev, "%s(), kcontrol name %s, hd_en %d\n",
152-
__func__, kcontrol->id.name, hd_en);
153-
154151
i2s_priv = get_i2s_priv_by_name(afe, kcontrol->id.name);
155152

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

158+
change = i2s_priv->low_jitter_en != hd_en;
161159
i2s_priv->low_jitter_en = hd_en;
162160

163-
return 0;
161+
return change;
164162
}
165163

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

279-
dev_info(cmpnt->dev, "%s(), name %s, event 0x%x\n",
280-
__func__, w->name, event);
281-
282277
switch (event) {
283278
case SND_SOC_DAPM_PRE_PMU:
284279
if (strcmp(w->name, APLL1_W_NAME) == 0)
@@ -307,9 +302,6 @@ static int mtk_mclk_en_event(struct snd_soc_dapm_widget *w,
307302
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
308303
struct mtk_afe_i2s_priv *i2s_priv;
309304

310-
dev_info(cmpnt->dev, "%s(), name %s, event 0x%x\n",
311-
__func__, w->name, event);
312-
313305
i2s_priv = get_i2s_priv_by_name(afe, w->name);
314306

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

718-
dev_info(afe->dev, "%s(), id %d, rate %d, format %d\n",
719-
__func__,
720-
i2s_id,
721-
rate, format);
722-
723710
if (i2s_priv) {
724711
i2s_priv->rate = rate;
725712

@@ -810,8 +797,6 @@ static int mtk_dai_i2s_set_sysclk(struct snd_soc_dai *dai,
810797
return -EINVAL;
811798
}
812799

813-
dev_info(afe->dev, "%s(), freq %d\n", __func__, freq);
814-
815800
apll = mt8183_get_apll_by_rate(afe, freq);
816801
apll_rate = mt8183_get_apll_rate(afe, apll);
817802

0 commit comments

Comments
 (0)