mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ASoC: rockchip: vad: add judgement for vad stop
This patch add the judgement for vad stop, do nothing if vad was stopped. Change-Id: Iea9fa635d38644335ba30c821460c11d8526a7a6 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -81,6 +81,10 @@ static int rockchip_vad_stop(struct rockchip_vad *vad)
|
||||
struct vad_buf *vbuf = &vad->vbuf;
|
||||
struct vad_params *params = &vad->params;
|
||||
|
||||
regmap_read(vad->regmap, VAD_CTRL, &val);
|
||||
if ((val & VAD_EN_MASK) == VAD_DISABLE)
|
||||
return 0;
|
||||
|
||||
regmap_update_bits(vad->regmap, VAD_CTRL, VAD_EN_MASK, VAD_DISABLE);
|
||||
regmap_read(vad->regmap, VAD_RAM_END_ADDR, &val);
|
||||
vbuf->end = vbuf->begin + (val - vad->memphy) + 0x8;
|
||||
|
||||
Reference in New Issue
Block a user