bool is_stream_in_use[2];
struct wm8960_data pdata;
struct dentry *debug_file;
+ bool first_capture;
+ bool is_capture;
};
#define wm8960_reset(c) regmap_write(c, WM8960_RESET, 0)
u16 word_length = 0;
int ret;
+ wm8960->is_capture = substream->stream == SNDRV_PCM_STREAM_CAPTURE;
wm8960->bclk = snd_soc_params_to_bclk(params);
if (params_channels(params) == 1)
wm8960->bclk *= 2;
switch (level) {
case SND_SOC_BIAS_ON:
+ if (wm8960->first_capture && wm8960->is_capture) {
+ msleep(800);
+ wm8960->first_capture = false;
+ }
break;
case SND_SOC_BIAS_PREPARE:
}
}
+ wm8960->first_capture = true;
+
/* Latch the update bits */
regmap_update_bits(wm8960->regmap, WM8960_LINVOL, 0x100, 0x100);
regmap_update_bits(wm8960->regmap, WM8960_RINVOL, 0x100, 0x100);
struct clk *clk_mclk_out;
struct reset_control *rst_pdm_dmic;
struct reset_control *rst_pdm_apb;
+ unsigned char flag_first;
};
static const DECLARE_TLV_DB_SCALE(volume_tlv, -9450, 150, 0);
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ if (priv->flag_first) {
+ priv->flag_first = 0;
+ mdelay(200);
+ }
sf_pdm_enable(priv->pdm_map);
return 0;
}
priv->dev = &pdev->dev;
+ priv->flag_first = 1;
ret = sf_pdm_clock_init(pdev, priv);
if (ret) {