lkml.org 
[lkml]   [2015]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] ASoC: codecs: Add da7218 codec driver
On Thu, Nov 05, 2015 at 10:43:19AM +0000, Adam Thomson wrote:

> +/* ALC */
> +static void da7218_alc_calib(struct snd_soc_codec *codec)
> +{
> + struct da7218_priv *da7218 = snd_soc_codec_get_drvdata(codec);
> + u8 calib_ctrl;
> + int i = 0;
> + bool calibrated = false;
> +
> + /* Bypass cache so it saves current settings */
> + regcache_cache_bypass(da7218->regmap, true);

What ensures that nothing else is running at the same time this is?

> +static int da7218_mic_lvl_det_sw_put(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{

Why is this a user visible control?

> + /* Default all mixers off */
> + snd_soc_write(codec, DA7218_DROUTING_OUTDAI_1L, 0);
> + snd_soc_write(codec, DA7218_DROUTING_OUTDAI_1R, 0);
> + snd_soc_write(codec, DA7218_DROUTING_OUTDAI_2L, 0);
> + snd_soc_write(codec, DA7218_DROUTING_OUTDAI_2R, 0);
> + snd_soc_write(codec, DA7218_DROUTING_OUTFILT_1L, 0);
> + snd_soc_write(codec, DA7218_DROUTING_OUTFILT_1R, 0);
> + snd_soc_write(codec, DA7218_DROUTING_ST_OUTFILT_1L, 0);
> + snd_soc_write(codec, DA7218_DROUTING_ST_OUTFILT_1R, 0);

We generally just use the device defaults, why change them?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-11-05 17:01    [W:0.084 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site